Add staff_roles table
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
DROP INDEX staff_roles_discord_role_id ON staff_roles;
|
||||||
|
|
||||||
|
DROP TABLE staff_roles;
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
CREATE TABLE staff_roles (
|
||||||
|
id INTEGER AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
discord_role_id BIGINT NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX staff_roles_discord_role_id ON staff_roles(discord_role_id);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
DROP INDEX staff_roles_discord_role_id;
|
||||||
|
|
||||||
|
DROP TABLE staff_roles;
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
CREATE TABLE staff_roles (
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
discord_role_id BIGINT NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX staff_roles_discord_role_id ON staff_roles(discord_role_id);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
DROP INDEX staff_roles_discord_role_id;
|
||||||
|
|
||||||
|
DROP TABLE staff_roles;
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
CREATE TABLE staff_roles (
|
||||||
|
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
discord_role_id BIGINT NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX staff_roles_discord_role_id ON staff_roles(discord_role_id);
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
// @generated automatically by Diesel CLI.
|
// @generated automatically by Diesel CLI.
|
||||||
|
|
||||||
|
diesel::table! {
|
||||||
|
staff_roles (id) {
|
||||||
|
id -> Integer,
|
||||||
|
discord_role_id -> Bigint,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
diesel::table! {
|
diesel::table! {
|
||||||
users (id) {
|
users (id) {
|
||||||
id -> Integer,
|
id -> Integer,
|
||||||
@@ -12,3 +19,8 @@ diesel::table! {
|
|||||||
switch_code -> Nullable<Varchar>,
|
switch_code -> Nullable<Varchar>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diesel::allow_tables_to_appear_in_same_query!(
|
||||||
|
staff_roles,
|
||||||
|
users,
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
// @generated automatically by Diesel CLI.
|
// @generated automatically by Diesel CLI.
|
||||||
|
|
||||||
|
diesel::table! {
|
||||||
|
staff_roles (id) {
|
||||||
|
id -> Int4,
|
||||||
|
discord_role_id -> Int8,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
diesel::table! {
|
diesel::table! {
|
||||||
users (id) {
|
users (id) {
|
||||||
id -> Int4,
|
id -> Int4,
|
||||||
@@ -12,3 +19,8 @@ diesel::table! {
|
|||||||
switch_code -> Nullable<Varchar>,
|
switch_code -> Nullable<Varchar>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diesel::allow_tables_to_appear_in_same_query!(
|
||||||
|
staff_roles,
|
||||||
|
users,
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
// @generated automatically by Diesel CLI.
|
// @generated automatically by Diesel CLI.
|
||||||
|
|
||||||
|
diesel::table! {
|
||||||
|
staff_roles (id) {
|
||||||
|
id -> Integer,
|
||||||
|
discord_role_id -> BigInt,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
diesel::table! {
|
diesel::table! {
|
||||||
users (id) {
|
users (id) {
|
||||||
id -> Integer,
|
id -> Integer,
|
||||||
@@ -9,3 +16,8 @@ diesel::table! {
|
|||||||
switch_code -> Nullable<Text>,
|
switch_code -> Nullable<Text>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diesel::allow_tables_to_appear_in_same_query!(
|
||||||
|
staff_roles,
|
||||||
|
users,
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user