feat(db): hand-author drizzle schema for users, users_currency, bans, website_settings
This commit is contained in:
1 parent
0966aa7dda
commit
5369f99b07
5 files changed
+68
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import { mysqlTable, int, varchar, mysqlEnum } from "drizzle-orm/mysql-core";
|
||||
|
||||
// Subset of the real `users` table — the columns the web tier needs first.
|
||||
// The complete column set will be regenerated via `db:pull` against the live DB.
|
||||
export const users = mysqlTable("users", {
|
||||
id: int("id").autoincrement().primaryKey(),
|
||||
username: varchar("username", { length: 25 }).notNull(),
|
||||
realName: varchar("real_name", { length: 25 }).notNull(),
|
||||
password: varchar("password", { length: 64 }).notNull(),
|
||||
mail: varchar("mail", { length: 500 }),
|
||||
mailVerified: mysqlEnum("mail_verified", ["0", "1"]).notNull().default("0"),
|
||||
accountCreated: int("account_created").notNull(),
|
||||
lastLogin: int("last_login").notNull().default(0),
|
||||
motto: varchar("motto", { length: 127 }).notNull().default(""),
|
||||
look: varchar("look", { length: 256 }).notNull(),
|
||||
gender: mysqlEnum("gender", ["M", "F"]).notNull().default("M"),
|
||||
rank: int("rank").notNull().default(1),
|
||||
credits: int("credits").notNull().default(2500),
|
||||
pixels: int("pixels").notNull().default(500),
|
||||
points: int("points").notNull().default(10),
|
||||
online: mysqlEnum("online", ["0", "1", "2"]).notNull().default("0"),
|
||||
authTicket: varchar("auth_ticket", { length: 256 }).notNull().default(""),
|
||||
ipRegister: varchar("ip_register", { length: 45 }).notNull(),
|
||||
ipCurrent: varchar("ip_current", { length: 45 }).notNull(),
|
||||
});
|
||||
Reference in new issue
Block a user