- better reading of avalable routes
All checks were successful
Code quality checks / biome (push) Successful in 10s

- add name validation for channel names and catagories
- add create, delete, move for channels
This commit is contained in:
creations 2025-05-11 10:51:48 -04:00
parent 0cb7ebb245
commit 93ed37b3e9
Signed by: creations
GPG key ID: 8F553AA4320FC711
10 changed files with 559 additions and 6 deletions

View file

@ -0,0 +1,29 @@
import { cassandra } from "@lib/cassandra";
async function createTable() {
const client = cassandra.getClient();
await client.execute(`
CREATE TABLE IF NOT EXISTS categories (
id TEXT PRIMARY KEY,
guild_id TEXT,
name TEXT,
position INT,
created_at TIMESTAMP,
updated_at TIMESTAMP
);
`);
await client.execute(`
CREATE INDEX IF NOT EXISTS categories_guild_id_idx ON categories (guild_id);
`);
}
async function dropTable() {
const client = cassandra.getClient();
await client.execute("DROP TABLE IF EXISTS categories;");
await client.execute("DROP INDEX IF EXISTS categories_guild_id_idx;");
}
export { createTable, dropTable };