add SQL schema to install instructions

This commit is contained in:
emilyd 2022-11-26 10:47:34 +02:00
parent c1be030f0a
commit c7daea293d

View File

@ -15,6 +15,16 @@
```sql
CREATE DATABASE moodblog;
GRANT ALL ON moodblog.* TO 'moodblog'@'localhost' IDENTIFIED BY 'password';
USE moodblog;
CREATE TABLE IF NOT EXISTS articles (
ID INT NOT NULL AUTO_INCREMENT primary key,
Time TIMESTAMP,
Title VARCHAR(512) NOT NULL,
Mood VARCHAR(256),
MoodImage VARCHAR(256),
Song VARCHAR(256),
Message MEDIUMTEXT NOT NULL
);
FLUSH PRIVILEGES;
EXIT;
```