Spaces:
Paused
Paused
Download database/migrations/001-create-users-table.sql from Kraft102/widgettdc-api: direct link, hf CLI and curl.
- Browser
- Download file 585 Bytes
-
https://huggingface.co/spaces/Kraft102/widgettdc-api/resolve/main/database/migrations/001-create-users-table.sql
- Command line
-
hf download hf://spaces/Kraft102/widgettdc-api/database/migrations/001-create-users-table.sql
-
curl -L -o 001-create-users-table.sql https://huggingface.co/spaces/Kraft102/widgettdc-api/resolve/main/database/migrations/001-create-users-table.sql
585 Bytes
| -- Migration: Create users table | |
| CREATE TABLE IF NOT EXISTS users ( | |
| id UUID PRIMARY KEY DEFAULT gen_random_uuid(), | |
| username VARCHAR(50) UNIQUE NOT NULL, | |
| email VARCHAR(100) UNIQUE NOT NULL, | |
| password_hash VARCHAR(255) NOT NULL, | |
| is_active BOOLEAN DEFAULT true, | |
| is_verified BOOLEAN DEFAULT false, | |
| role VARCHAR(20) DEFAULT 'user', | |
| created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |
| updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP | |
| ); | |
| CREATE INDEX idx_users_username ON users(username); | |
| CREATE INDEX idx_users_email ON users(email); | |
| CREATE INDEX idx_users_role ON users(role); | |