PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "migrations" ("id" integer primary key autoincrement not null, "migration" varchar not null, "batch" integer not null);
INSERT INTO migrations VALUES(1,'0001_01_01_000000_create_users_table',1);
INSERT INTO migrations VALUES(2,'0001_01_01_000001_create_cache_table',1);
INSERT INTO migrations VALUES(3,'0001_01_01_000002_create_jobs_table',1);
INSERT INTO migrations VALUES(4,'2026_05_19_200751_create_vacancies_table',2);
INSERT INTO migrations VALUES(5,'2026_05_19_200752_create_applicants_table',2);
INSERT INTO migrations VALUES(6,'2026_05_20_000038_create_settings_table',3);
INSERT INTO migrations VALUES(7,'2026_05_20_000149_create_announcements_table',4);
INSERT INTO migrations VALUES(8,'2026_05_20_000624_add_department_to_vacancies_table',5);
CREATE TABLE IF NOT EXISTS "users" ("id" integer primary key autoincrement not null, "name" varchar not null, "email" varchar not null, "email_verified_at" datetime, "password" varchar not null, "remember_token" varchar, "created_at" datetime, "updated_at" datetime);
INSERT INTO users VALUES(1,'Admin','admin@admin.com',NULL,'$2y$12$mh65KZWPy74GI3Z84Wb0uOLjjFcxl.u71oVST.3.9U.G9oFE97fQq',NULL,'2026-05-19 20:10:03','2026-05-19 20:10:03');
INSERT INTO users VALUES(2,'MUH ALWI SYAHRIR','alwi@gmail.com',NULL,'$2y$12$bf60ZTU09mjBn9njZF04leD6wkFhyglXpPhucLH.ZW53zsCfbCZcS',NULL,'2026-05-19 23:56:54','2026-05-19 23:56:54');
CREATE TABLE IF NOT EXISTS "password_reset_tokens" ("email" varchar not null, "token" varchar not null, "created_at" datetime, primary key ("email"));
CREATE TABLE IF NOT EXISTS "sessions" ("id" varchar not null, "user_id" integer, "ip_address" varchar, "user_agent" text, "payload" text not null, "last_activity" integer not null, primary key ("id"));
INSERT INTO sessions VALUES('DvtXA8GFGqC6FZZLBKYtJqtYNojUJ5afCUNV80W3',1,'127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3.1 Safari/605.1.15','eyJfdG9rZW4iOiJDRUJFd0dST1RzSHp0d0FBNFFCVmoyU05VMmZmRTNEM3JRbWYzYmcwIiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cLzEyNy4wLjAuMTo4MDAxIiwicm91dGUiOiJpbmRleCJ9LCJfZmxhc2giOnsib2xkIjpbXSwibmV3IjpbXX0sInVybCI6eyJpbnRlbmRlZCI6Imh0dHA6XC9cLzEyNy4wLjAuMTo4MDAxXC9wYW5lbCJ9LCJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI6MX0=',1779264278);
INSERT INTO sessions VALUES('rHHcLEpbBPapdkrlsQHvPqLdEW0qUVvafsP1dxAO',NULL,'127.0.0.1','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3.1 Safari/605.1.15','eyJfdG9rZW4iOiJub3NUZVBsVmFDOFZwUXhWNXU3ZFN5dkRQY0c1QzlPMk9lQWV3MDBIIiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cLzEyNy4wLjAuMTo4MDAxIiwicm91dGUiOiJpbmRleCJ9LCJfZmxhc2giOnsib2xkIjpbXSwibmV3IjpbXX0sInVybCI6eyJpbnRlbmRlZCI6Imh0dHA6XC9cLzEyNy4wLjAuMTo4MDAxXC9mb3JtXC8yIn19',1779299559);
CREATE TABLE IF NOT EXISTS "cache" ("key" varchar not null, "value" text not null, "expiration" integer not null, primary key ("key"));
CREATE TABLE IF NOT EXISTS "cache_locks" ("key" varchar not null, "owner" varchar not null, "expiration" integer not null, primary key ("key"));
CREATE TABLE IF NOT EXISTS "jobs" ("id" integer primary key autoincrement not null, "queue" varchar not null, "payload" text not null, "attempts" integer not null, "reserved_at" integer, "available_at" integer not null, "created_at" integer not null);
CREATE TABLE IF NOT EXISTS "job_batches" ("id" varchar not null, "name" varchar not null, "total_jobs" integer not null, "pending_jobs" integer not null, "failed_jobs" integer not null, "failed_job_ids" text not null, "options" text, "cancelled_at" integer, "created_at" integer not null, "finished_at" integer, primary key ("id"));
CREATE TABLE IF NOT EXISTS "failed_jobs" ("id" integer primary key autoincrement not null, "uuid" varchar not null, "connection" varchar not null, "queue" varchar not null, "payload" text not null, "exception" text not null, "failed_at" datetime not null default CURRENT_TIMESTAMP);
CREATE TABLE IF NOT EXISTS "vacancies" ("id" integer primary key autoincrement not null, "title" varchar not null, "location" varchar not null, "employment_type" varchar, "category" varchar, "description" text, "requirements" text, "benefits" text, "is_active" tinyint(1) not null default '1', "created_at" datetime, "updated_at" datetime, "department" varchar);
INSERT INTO vacancies VALUES(1,'Staff Administrasi','Palembang','Full-Time','Administrasi','Dibutuhkan Staff Administrasi untuk mendukung operasional kantor PT Brahma Bina Bakti Estate di Sekernan, Jambi. Bertanggung jawab atas pengelolaan dokumen, data entry, dan pelaporan.','Pria/Wanita, usia 20-35 tahun\nPendidikan minimal S1 Manajemen/Administrasi\nPengalaman kerja minimal 1 tahun\nMenguasai Microsoft Office (Word, Excel, PowerPoint)\nJujur, teliti, dan disiplin\nBersedia ditempatkan di Sekernan, Jambi','Gaji Pokok sesuai UMK\nBPJS Kesehatan dan Ketenagakerjaan\nTunjangan makan dan transport\nFasilitas perumahan (Mess)\nTHR dan Bonus Tahunan',1,'2026-05-19 23:38:40','2026-05-20 00:13:29','Administrasi');
INSERT INTO vacancies VALUES(2,'Pemanen (Harvester)','Sekernan, Jambi','Full-Time','Lapangan','Sebagai Pemanen (Harvester) di PT Brahma Bina Bakti, Anda bertanggung jawab penuh atas kegiatan panen Tandan Buah Segar (TBS) kelapa sawit sesuai dengan standar mutu dan target harian yang ditetapkan perusahaan.','Pria, usia minimal 18 tahun dan maksimal 40 tahun\nPendidikan minimal SD/Sederajat\nSehat jasmani dan rohani\nJujur, disiplin, dan memiliki etos kerja tinggi\nBersedia tinggal di Mess perusahaan\nPengalaman sebagai pemanen menjadi nilai tambah','Gaji Pokok sesuai UMK Daerah\nPremi Panen (Insentif) berdasarkan target\nFasilitas Perumahan (Mess), Air Bersih, Listrik\nBPJS Kesehatan dan Ketenagakerjaan\nKlinik Kesehatan di area kebun\nFasilitas ibadah dan sarana olahraga',1,'2026-05-19 23:51:33','2026-05-20 00:13:29','Agronomi');
INSERT INTO vacancies VALUES(3,'Pekerja Rawat','Sekernan, Jambi','Full-Time','Lapangan','Pekerja Rawat bertugas merawat tanaman kelapa sawit meliputi pemupukan, pengendalian gulma, dan perawatan piringan. Bekerja dalam tim di area kebun PT BBBS Estate.','Pria/Wanita, usia 18-40 tahun\nPendidikan minimal SD/Sederajat\nSehat jasmani dan rohani\nBersedia bekerja di lapangan\nBersedia tinggal di Mess perusahaan','Gaji Pokok sesuai UMK\nBPJS Kesehatan dan Ketenagakerjaan\nFasilitas Perumahan (Mess)\nInsentif berdasarkan target',1,'2026-05-19 23:51:33','2026-05-20 00:13:29','Agronomi');
CREATE TABLE IF NOT EXISTS "applicants" ("id" integer primary key autoincrement not null, "user_id" integer, "vacancy_id" integer not null, "full_name" varchar not null, "nik" varchar not null, "gender" varchar, "birth_place" varchar, "birth_date" date, "religion" varchar, "weight" integer, "height" integer, "address" text, "city" varchar, "province" varchar, "postal_code" varchar, "family_data" text, "education_data" text, "experience_data" text, "other_data" text, "documents" text, "status" varchar not null default 'TERKIRIM', "created_at" datetime, "updated_at" datetime, foreign key("user_id") references "users"("id") on delete set null, foreign key("vacancy_id") references "vacancies"("id") on delete cascade);
INSERT INTO applicants VALUES(1,NULL,1,'Muhammad Rizki Pratama','1671012345678901','Laki-laki','Palembang','1998-05-15 00:00:00','Islam',70,172,'Jl. Jendral Sudirman No. 45, RT 003/RW 007, Kel. Bukit Kecil','Palembang','Sumatera Selatan','30114','[{"relationship":"Suami\/Istri","name":"","gender":"","birth_place_date":"","education":"","occupation":"","phone":""},{"relationship":"Anak 1","name":"","gender":"","birth_place_date":"","education":"","occupation":"","phone":""},{"relationship":"Ayah","name":"Ahmad Fauzi","gender":"L","birth_place_date":"Palembang, 10-03-1968","education":"S1","occupation":"PNS","phone":"08123456789"},{"relationship":"Ibu","name":"Siti Aminah","gender":"P","birth_place_date":"Palembang, 22-07-1970","education":"SMA","occupation":"Ibu Rumah Tangga","phone":"08567891234"},{"relationship":"Saudara 1","name":"Rizka Amelia","gender":"P","birth_place_date":"Palembang, 05-12-2000","education":"S1","occupation":"Mahasiswa","phone":"08789123456"},{"relationship":"Saudara 2","name":"Andi Pratama","gender":"L","birth_place_date":"Palembang, 18-01-2004","education":"SMA","occupation":"Pelajar","phone":"-"}]','[{"level":"SMA\/SMK","institution":"SMAN 3 Palembang","major":"IPA","location":"Palembang","year_start":"2013","year_end":"2016","graduated":"Lulus","gpa":"-"},{"level":"S1","institution":"Universitas Sriwijaya","major":"Manajemen","location":"Palembang","year_start":"2016","year_end":"2020","graduated":"Lulus","gpa":"3.65"}]','[{"company":"PT Sinar Mas Agro Resources\\nJl. Kol H. Burlian No.88, Palembang","positions":["Admin Gudang","Staff Logistik",""],"periods":["Jan 2021 - Des 2022","",""],"salaries":["Rp 4.500.000","",""],"subordinates":["2 orang","",""],"reason_leave":"Mencari peluang karir yang lebih baik","responsibilities":"Mengelola stok barang masuk\/keluar, membuat laporan bulanan inventory, koordinasi dengan divisi purchasing dan distribusi."},{"company":"CV Maju Bersama\\nJl. Veteran No.12, Palembang","positions":["Staff HRD","",""],"periods":["Jan 2023 - Des 2023","",""],"salaries":["Rp 5.000.000","",""],"subordinates":["-","",""],"reason_leave":"Kontrak berakhir","responsibilities":"Proses rekrutmen karyawan baru, pengelolaan absensi dan payroll, administrasi data karyawan."}]','{"social_activities":[{"organization":"Karang Taruna RT 003","activity":"Sosial Kemasyarakatan","position":"Sekretaris","year":"2019-2022"},{"organization":"HIMA Manajemen UNSRI","activity":"Akademik","position":"Anggota","year":"2017-2018"}],"hobbies":"Membaca buku, bermain futsal, traveling, berkebun","references":[{"name":"Ir. Bambang Susanto","address_phone":"Jl. Kapten A. Rivai No.50, Palembang \/ 08111222333","position":"Manager HRD","relationship":"Mantan Atasan"},{"name":"Drs. Hendra Wijaya","address_phone":"Jl. Demang Lebar Daun No.10, Palembang \/ 08222333444","position":"Dosen","relationship":"Dosen Pembimbing"}],"emergency_contacts":[{"name":"Ahmad Fauzi","address":"Jl. Jendral Sudirman No.45, Palembang","phone":"08123456789","relationship":"Ayah"},{"name":"Rizka Amelia","address":"Jl. Jendral Sudirman No.45, Palembang","phone":"08789123456","relationship":"Adik"}],"questions":[{"question":"Pernah melamar di perusahaan ini?","answer":"tidak","note":""},{"question":"Pernah bekerja di perusahaan ini?","answer":"tidak","note":""},{"question":"Masih aktif bekerja di Triputra Group?","answer":"tidak","note":""},{"question":"Memiliki kenalan di perusahaan?","answer":"tidak","note":""}]}','{"kartu_keluarga":"documents\/sample_kk.pdf","ktp":"documents\/sample_ktp.pdf","ijazah_terakhir":"documents\/sample_ijazah.pdf","surat_lamaran":"documents\/sample_lamaran.pdf","npwp":"documents\/sample_npwp.pdf","buku_rekening_bni":"documents\/sample_rekening.pdf","foto_3x4":"documents\/sample_foto.jpg"}','TERKIRIM','2026-05-19 23:38:40','2026-05-19 23:41:57');
CREATE TABLE IF NOT EXISTS "settings" ("id" integer primary key autoincrement not null, "key" varchar not null, "value" text, "created_at" datetime, "updated_at" datetime);
CREATE TABLE IF NOT EXISTS "announcements" ("id" integer primary key autoincrement not null, "title" varchar not null, "content" text not null, "date" date not null, "is_active" tinyint(1) not null default '1', "created_at" datetime, "updated_at" datetime);
INSERT INTO sqlite_sequence VALUES('migrations',8);
INSERT INTO sqlite_sequence VALUES('users',2);
INSERT INTO sqlite_sequence VALUES('vacancies',3);
INSERT INTO sqlite_sequence VALUES('applicants',1);
CREATE UNIQUE INDEX "users_email_unique" on "users" ("email");
CREATE INDEX "sessions_user_id_index" on "sessions" ("user_id");
CREATE INDEX "sessions_last_activity_index" on "sessions" ("last_activity");
CREATE INDEX "cache_expiration_index" on "cache" ("expiration");
CREATE INDEX "cache_locks_expiration_index" on "cache_locks" ("expiration");
CREATE INDEX "jobs_queue_index" on "jobs" ("queue");
CREATE INDEX "failed_jobs_connection_queue_failed_at_index" on "failed_jobs" ("connection", "queue", "failed_at");
CREATE UNIQUE INDEX "failed_jobs_uuid_unique" on "failed_jobs" ("uuid");
CREATE UNIQUE INDEX "applicants_nik_unique" on "applicants" ("nik");
CREATE UNIQUE INDEX "settings_key_unique" on "settings" ("key");
COMMIT;
