-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from polyphony-chat/sqlx-updates
Migration to PostgreSQL and sqlx version upgrade
- Loading branch information
Showing
100 changed files
with
803 additions
and
805 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[hooks] | ||
pre-push = "cargo fmt --all -- --check --color always" | ||
pre-push = "cargo fmt -- --check --color always" | ||
|
||
[logging] | ||
verbose = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ regex = "1.10.4" | |
reqwest = "0.12.4" | ||
serde = { version = "1.0.203", features = ["derive"] } | ||
serde_json = { version = "1.0.117", features = ["raw_value"] } | ||
sqlx = { version = "0.7.4", features = [ | ||
sqlx = { version = "0.8.0", features = [ | ||
"json", | ||
"chrono", | ||
"ipnetwork", | ||
|
@@ -46,14 +46,13 @@ thiserror = "1.0.61" | |
tokio = { version = "1.38.0", features = ["full"] } | ||
sentry = "0.33.0" | ||
clap = { version = "4.5.4", features = ["derive"] } | ||
|
||
chorus = { git = "http://github.com/polyphony-chat/chorus", rev = "537b025", features = [ | ||
chorus = { features = [ | ||
"backend", | ||
], default-features = false } # git = "ssh://[email protected]/Quat3rnion/chorus" # path = "../chorus" git = "ssh://[email protected]/polyphony-chat/chorus" | ||
], default-features = false, git = "https://github.com/polyphony-chat/chorus", branch = "dev" } # git = "ssh://[email protected]/Quat3rnion/chorus" # path = "../chorus" git = "ssh://[email protected]/polyphony-chat/chorus" | ||
serde_path_to_error = "0.1.16" | ||
percent-encoding = "2.3.1" | ||
hex = "0.4.3" | ||
itertools = "0.13.0" | ||
|
||
sqlx-pg-uint = { version = "0.4.1", features = ["serde"] } | ||
[dev-dependencies] | ||
rusty-hook = "0.11.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
MARIADB_USER=symfonia | ||
MARIADB_PASSWORD=symfonia | ||
MARIADB_DATABASE=symfonia | ||
POSTGRES_USER=symfonia | ||
POSTGRES_PASSWORD=symfonia | ||
POSTGRES_DB=symfonia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
create table if not exists config | ||
( | ||
`key` varchar(255) not null | ||
key varchar(255) not null | ||
primary key, | ||
value text null | ||
value json null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
create table if not exists connection_config | ||
( | ||
`key` varchar(255) not null | ||
key varchar(255) not null | ||
primary key, | ||
value text null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
create table if not exists user_settings | ||
CREATE SEQUENCE user_settings_index_seq; | ||
|
||
CREATE TABLE IF NOT EXISTS user_settings | ||
( | ||
`index` bigint unsigned auto_increment | ||
primary key, | ||
afk_timeout int null, | ||
allow_accessibility_detection tinyint null, | ||
animate_emoji tinyint null, | ||
animate_stickers int null, | ||
contact_sync_enabled tinyint null, | ||
convert_emoticons tinyint null, | ||
custom_status text null, | ||
default_guilds_restricted tinyint null, | ||
detect_platform_accounts tinyint null, | ||
developer_mode tinyint null, | ||
disable_games_tab tinyint null, | ||
enable_tts_command tinyint null, | ||
explicit_content_filter int null, | ||
friend_source_flags text null, | ||
gateway_connected tinyint null, | ||
gif_auto_play tinyint null, | ||
guild_folders text null, | ||
guild_positions text null, | ||
inline_attachment_media tinyint null, | ||
inline_embed_media tinyint null, | ||
locale varchar(255) null, | ||
message_display_compact tinyint null, | ||
native_phone_integration_enabled tinyint null, | ||
render_embeds tinyint null, | ||
render_reactions tinyint null, | ||
restricted_guilds text null, | ||
show_current_game tinyint null, | ||
status varchar(255) null, | ||
stream_notifications_enabled tinyint null, | ||
theme varchar(255) null, | ||
timezone_offset int null | ||
index numeric(20, 0) not null default nextval('user_settings_index_seq') constraint chk_index_range check (index >= 0 and index <= 18446744073709551615) primary key, | ||
afk_timeout int null, | ||
allow_accessibility_detection smallint null, | ||
animate_emoji smallint null, | ||
animate_stickers int null, | ||
contact_sync_enabled smallint null, | ||
convert_emoticons smallint null, | ||
custom_status text null, | ||
default_guilds_restricted smallint null, | ||
detect_platform_accounts smallint null, | ||
developer_mode smallint null, | ||
disable_games_tab smallint null, | ||
enable_tts_command smallint null, | ||
explicit_content_filter int null, | ||
friend_source_flags text null, | ||
gateway_connected smallint null, | ||
gif_auto_play smallint null, | ||
guild_folders text null, | ||
guild_positions text null, | ||
inline_attachment_media smallint null, | ||
inline_embed_media smallint null, | ||
locale varchar(255) null, | ||
message_display_compact smallint null, | ||
native_phone_integration_enabled smallint null, | ||
render_embeds smallint null, | ||
render_reactions smallint null, | ||
restricted_guilds text null, | ||
show_current_game smallint null, | ||
status varchar(255) null, | ||
stream_notifications_enabled smallint null, | ||
theme varchar(255) null, | ||
timezone_offset int null | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
create table if not exists users | ||
( | ||
id varchar(255) not null | ||
id varchar(255) not null | ||
primary key, | ||
username varchar(255) not null, | ||
discriminator varchar(255) not null, | ||
avatar varchar(255) null, | ||
accent_color int null, | ||
banner varchar(255) null, | ||
theme_colors text null, | ||
pronouns varchar(255) null, | ||
phone varchar(255) null, | ||
desktop tinyint not null, | ||
mobile tinyint not null, | ||
premium tinyint not null, | ||
premium_type tinyint unsigned not null, | ||
bot tinyint not null, | ||
bio varchar(255) not null, | ||
`system` tinyint not null, | ||
nsfw_allowed tinyint not null, | ||
mfa_enabled tinyint not null, | ||
webauthn_enabled tinyint default 0 not null, | ||
totp_secret varchar(255) null, | ||
totp_last_ticket varchar(255) null, | ||
created_at datetime not null, | ||
premium_since datetime null, | ||
verified tinyint not null, | ||
disabled tinyint not null, | ||
deleted tinyint not null, | ||
email varchar(255) null, | ||
flags bigint unsigned not null, | ||
public_flags int unsigned not null, | ||
purchased_flags int not null, | ||
premium_usage_flags int not null, | ||
rights bigint not null, | ||
data text not null, | ||
fingerprints text not null, | ||
extended_settings text not null, | ||
settingsIndex bigint unsigned null, | ||
username varchar(255) not null, | ||
discriminator varchar(255) not null, | ||
avatar varchar(255) null, | ||
accent_color int null, | ||
banner varchar(255) null, | ||
theme_colors text null, | ||
pronouns varchar(255) null, | ||
phone varchar(255) null, | ||
desktop smallint not null, | ||
mobile smallint not null, | ||
premium smallint not null, | ||
premium_type numeric(5, 0) not null constraint chk_smallint_unsigned check (premium_type >= 0 and premium_type <= 65535), | ||
bot smallint not null, | ||
bio varchar(255) not null, | ||
system smallint not null, | ||
nsfw_allowed smallint not null, | ||
mfa_enabled smallint not null, | ||
webauthn_enabled smallint default 0 not null, | ||
totp_secret varchar(255) null, | ||
totp_last_ticket varchar(255) null, | ||
created_at timestamp not null, | ||
premium_since timestamp null, | ||
verified smallint not null, | ||
disabled smallint not null, | ||
deleted smallint not null, | ||
email varchar(255) null, | ||
flags numeric(20, 0) not null constraint chk_flags_range check (flags >= 0 AND flags <= 18446744073709551615), | ||
public_flags numeric(10, 0) not null constraint chk_int_unsigned check (public_flags >= 0 and public_flags <= 4294967295), | ||
purchased_flags int not null, | ||
premium_usage_flags int not null, | ||
rights bigint not null, | ||
data text not null, | ||
fingerprints text not null, | ||
extended_settings text not null, | ||
settingsIndex numeric(20, 0) null constraint chk_settingsIndex_range check (settingsIndex >= 0 AND settingsIndex <= 18446744073709551615), | ||
constraint users_settingsIndex_uindex | ||
unique (settingsIndex), | ||
constraint users_user_settings_index_fk | ||
foreign key (settingsIndex) references user_settings (`index`) | ||
foreign key (settingsIndex) references user_settings (index) | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.