mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 10:46:44 -05:00
added uuid to moist tables
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
|
||||
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}),
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
|
||||
import { pgTable, integer, varchar, uuid } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const brand = pgTable("brands", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "brands_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom().unique(),
|
||||
name: varchar({length:100}).notNull(),
|
||||
...timestamps
|
||||
})
|
||||
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar, text } from "drizzle-orm/pg-core";
|
||||
import { pgTable, integer, varchar, text, uuid } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const Build = pgTable("builds", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "build_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom().unique(),
|
||||
account_id: integer().notNull(),
|
||||
name: varchar({length:255}).notNull(),
|
||||
description: text(),
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar, text } from "drizzle-orm/pg-core";
|
||||
import { pgTable, integer, varchar, text, uuid } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const BuildComponent = pgTable("builds_components", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "build_components_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom().unique(),
|
||||
build_id: integer().notNull(),
|
||||
product_id: integer().notNull(),
|
||||
...timestamps
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
|
||||
import { pgTable, integer, varchar, uuid } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const Category = pgTable("categories", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "categories_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom(),
|
||||
name: varchar({length: 100}).notNull(),
|
||||
parent_category_id: integer(),
|
||||
...timestamps
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
|
||||
import { pgTable, integer, varchar, uuid} from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const ComponentType = pgTable("component_type", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "component_type_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom().unique(),
|
||||
name: varchar({length: 100}).notNull(),
|
||||
...timestamps
|
||||
})
|
||||
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
|
||||
import { pgTable, integer, varchar, uuid} from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const manufacturer = pgTable("manufacturer", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "manufacturer_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom().unique(),
|
||||
name: varchar({length:100}).notNull(),
|
||||
...timestamps
|
||||
})
|
||||
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar, timestamp } from "drizzle-orm/pg-core";
|
||||
import { pgTable, integer, varchar, timestamp, uuid } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const Product_feed = pgTable("product_feeds", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "productfeeds_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom().unique(),
|
||||
reseller_id: integer().notNull(),
|
||||
feed_url: varchar({ length:255 }).notNull(),
|
||||
last_update: timestamp(),
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
|
||||
import { pgTable, integer, varchar, uuid } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "./helpers/columns.helpers";
|
||||
|
||||
export const Reseller = pgTable("bal_resellers", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "resellers_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
uuid: uuid().defaultRandom().unique(),
|
||||
name: varchar({ length: 100 }).notNull(),
|
||||
website_url: varchar({ length: 255 }),
|
||||
contact_email: varchar({length: 100}),
|
||||
|
||||
Reference in New Issue
Block a user