turash/bugulma/backend/scripts/setup-users.sql
Damir Mukimov 02fad6713c refactor(docs/locales): rename project from 'Tуган Як'/'Tugan Yak' to 'Turash' across docs, locales and test fixtures
- Update locales (ru, tt, en) to use 'Turash' and 'Turash AI'
- Update metadata, index.html, and pixel-art README
- Replace example credentials/emails from @tuganyak.dev -> @turash.dev
- Update admin defaults and migration seed to use new admin@turash.dev
- Update docs mentioning the old name
2025-12-15 05:42:16 +01:00

22 lines
823 B
SQL

-- Setup users for each role
-- This script creates/updates users with proper bcrypt-hashed passwords
-- Note: You'll need to generate bcrypt hashes for passwords
-- For now, we'll use a simple approach: update existing users and create new ones
-- The passwords will need to be hashed using the backend's password hashing
-- First, let's see what users exist
SELECT id, email, name, role, is_active FROM users;
-- Update existing admin user to ensure it has admin role
UPDATE users
SET role = 'admin', is_active = true
WHERE email = 'admin@turash.dev';
-- Create/update users for each role
-- Note: These passwords need to be hashed with bcrypt before inserting
-- The backend service handles password hashing, so use the API or a Go script
-- For now, let's create a script that uses the backend's password hashing