-- ============================================
-- Migration 002: Import Users Data
-- E-Proposal Komite - MySQL Migration
-- ============================================

USE db_proposalkomite;

-- Import existing users from CSV export
INSERT INTO users (id, name, email, phone, role, password) VALUES
  ('user-2', 'I Kadek Putra Diatmika, S.Sn.', 'putra.diatmika32@gmail.com', '628174738026', 'WAKA_SARPRAS', 'Ramayana#32'),
  ('user-3', 'I Kadek Putra Diatmika, S.Sn.', 'admin@smanegeri1abiansemal.sch.id', '628174738026', 'ADMIN', 'Smanab100%'),
  ('user-1', 'I Ketut Hariwirawan, S.Pd., M.Pd.', 'kepsek@smanegeri1abiansemal.sch.id', '6287861556176', 'KEPALA_SEKOLAH', 'Smanab100%'),
  ('user-5', 'Smanab', 'pengaju@smanegeri1abiansemal.sch.id', '628174738026', 'PENGAJU', 'Smanab100%'),
  ('user-4', 'Ni Kadek Suastiari, S.E., MAP', 'komite@smanegeri1abiansemal.sch.id', '6285953705006', 'KOMITE', 'Smanab100%'),
  ('user-4l9hsox1l', 'Gusti Agung Puspadewi, S.Kom', 'waka.kur@smanegeri1abiansemal.sch.id', '6281236802985', 'WAKA_KURIKULUM', 'Smanab100%'),
  ('user-uru7nnezz', 'I Nyoman Bawa Sunara, S.Pd.', 'waka.kesiswaan@smanegeri1abiansemal.sch.id', '6282145274046', 'WAKA_KESISWAAN', 'Smanab100%')
ON DUPLICATE KEY UPDATE
  name = VALUES(name),
  email = VALUES(email),
  phone = VALUES(phone),
  role = VALUES(role),
  password = VALUES(password);

-- Success Message
SELECT COUNT(*) as total_users FROM users;
SELECT 'Users imported successfully!' AS message;
