mirror of
https://github.com/MCMi460/3DS-RPC.git
synced 2025-06-18 21:45:37 -04:00
Revise initial migration
This commit is contained in:
parent
fa7d0cef52
commit
c30ae776a2
@ -19,7 +19,7 @@ class Config(Base):
|
|||||||
__tablename__ = "config"
|
__tablename__ = "config"
|
||||||
|
|
||||||
network: Mapped[NetworkType] = mapped_column("network", Integer(), primary_key=True)
|
network: Mapped[NetworkType] = mapped_column("network", Integer(), primary_key=True)
|
||||||
backend_uptime: Mapped[datetime.datetime] = mapped_column("backend_uptime", DateTime())
|
backend_uptime: Mapped[Optional[datetime.datetime]] = mapped_column("backend_uptime", DateTime())
|
||||||
|
|
||||||
|
|
||||||
class NetworkTypeValue(TypeDecorator):
|
class NetworkTypeValue(TypeDecorator):
|
||||||
@ -48,11 +48,11 @@ class Friend(Base):
|
|||||||
upd_id: Mapped[str] = mapped_column("upd_id", nullable=False)
|
upd_id: Mapped[str] = mapped_column("upd_id", nullable=False)
|
||||||
last_accessed: Mapped[int] = mapped_column("last_accessed", BigInteger(), nullable=False)
|
last_accessed: Mapped[int] = mapped_column("last_accessed", BigInteger(), nullable=False)
|
||||||
account_creation: Mapped[int] = mapped_column("account_creation", BigInteger(), nullable=False)
|
account_creation: Mapped[int] = mapped_column("account_creation", BigInteger(), nullable=False)
|
||||||
username: Mapped[str]
|
username: Mapped[Optional[str]]
|
||||||
message: Mapped[str]
|
message: Mapped[Optional[str]]
|
||||||
mii: Mapped[str]
|
mii: Mapped[Optional[str]]
|
||||||
joinable: Mapped[bool]
|
joinable: Mapped[bool]
|
||||||
game_description: Mapped[str] = mapped_column("game_description", nullable=False)
|
game_description: Mapped[Optional[str]] = mapped_column("game_description", nullable=False)
|
||||||
last_online: Mapped[int] = mapped_column("last_online", BigInteger(), nullable=False)
|
last_online: Mapped[int] = mapped_column("last_online", BigInteger(), nullable=False)
|
||||||
favorite_game: Mapped[int] = mapped_column("favorite_game", BigInteger(), nullable=False)
|
favorite_game: Mapped[int] = mapped_column("favorite_game", BigInteger(), nullable=False)
|
||||||
|
|
||||||
@ -72,8 +72,8 @@ class Discord(Base):
|
|||||||
id: Mapped[int] = mapped_column("id", BigInteger(), primary_key=True, nullable=False, unique=True)
|
id: Mapped[int] = mapped_column("id", BigInteger(), primary_key=True, nullable=False, unique=True)
|
||||||
refresh_token: Mapped[str] = mapped_column("refresh", nullable=False)
|
refresh_token: Mapped[str] = mapped_column("refresh", nullable=False)
|
||||||
bearer_token: Mapped[str] = mapped_column("bearer", nullable=False)
|
bearer_token: Mapped[str] = mapped_column("bearer", nullable=False)
|
||||||
rpc_session_token: Mapped[str] = mapped_column("session")
|
rpc_session_token: Mapped[Optional[str]] = mapped_column("session")
|
||||||
site_session_token: Mapped[str] = mapped_column("token", unique=True)
|
site_session_token: Mapped[Optional[str]] = mapped_column("token", unique=True)
|
||||||
last_accessed: Mapped[int] = mapped_column("last_accessed", BigInteger(), nullable=False)
|
last_accessed: Mapped[int] = mapped_column("last_accessed", BigInteger(), nullable=False)
|
||||||
generation_date: Mapped[int] = mapped_column("generation_date", BigInteger(), nullable=False)
|
generation_date: Mapped[int] = mapped_column("generation_date", BigInteger(), nullable=False)
|
||||||
show_profile_button: Mapped[bool] = mapped_column("show_profile_button", nullable=False, default=True)
|
show_profile_button: Mapped[bool] = mapped_column("show_profile_button", nullable=False, default=True)
|
||||||
|
@ -20,8 +20,8 @@ Create Table config(
|
|||||||
network tinyint NOT NULL
|
network tinyint NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO config(backend_uptime, network) VALUES (0, 0);
|
INSERT INTO config(backend_uptime, network) VALUES (NULL, 0);
|
||||||
INSERT INTO config(backend_uptime, network) VALUES (0, 1);
|
INSERT INTO config(backend_uptime, network) VALUES (NULL, 1);
|
||||||
|
|
||||||
Create Table discord(
|
Create Table discord(
|
||||||
ID bigint NOT NULL UNIQUE,
|
ID bigint NOT NULL UNIQUE,
|
||||||
|
Loading…
Reference in New Issue
Block a user