diff --git a/README.md b/README.md index 7e6e828..2a54f4c 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ If you have decided that you don't want to use Docker, you can intall it manuall * **data/logs/\_ANY_.log** - make sure no sensitive information are located in *.log*. ### Database Schema -You can find database schema in the `./app/db/01_schema.sql` file. +You can find database schema in `./app/db` folder. ### Debug mode To check if your server is set up correctly, turn on a debug mode (in config add `debug = true`) to see the details. In the debug mode, an error may be shown if you are missing some **PHP extensions** needed to be installed on your server. diff --git a/app/db/01_schema.sql b/app/db/mysql/01_schema.sql similarity index 100% rename from app/db/01_schema.sql rename to app/db/mysql/01_schema.sql diff --git a/app/db/sqlite/01_schema.sql b/app/db/sqlite/01_schema.sql new file mode 100644 index 0000000..bdd64bd --- /dev/null +++ b/app/db/sqlite/01_schema.sql @@ -0,0 +1,24 @@ +CREATE TABLE `images` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `name` TEXT NOT NULL, + `path` TEXT DEFAULT NULL, + `thumb` TEXT DEFAULT NULL, + `type` TEXT NOT NULL, + `md5` TEXT NOT NULL, + `datetime` INTEGER NOT NULL, + `status` INTEGER NOT NULL +); + +CREATE TABLE `posts` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `text` TEXT NOT NULL, + `plain_text` TEXT NOT NULL, + `feeling` TEXT NOT NULL, + `persons` TEXT NOT NULL, + `location` TEXT NOT NULL, + `content` TEXT NOT NULL, + `content_type` TEXT NOT NULL, + `privacy` TEXT NOT NULL, + `datetime` INTEGER NOT NULL, + `status` INTEGER NOT NULL +); diff --git a/docker-compose.yml b/docker-compose.yml index 4c4c2f8..1020275 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,6 +20,6 @@ services: restart: unless-stopped volumes: - mariadb:/var/lib/mysql - - ./app/db:/docker-entrypoint-initdb.d:ro + - ./app/db/mysql:/docker-entrypoint-initdb.d:ro volumes: mariadb: \ No newline at end of file