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
All checks were successful
Code quality checks / biome (push) Successful in 9s
This commit is contained in:
parent
61db491848
commit
f93cef442a
15 changed files with 280 additions and 72 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue