backend/config/setup/tables/guilds/invites.ts
creations 320e2cc121
All checks were successful
Code quality checks / biome (push) Successful in 7s
Add guild routes, setup tables, validators, and update environment example
Added routes for guild creation, deletion, joining, leaving, and invites
Set up Cassandra tables for guilds, invites, and members
Added validators for guild input
Updated .env.example with required config values
2025-05-03 13:56:57 -04:00

20 lines
395 B
TypeScript

import { cassandra } from "@lib/cassandra";
async function createTable() {
const client = cassandra.getClient();
await client.execute(`
CREATE TABLE IF NOT EXISTS guild_invites (
invite_code TEXT PRIMARY KEY,
guild_id TEXT,
created_by TEXT,
created_at TIMESTAMP,
expires_at TIMESTAMP,
max_uses INT,
uses INT,
is_revoked BOOLEAN
);
`);
}
export { createTable };