excise entity framework from all remaining code

This commit is contained in:
sam 2024-10-28 14:04:55 +01:00
parent d6c3133d52
commit ff92c5f335
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
62 changed files with 402 additions and 1339 deletions

View file

@ -0,0 +1,60 @@
create table if not exists guilds
(
id bigint not null primary key,
channels jsonb not null,
banned_systems text[] not null,
key_roles bigint[] not null
);
create table if not exists ignored_messages
(
id bigint not null primary key
);
create table if not exists invites
(
code text not null primary key,
guild_id bigint not null,
name text not null
);
create index if not exists ix_invites_guild_id on invites (guild_id);
create table if not exists messages
(
id bigint not null primary key,
original_id bigint,
user_id bigint not null,
channel_id bigint not null,
guild_id bigint not null,
member text,
system text,
username bytea not null,
content bytea not null,
metadata bytea,
attachment_size integer not null
);
create table if not exists watchlists
(
guild_id bigint not null,
user_id bigint not null,
added_at timestamp with time zone default now() not null,
moderator_id bigint not null,
reason text not null,
primary key (guild_id, user_id)
);
create table if not exists api_tokens
(
id integer generated by default as identity primary key,
dashboard_token text not null,
user_id text not null,
access_token text not null,
refresh_token text,
expires_at timestamp with time zone not null
);
-- Finally, drop the EFCore migrations table.
drop table if exists "__EFMigrationsHistory";