rename some functions, change name to username ( username table), fix exports, add validations folder
All checks were successful
Code quality checks / biome (push) Successful in 9s

This commit is contained in:
creations 2025-05-02 17:40:37 -04:00
parent 61db491848
commit f93cef442a
Signed by: creations
GPG key ID: 8F553AA4320FC711
15 changed files with 280 additions and 72 deletions

View file

@ -1,10 +1,10 @@
import { CassandraService } from "@lib/cassandra";
import { cassandra } from "@lib/cassandra";
async function createTable() {
await CassandraService.getClient().execute(`
await cassandra.getClient().execute(`
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY,
name TEXT,
username TEXT,
display_name TEXT,
email TEXT,
password TEXT,
@ -14,6 +14,14 @@ async function createTable() {
updated_at TIMESTAMP
);
`);
await cassandra.getClient().execute(`
CREATE INDEX IF NOT EXISTS users_username_idx ON users (username);
`);
await cassandra.getClient().execute(`
CREATE INDEX IF NOT EXISTS users_email_idx ON users (email);
`);
}
export { createTable };