Import Vector lab project
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
-- Seed: создание тестовых пользователей
|
||||
-- Пароль для всех: pass123
|
||||
|
||||
-- Удаляем существующих пользователей (если есть)
|
||||
TRUNCATE TABLE users CASCADE;
|
||||
|
||||
-- Создаём трёх тестовых пользователей
|
||||
-- Хеш для пароля "pass123" (bcrypt)
|
||||
INSERT INTO users (id, username, email, hashed_password, full_name, role, is_active, created_at)
|
||||
VALUES
|
||||
(gen_random_uuid(), 'operator', 'operator@mchs.by', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqVr/1jrYK', 'Оператор ЦОУ', 'operator', true, NOW()),
|
||||
(gen_random_uuid(), 'field', 'field@mchs.by', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqVr/1jrYK', 'Полевой работник', 'field', true, NOW()),
|
||||
(gen_random_uuid(), 'admin', 'admin@mchs.by', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqVr/1jrYK', 'Администратор', 'admin', true, NOW());
|
||||
|
||||
-- Проверка
|
||||
SELECT username, email, role, is_active FROM users ORDER BY role;
|
||||
Reference in New Issue
Block a user