Create users table
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
DROP INDEX users_discord_user_id ON users;
|
||||||
|
|
||||||
|
DROP TABLE users;
|
||||||
@@ -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);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
DROP INDEX users_discord_user_id;
|
||||||
|
|
||||||
|
DROP TABLE users;
|
||||||
@@ -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);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
DROP INDEX users_discord_user_id;
|
||||||
|
|
||||||
|
DROP TABLE users;
|
||||||
@@ -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);
|
||||||
@@ -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>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -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>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -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>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user