3
0
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:
Jeremy Latt 2014-02-25 16:31:41 -08:00
parent c35d5d1b8a
commit 0405c845bd
2 changed files with 0 additions and 30 deletions

View File

@ -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;

View File

@ -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);