36782-vm/db/migrations/016_seed_demo_data.sql
2025-12-12 14:13:03 +00:00

11 lines
701 B
SQL

INSERT INTO `users` (`email`, `password_hash`, `role`, `is_active`, `client_id`) VALUES
('supplier@example.com', '$2y$10$Vty/qSlkVoNiqhDRZlSLg.KeIWDBAvShA9d/.0CpOfzyvx8oF0vKG', 'supplier', 1, NULL);
-- Get the ID of the supplier we just created
SET @supplier_id = LAST_INSERT_ID();
INSERT INTO `products` (`name`, `description`, `price`, `image_url`, `is_active`, `supplier_id`, `units_per_pallet`) VALUES
('Produkt A', 'Opis produktu A', 100.00, 'https://via.placeholder.com/300', 1, @supplier_id, 10),
('Produkt B', 'Opis produktu B', 250.50, 'https://via.placeholder.com/300', 1, @supplier_id, 20),
('Produkt C', 'Opis produktu C', 50.00, 'https://via.placeholder.com/300', 1, @supplier_id, 50);