Skip to content

Commit

Permalink
fix: change filetype -> file_type
Browse files Browse the repository at this point in the history
  • Loading branch information
TroyKomodo committed Jan 17, 2024
1 parent bb14181 commit 17ee76f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platform/api/src/database/file_type.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use postgres_types::{FromSql, ToSql};

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, ToSql, FromSql)]
#[postgres(name = "filetype")]
#[postgres(name = "file_type")]
pub enum FileType {
#[postgres(name = "custom_thumbnail")]
CustomThumbnail,
Expand Down
2 changes: 1 addition & 1 deletion platform/migrations/20230825170300_init.down.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ DROP TABLE IF EXISTS chat_messages CASCADE;
DROP TABLE IF EXISTS global_state CASCADE;
DROP TABLE IF EXISTS roles CASCADE;
DROP TABLE IF EXISTS channel_user CASCADE;
DROP TYPE IF EXISTS filetype CASCADE;
DROP TABLE IF EXISTS uploaded_files CASCADE;
DROP TYPE IF EXISTS file_type CASCADE;

-- Image Processor
DROP TABLE IF EXISTS image_jobs CASCADE;
4 changes: 2 additions & 2 deletions platform/migrations/20230825170300_init.up.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TYPE filetype AS ENUM ('custom_thumbnail', 'profile_picture', 'offline_banner', 'role_badge', 'channel_role_badge');
CREATE TYPE file_type AS ENUM ('custom_thumbnail', 'profile_picture', 'offline_banner', 'role_badge', 'channel_role_badge');

CREATE TABLE users (
id UUID NOT NULL PRIMARY KEY,
Expand Down Expand Up @@ -50,7 +50,7 @@ CREATE TABLE uploaded_files (
owner_id UUID NOT NULL,
uploader_id UUID NOT NULL,
name VARCHAR(256) NOT NULL,
type filetype NOT NULL,
type file_type NOT NULL,
metadata BYTES NOT NULL,
total_size INT8 NOT NULL,
pending BOOLEAN NOT NULL DEFAULT TRUE,
Expand Down

0 comments on commit 17ee76f

Please sign in to comment.