Create users table

This commit is contained in:
2025-01-29 03:50:37 +00:00
parent 6dde01d7a1
commit 93aba69035
9 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DROP INDEX users_discord_user_id ON users;
DROP TABLE users;

View File

@@ -0,0 +1,9 @@
CREATE TABLE users (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
discord_user_id BIGINT NOT NULL,
pokemon_go_code VARCHAR(32),
pokemon_pocket_code VARCHAR(32),
switch_code VARCHAR(32)
);
CREATE UNIQUE INDEX users_discord_user_id ON users(discord_user_id);

View File

@@ -0,0 +1,3 @@
DROP INDEX users_discord_user_id;
DROP TABLE users;

View File

@@ -0,0 +1,9 @@
CREATE TABLE users (
id SERIAL PRIMARY KEY,
discord_user_id BIGINT NOT NULL,
pokemon_go_code VARCHAR(32),
pokemon_pocket_code VARCHAR(32),
switch_code VARCHAR(32)
);
CREATE UNIQUE INDEX users_discord_user_id ON users(discord_user_id);

View File

@@ -0,0 +1,3 @@
DROP INDEX users_discord_user_id;
DROP TABLE users;

View File

@@ -0,0 +1,9 @@
CREATE TABLE users (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
discord_user_id BIGINT NOT NULL,
pokemon_go_code VARCHAR(32),
pokemon_pocket_code VARCHAR(32),
switch_code VARCHAR(32)
);
CREATE UNIQUE INDEX users_discord_user_id ON users(discord_user_id);

View File

@@ -0,0 +1,14 @@
// @generated automatically by Diesel CLI.
diesel::table! {
users (id) {
id -> Integer,
discord_user_id -> Bigint,
#[max_length = 32]
pokemon_go_code -> Nullable<Varchar>,
#[max_length = 32]
pokemon_pocket_code -> Nullable<Varchar>,
#[max_length = 32]
switch_code -> Nullable<Varchar>,
}
}

View File

@@ -0,0 +1,14 @@
// @generated automatically by Diesel CLI.
diesel::table! {
users (id) {
id -> Int4,
discord_user_id -> Int8,
#[max_length = 32]
pokemon_go_code -> Nullable<Varchar>,
#[max_length = 32]
pokemon_pocket_code -> Nullable<Varchar>,
#[max_length = 32]
switch_code -> Nullable<Varchar>,
}
}

View File

@@ -0,0 +1,11 @@
// @generated automatically by Diesel CLI.
diesel::table! {
users (id) {
id -> Integer,
discord_user_id -> BigInt,
pokemon_go_code -> Nullable<Text>,
pokemon_pocket_code -> Nullable<Text>,
switch_code -> Nullable<Text>,
}
}