mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
Cleaning house
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
import { pgTable, integer, varchar, uuid } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const Account = pgTable("bal_accounts", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "accounts_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom().unique(),
|
||||
first_name: varchar({ length: 40 }),
|
||||
last_name: varchar({ length: 40 }),
|
||||
email: varchar({length: 100}),
|
||||
username: varchar({length:50}).notNull().unique(),
|
||||
password_hash: varchar({length:255}).notNull().unique(),
|
||||
|
||||
...timestamps
|
||||
})
|
||||
@@ -1,8 +1,7 @@
|
||||
import { pgTable, integer, varchar, text, decimal, uuid, real, bigserial, date, timestamp, boolean, unique, check } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
import { bigserial, boolean, check, date, pgTable, text, timestamp, unique, uuid, varchar } from "drizzle-orm/pg-core";
|
||||
|
||||
export const users = pgTable("users", {
|
||||
export const User = pgTable("users", {
|
||||
id: bigserial({ mode: "bigint" }).primaryKey().notNull(),
|
||||
username: varchar({ length: 50 }).notNull(),
|
||||
email: varchar({ length: 255 }).notNull(),
|
||||
@@ -18,6 +17,7 @@ export const users = pgTable("users", {
|
||||
lastLogin: timestamp("last_login", { mode: 'string' }),
|
||||
emailVerified: boolean("email_verified").default(false),
|
||||
buildPrivacySetting: text("build_privacy_setting").default('public'),
|
||||
uuid: uuid().defaultRandom(),
|
||||
}, (table) => {
|
||||
return {
|
||||
usersUsernameKey: unique("users_username_key").on(table.username),
|
||||
|
||||
Reference in New Issue
Block a user