add sqlite schema
This commit is contained in:
parent
f63bfe21bc
commit
ebce135ebf
4 changed files with 26 additions and 2 deletions
|
@ -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.
|
||||
|
|
24
app/db/sqlite/01_schema.sql
Normal file
24
app/db/sqlite/01_schema.sql
Normal file
|
@ -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
|
||||
);
|
|
@ -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:
|
Loading…
Add table
Reference in a new issue