icy3dw/migrations/001-initial.sql

33 lines
762 B
MySQL
Raw Normal View History

2022-04-09 11:29:54 +00:00
--------------------------------------------------------------------------------
-- Up
--------------------------------------------------------------------------------
2022-04-16 10:21:07 +00:00
PRAGMA foreign_keys = ON;
CREATE TABLE User (
id INTEGER PRIMARY KEY,
username TEXT NOT NULL,
display_name TEXT NOT NULL,
created_at TEXT
);
CREATE TABLE Pony (
id INTEGER PRIMARY KEY,
display_name TEXT,
position TEXT,
rotation TEXT,
character TEXT,
created_at TEXT,
user_id INTEGER,
FOREIGN KEY(user_id) REFERENCES User(user_id)
);
2022-04-09 11:29:54 +00:00
--------------------------------------------------------------------------------
-- Down
--------------------------------------------------------------------------------
2022-04-16 10:21:07 +00:00
DROP TABLE User;
DROP TABLE Pony;
PRAGMA foreign_keys = OFF;