summaryrefslogtreecommitdiff
path: root/plugins/guildbot/create_db.sql
diff options
context:
space:
mode:
authorLivio Recchia <recchialivio@libero.it>2020-02-10 23:06:34 +0100
committerLivio Recchia <recchialivio@libero.it>2020-02-10 23:06:34 +0100
commit9a13903a2f7d3a65fdf15a65fb59cccd622e2066 (patch)
tree9403b7dff39eb5e5d7fa0f79efb69b496add4c4b /plugins/guildbot/create_db.sql
parent11cc316b74d5f3f283413a33e7693b314741aa4a (diff)
downloadmanachat-9a13903a2f7d3a65fdf15a65fb59cccd622e2066.tar.gz
manachat-9a13903a2f7d3a65fdf15a65fb59cccd622e2066.tar.bz2
manachat-9a13903a2f7d3a65fdf15a65fb59cccd622e2066.tar.xz
manachat-9a13903a2f7d3a65fdf15a65fb59cccd622e2066.zip
Initial commit
Diffstat (limited to 'plugins/guildbot/create_db.sql')
-rw-r--r--plugins/guildbot/create_db.sql23
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);
+