Initial commit
This commit is contained in:
commit
8c6f7d4379
21 changed files with 4184 additions and 0 deletions
9
migrations/00000_init.sql
Normal file
9
migrations/00000_init.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
create table
|
||||
guilds (id text not null primary key, script text null);
|
||||
|
||||
create table
|
||||
messages (
|
||||
guild_id text not null references guilds (id),
|
||||
message_id text not null,
|
||||
primary key (guild_id, message_Id)
|
||||
);
|
||||
2
migrations/00001_counter_id.sql
Normal file
2
migrations/00001_counter_id.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
alter table messages
|
||||
add column counter_id text not null;
|
||||
2
migrations/00002_counter_channel_id.sql
Normal file
2
migrations/00002_counter_channel_id.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
alter table messages
|
||||
add column counter_channel_id text not null;
|
||||
5
migrations/00003_convert_webhook.sql
Normal file
5
migrations/00003_convert_webhook.sql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-- DELETE ALL MESSAGES!
|
||||
delete from messages;
|
||||
|
||||
alter table messages
|
||||
drop column counter_channel_id;
|
||||
7
migrations/00004_webhooks.sql
Normal file
7
migrations/00004_webhooks.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
create table
|
||||
webhooks (
|
||||
guild_id text not null references guilds (id),
|
||||
channel_id text not null primary key,
|
||||
webhook_id text not null,
|
||||
webhook_token text not null
|
||||
);
|
||||
5
migrations/00005_include_channel_id.sql
Normal file
5
migrations/00005_include_channel_id.sql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-- DELETE ALL MESSAGES!
|
||||
delete from messages;
|
||||
|
||||
alter table messages
|
||||
add column counter_channel_id text not null;
|
||||
Loading…
Add table
Add a link
Reference in a new issue