Rajat Mishra
Rajat Mishra
DTDrizzle Team
Created by Rajat Mishra on 11/8/2024 in #help
Drizzle-kit not working as expected
import { pgTable, uuid, text, boolean, jsonb } from "drizzle-orm/pg-core";

// Define Permissions table
export const Guild = pgTable("guild", {
id: uuid("id").primaryKey().defaultRandom(),
guildId: text("guild_id"),
clientId: text("client_id"),
permissionsRoles: jsonb("permissions_roles").array().default([]),
permissionsUsers: jsonb("permissions_users").array().default([]),
permissionsStatus: boolean("permissions_status").default(false),
});

export const AntiLinkConfig = pgTable("anti_link_config", {
id: uuid("id").primaryKey().defaultRandom(),
guildId: text("guild_id"),
clientId: text("client_id"),
disallowedLinks: jsonb("disallowed_links").array().default([]),
excludedRoles: jsonb("excluded_roles").array().default([]),
excludedChannels: jsonb("excluded_channels").array().default([]),
antiLinkStatus: boolean("anti_link_status").default(false),
actionOnViolation: text("action_on_violation").default("DELETE_MESSAGE"),
actionDuration: jsonb("action_duration").default(null),
allowedLinks: jsonb("allowed_links").array().default([]),
});
import { pgTable, uuid, text, boolean, jsonb } from "drizzle-orm/pg-core";

// Define Permissions table
export const Guild = pgTable("guild", {
id: uuid("id").primaryKey().defaultRandom(),
guildId: text("guild_id"),
clientId: text("client_id"),
permissionsRoles: jsonb("permissions_roles").array().default([]),
permissionsUsers: jsonb("permissions_users").array().default([]),
permissionsStatus: boolean("permissions_status").default(false),
});

export const AntiLinkConfig = pgTable("anti_link_config", {
id: uuid("id").primaryKey().defaultRandom(),
guildId: text("guild_id"),
clientId: text("client_id"),
disallowedLinks: jsonb("disallowed_links").array().default([]),
excludedRoles: jsonb("excluded_roles").array().default([]),
excludedChannels: jsonb("excluded_channels").array().default([]),
antiLinkStatus: boolean("anti_link_status").default(false),
actionOnViolation: text("action_on_violation").default("DELETE_MESSAGE"),
actionDuration: jsonb("action_duration").default(null),
allowedLinks: jsonb("allowed_links").array().default([]),
});
2 replies