mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
remove old sql
This commit is contained in:
parent
c35d5d1b8a
commit
0405c845bd
10
sql/drop.sql
10
sql/drop.sql
@ -1,10 +0,0 @@
|
|||||||
DROP INDEX IF EXISTS index_user_id_channel_id;
|
|
||||||
DROP TABLE IF EXISTS user_channel;
|
|
||||||
|
|
||||||
DROP INDEX IF EXISTS index_channel_name;
|
|
||||||
DROP INDEX IF EXISTS index_channel_id;
|
|
||||||
DROP TABLE IF EXISTS channel;
|
|
||||||
|
|
||||||
DROP INDEX IF EXISTS index_user_nick;
|
|
||||||
DROP INDEX IF EXISTS index_user_id;
|
|
||||||
DROP TABLE IF EXISTS user;
|
|
20
sql/init.sql
20
sql/init.sql
@ -1,20 +0,0 @@
|
|||||||
CREATE TABLE user (
|
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
||||||
nick TEXT NOT NULL UNIQUE,
|
|
||||||
hash BLOB NOT NULL
|
|
||||||
);
|
|
||||||
CREATE INDEX index_user_id ON user(id);
|
|
||||||
CREATE INDEX index_user_nick ON user(nick);
|
|
||||||
|
|
||||||
CREATE TABLE channel (
|
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
||||||
name TEXT NOT NULL UNIQUE
|
|
||||||
);
|
|
||||||
CREATE INDEX index_channel_id ON channel(id);
|
|
||||||
|
|
||||||
CREATE TABLE user_channel (
|
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
||||||
user_id INTEGER NOT NULL,
|
|
||||||
channel_id INTEGER NOT NULL
|
|
||||||
);
|
|
||||||
CREATE UNIQUE INDEX index_user_id_channel_id ON user_channel (user_id, channel_id);
|
|
Loading…
Reference in New Issue
Block a user