diff options
Diffstat (limited to 'plugins/guildbot/create_db.sql')
-rw-r--r-- | plugins/guildbot/create_db.sql | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/guildbot/create_db.sql b/plugins/guildbot/create_db.sql new file mode 100644 index 0000000..bdf1d76 --- /dev/null +++ b/plugins/guildbot/create_db.sql @@ -0,0 +1,23 @@ +pragma foreign_keys=on; + +create table if not exists GUILDS( + ID integer primary key not null, + NAME text[25] not null unique, + CREATED datetime default current_timestamp, + MOTD text[100]); + +create table if not exists PLAYERS( + ID integer primary key not null, + NAME text[25] not null unique, + LASTSEEN datetime, + GUILD_ID integer, + ACCESS integer default 0, + foreign key(GUILD_ID) references GUILDS(ID)); + +insert into GUILDS(NAME) values('Crew of Red Corsair'); +insert into GUILDS(NAME) values('Phoenix Council'); + +insert into PLAYERS(NAME, GUILD_ID, ACCESS) values('Travolta', 1, 10); +insert into PLAYERS(NAME, GUILD_ID, ACCESS) values('Rill', 1, 10); +insert into PLAYERS(NAME, GUILD_ID, ACCESS) values('veryape', 2, 10); + |