- better reading of avalable routes
All checks were successful
Code quality checks / biome (push) Successful in 10s
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:
parent
0cb7ebb245
commit
93ed37b3e9
10 changed files with 559 additions and 6 deletions
29
config/setup/tables/guilds/categories.ts
Normal file
29
config/setup/tables/guilds/categories.ts
Normal 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 };
|
Loading…
Add table
Add a link
Reference in a new issue