Compare commits

...

3 Commits

Author SHA1 Message Date
NOrtmann1 70f7e05fe1 Update DatabaseArticleManager.php 2026-06-09 15:30:05 +02:00
NOrtmann1 15f17b7af4 .idea 2026-06-09 15:29:53 +02:00
niklas.ortmann 5660f8d59d .idea 2026-06-08 11:15:42 +02:00
5 changed files with 32 additions and 1839 deletions
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal" created-in="IU-261.24374.151">
<data-source name="articles" uuid="315cb5c9-2b0f-435b-b602-59823b160908">
<database-info product="SQLite" version="3.51.1" jdbc-version="4.2" driver-name="SQLite JDBC" driver-version="3.51.1.0" dbms="SQLITE" exact-version="3.51.1" exact-driver-version="3.51">
<identifier-quote-string>&quot;</identifier-quote-string>
</database-info>
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
<secret-storage>master_key</secret-storage>
<auth-provider>no-auth</auth-provider>
<schema-mapping>
<introspection-scope>
<node kind="schema" qname="@" />
</introspection-scope>
</schema-mapping>
</data-source>
</component>
</project>
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="articles" uuid="315cb5c9-2b0f-435b-b602-59823b160908">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/db/articles</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>
File diff suppressed because it is too large Load Diff
@@ -1,2 +0,0 @@
#n:main
!<md> [0, 0, null, null, -2147483648, -2147483648]
+2 -4
View File
@@ -20,10 +20,8 @@ class DatabaseArticleManager implements ArticleManagerDAO {
{ {
if (!file_exists(__DIR__ . '/../../db/articles.db')) { if (!file_exists(__DIR__ . '/../../db/articles.db')) {
try { try {
$user = 'root';
$pw = null; $db = $this->getConnection();
$dsn = 'sqlite:' . __DIR__ . '/../../db/articles.db';
$db = new PDO($dsn, $user, $pw);
$db->exec(" $db->exec("
CREATE TABLE articles ( CREATE TABLE articles (