chore: update gitignore for phase02
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { pgTable, uuid, varchar, integer, boolean } from 'drizzle-orm/pg-core';
|
||||
import { nodes } from './nodes';
|
||||
import { servers } from './servers';
|
||||
|
||||
export const allocations = pgTable('allocations', {
|
||||
id: uuid('id').defaultRandom().primaryKey(),
|
||||
nodeId: uuid('node_id')
|
||||
.notNull()
|
||||
.references(() => nodes.id, { onDelete: 'cascade' }),
|
||||
serverId: uuid('server_id').references(() => servers.id, { onDelete: 'set null' }),
|
||||
ip: varchar('ip', { length: 45 }).notNull(),
|
||||
port: integer('port').notNull(),
|
||||
isDefault: boolean('is_default').default(false).notNull(),
|
||||
});
|
||||
@@ -1,6 +1,7 @@
|
||||
export * from './users';
|
||||
export * from './organizations';
|
||||
export * from './nodes';
|
||||
export * from './allocations';
|
||||
export * from './games';
|
||||
export * from './servers';
|
||||
export * from './backups';
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
timestamp,
|
||||
} from 'drizzle-orm/pg-core';
|
||||
import { organizations } from './organizations';
|
||||
import { servers } from './servers';
|
||||
|
||||
export const nodes = pgTable('nodes', {
|
||||
id: uuid('id').defaultRandom().primaryKey(),
|
||||
@@ -32,14 +31,3 @@ export const nodes = pgTable('nodes', {
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull(),
|
||||
});
|
||||
|
||||
export const allocations = pgTable('allocations', {
|
||||
id: uuid('id').defaultRandom().primaryKey(),
|
||||
nodeId: uuid('node_id')
|
||||
.notNull()
|
||||
.references(() => nodes.id, { onDelete: 'cascade' }),
|
||||
serverId: uuid('server_id').references(() => servers.id, { onDelete: 'set null' }),
|
||||
ip: varchar('ip', { length: 45 }).notNull(),
|
||||
port: integer('port').notNull(),
|
||||
isDefault: boolean('is_default').default(false).notNull(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user