diff --git a/migrations/2024-02-06-145714_create_artists_table/down.sql b/migrations/2024-02-06-145714_create_artists_table/down.sql new file mode 100644 index 0000000..943c085 --- /dev/null +++ b/migrations/2024-02-06-145714_create_artists_table/down.sql @@ -0,0 +1 @@ +DROP TABLE artists; diff --git a/migrations/2024-02-06-145714_create_artists_table/up.sql b/migrations/2024-02-06-145714_create_artists_table/up.sql new file mode 100644 index 0000000..73802e6 --- /dev/null +++ b/migrations/2024-02-06-145714_create_artists_table/up.sql @@ -0,0 +1,4 @@ +CREATE TABLE artists ( + id SERIAL PRIMARY KEY UNIQUE NOT NULL, + name VARCHAR NOT NULL +); diff --git a/src/schema.rs b/src/schema.rs index 2e9b462..58b691a 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -1,5 +1,12 @@ // @generated automatically by Diesel CLI. +diesel::table! { + artists (id) { + id -> Int4, + name -> Varchar, + } +} + diesel::table! { users (id) { id -> Int4, @@ -9,3 +16,8 @@ diesel::table! { created_at -> Timestamp, } } + +diesel::allow_tables_to_appear_in_same_query!( + artists, + users, +);