ERROR - 2026-03-23 15:44:43 --> Duplicate entry 'superadmin' for key 'username'
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('INSERT INTO `users` (`username`, `active`, `created_at`, `updated_at`) VALUES (\'superadmin\', 1, \'2026-03-23 15:44:43\', \'2026-03-23 15:44:43\')', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('INSERT INTO `users` (`username`, `active`, `created_at`, `updated_at`) VALUES (\'superadmin\', 1, \'2026-03-23 15:44:43\', \'2026-03-23 15:44:43\')')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('INSERT INTO `users` (`username`, `active`, `created_at`, `updated_at`) VALUES (\'superadmin\', 1, \'2026-03-23 15:44:43\', \'2026-03-23 15:44:43\')')
 4 SYSTEMPATH/Database/BaseBuilder.php(2345): CodeIgniter\Database\BaseConnection->query('INSERT INTO `users` (`username`, `active`, `created_at`, `updated_at`) VALUES (:username:, :active:, :created_at:, :updated_at:)', [...], false)
 5 SYSTEMPATH/Model.php(355): CodeIgniter\Database\BaseBuilder->insert()
 6 SYSTEMPATH/BaseModel.php(899): CodeIgniter\Model->doInsert([...])
 7 SYSTEMPATH/Model.php(668): CodeIgniter\BaseModel->insert([...], false)
 8 VENDORPATH/codeigniter4/shield/src/Models/UserModel.php(421): CodeIgniter\Model->insert(Object(CodeIgniter\Shield\Entities\User), false)
 9 SYSTEMPATH/BaseModel.php(752): CodeIgniter\Shield\Models\UserModel->insert(Object(CodeIgniter\Shield\Entities\User), false)
10 VENDORPATH/codeigniter4/shield/src/Models/UserModel.php(483): CodeIgniter\BaseModel->save(Object(CodeIgniter\Shield\Entities\User))
11 APPPATH/Database/Seeds/AdminSeeder.php(22): CodeIgniter\Shield\Models\UserModel->save(Object(CodeIgniter\Shield\Entities\User))
12 SYSTEMPATH/Database/Seeder.php(155): App\Database\Seeds\AdminSeeder->run()
13 SYSTEMPATH/Commands/Database/Seed.php(79): CodeIgniter\Database\Seeder->call('App\\Database\\Seeds\\AdminSeeder')
14 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Seed->run([])
15 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('db:seed', [...])
16 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
17 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
18 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 15:49:37 --> Can't create table `stt_repository`.`user_profiles` (errno: 150 "Foreign key constraint is incorrectly formed")
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(57): CodeIgniter\Database\Forge->createTable('user_profiles')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
12 SYSTEMPATH/CLI/BaseCommand.php(119): CodeIgniter\CLI\Commands->run('migrate', [...])
13 SYSTEMPATH/Commands/Database/MigrateRefresh.php(91): CodeIgniter\CLI\BaseCommand->call('migrate', [...])
14 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\MigrateRefresh->CodeIgniter\Commands\Database\{closure}()
15 SYSTEMPATH/Commands/Database/MigrateRefresh.php(89): CodeIgniter\Commands\Database\MigrateRefresh->withSignalsBlocked(Object(Closure))
16 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\MigrateRefresh->run([...])
17 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate:refresh', [])
18 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
19 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
20 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 15:50:54 --> Can't create table `stt_repository`.`user_profiles` (errno: 150 "Foreign key constraint is incorrectly formed")
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(57): CodeIgniter\Database\Forge->createTable('user_profiles')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
12 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate', [...])
13 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
14 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
15 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 15:52:35 --> Duplicate key name 'user_id'
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(57): CodeIgniter\Database\Forge->createTable('user_profiles')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
12 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate', [...])
13 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
14 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
15 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 15:53:02 --> Duplicate key name 'user_id'
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(57): CodeIgniter\Database\Forge->createTable('user_profiles')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
12 SYSTEMPATH/CLI/BaseCommand.php(119): CodeIgniter\CLI\Commands->run('migrate', [...])
13 SYSTEMPATH/Commands/Database/MigrateRefresh.php(91): CodeIgniter\CLI\BaseCommand->call('migrate', [...])
14 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\MigrateRefresh->CodeIgniter\Commands\Database\{closure}()
15 SYSTEMPATH/Commands/Database/MigrateRefresh.php(89): CodeIgniter\Commands\Database\MigrateRefresh->withSignalsBlocked(Object(Closure))
16 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\MigrateRefresh->run([...])
17 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate:refresh', [])
18 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
19 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
20 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 15:53:24 --> Duplicate key name 'user_id'
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` INT(11) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`),
	KEY `user_id` (`user_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(57): CodeIgniter\Database\Forge->createTable('user_profiles')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
12 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate', [...])
13 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
14 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
15 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 15:55:32 --> Can't create table `stt_repository`.`user_profiles` (errno: 150 "Foreign key constraint is incorrectly formed")
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('ALTER TABLE `user_profiles` ADD CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('ALTER TABLE `user_profiles` ADD CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('ALTER TABLE `user_profiles` ADD CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE')
 4 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(62): CodeIgniter\Database\BaseConnection->query('ALTER TABLE `user_profiles` ADD CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE')
 5 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 6 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 7 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 8 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
 9 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
10 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
11 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate', [...])
12 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
13 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
14 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
WARNING - 2026-03-23 15:55:32 --> user_profiles FK skipped: Can't create table `stt_repository`.`user_profiles` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR - 2026-03-23 15:55:32 --> Can't create table `stt_repository`.`documents` (errno: 150 "Foreign key constraint is incorrectly formed")
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `documents` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(255) NOT NULL,
	`author_name` VARCHAR(255) NOT NULL COMMENT \'Cached from user_profiles.name at submission time\',
	`author_user_id` INT(11) UNSIGNED NULL COMMENT \'NULL if admin-uploaded without student association\',
	`nim` VARCHAR(30) NULL COMMENT \'NIM at time of submission\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`document_type_id` INT(11) UNSIGNED NOT NULL,
	`year` YEAR NOT NULL,
	`abstract` TEXT NULL,
	`keywords` VARCHAR(500) NULL COMMENT \'Comma-separated keywords\',
	`supervisor` VARCHAR(255) NULL COMMENT \'Dosen pembimbing\',
	`publisher` VARCHAR(255) NULL COMMENT \'For journals and proceedings\',
	`cover_img` VARCHAR(255) NULL COMMENT \'UUID filename in storage/covers/\',
	`file_path` VARCHAR(255) NOT NULL COMMENT \'UUID filename in storage/pdf/\',
	`status` ENUM(\'draft\',\'submitted\',\'review\',\'revision\',\'published\',\'rejected\') NOT NULL DEFAULT \'draft\',
	`admin_note` TEXT NULL COMMENT \'Feedback from admin for revision or rejection\',
	`citations_count` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT \'Internal citations only — denormalized for performance\',
	`view_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`download_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`submitted_at` DATETIME NULL,
	`reviewed_at` DATETIME NULL,
	`published_at` DATETIME NULL,
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_documents` PRIMARY KEY(`id`),
	CONSTRAINT `documents_author_user_id_foreign` FOREIGN KEY (`author_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	CONSTRAINT `documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
	CONSTRAINT `documents_study_program_id_foreign` FOREIGN KEY (`study_program_id`) REFERENCES `study_programs`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	KEY `status` (`status`),
	KEY `document_type_id` (`document_type_id`),
	KEY `author_user_id` (`author_user_id`),
	KEY `study_program_id` (`study_program_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `documents` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(255) NOT NULL,
	`author_name` VARCHAR(255) NOT NULL COMMENT \'Cached from user_profiles.name at submission time\',
	`author_user_id` INT(11) UNSIGNED NULL COMMENT \'NULL if admin-uploaded without student association\',
	`nim` VARCHAR(30) NULL COMMENT \'NIM at time of submission\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`document_type_id` INT(11) UNSIGNED NOT NULL,
	`year` YEAR NOT NULL,
	`abstract` TEXT NULL,
	`keywords` VARCHAR(500) NULL COMMENT \'Comma-separated keywords\',
	`supervisor` VARCHAR(255) NULL COMMENT \'Dosen pembimbing\',
	`publisher` VARCHAR(255) NULL COMMENT \'For journals and proceedings\',
	`cover_img` VARCHAR(255) NULL COMMENT \'UUID filename in storage/covers/\',
	`file_path` VARCHAR(255) NOT NULL COMMENT \'UUID filename in storage/pdf/\',
	`status` ENUM(\'draft\',\'submitted\',\'review\',\'revision\',\'published\',\'rejected\') NOT NULL DEFAULT \'draft\',
	`admin_note` TEXT NULL COMMENT \'Feedback from admin for revision or rejection\',
	`citations_count` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT \'Internal citations only — denormalized for performance\',
	`view_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`download_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`submitted_at` DATETIME NULL,
	`reviewed_at` DATETIME NULL,
	`published_at` DATETIME NULL,
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_documents` PRIMARY KEY(`id`),
	CONSTRAINT `documents_author_user_id_foreign` FOREIGN KEY (`author_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	CONSTRAINT `documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
	CONSTRAINT `documents_study_program_id_foreign` FOREIGN KEY (`study_program_id`) REFERENCES `study_programs`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	KEY `status` (`status`),
	KEY `document_type_id` (`document_type_id`),
	KEY `author_user_id` (`author_user_id`),
	KEY `study_program_id` (`study_program_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `documents` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(255) NOT NULL,
	`author_name` VARCHAR(255) NOT NULL COMMENT \'Cached from user_profiles.name at submission time\',
	`author_user_id` INT(11) UNSIGNED NULL COMMENT \'NULL if admin-uploaded without student association\',
	`nim` VARCHAR(30) NULL COMMENT \'NIM at time of submission\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`document_type_id` INT(11) UNSIGNED NOT NULL,
	`year` YEAR NOT NULL,
	`abstract` TEXT NULL,
	`keywords` VARCHAR(500) NULL COMMENT \'Comma-separated keywords\',
	`supervisor` VARCHAR(255) NULL COMMENT \'Dosen pembimbing\',
	`publisher` VARCHAR(255) NULL COMMENT \'For journals and proceedings\',
	`cover_img` VARCHAR(255) NULL COMMENT \'UUID filename in storage/covers/\',
	`file_path` VARCHAR(255) NOT NULL COMMENT \'UUID filename in storage/pdf/\',
	`status` ENUM(\'draft\',\'submitted\',\'review\',\'revision\',\'published\',\'rejected\') NOT NULL DEFAULT \'draft\',
	`admin_note` TEXT NULL COMMENT \'Feedback from admin for revision or rejection\',
	`citations_count` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT \'Internal citations only — denormalized for performance\',
	`view_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`download_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`submitted_at` DATETIME NULL,
	`reviewed_at` DATETIME NULL,
	`published_at` DATETIME NULL,
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_documents` PRIMARY KEY(`id`),
	CONSTRAINT `documents_author_user_id_foreign` FOREIGN KEY (`author_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	CONSTRAINT `documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
	CONSTRAINT `documents_study_program_id_foreign` FOREIGN KEY (`study_program_id`) REFERENCES `study_programs`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	KEY `status` (`status`),
	KEY `document_type_id` (`document_type_id`),
	KEY `author_user_id` (`author_user_id`),
	KEY `study_program_id` (`study_program_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `documents` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(255) NOT NULL,
	`author_name` VARCHAR(255) NOT NULL COMMENT \'Cached from user_profiles.name at submission time\',
	`author_user_id` INT(11) UNSIGNED NULL COMMENT \'NULL if admin-uploaded without student association\',
	`nim` VARCHAR(30) NULL COMMENT \'NIM at time of submission\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`document_type_id` INT(11) UNSIGNED NOT NULL,
	`year` YEAR NOT NULL,
	`abstract` TEXT NULL,
	`keywords` VARCHAR(500) NULL COMMENT \'Comma-separated keywords\',
	`supervisor` VARCHAR(255) NULL COMMENT \'Dosen pembimbing\',
	`publisher` VARCHAR(255) NULL COMMENT \'For journals and proceedings\',
	`cover_img` VARCHAR(255) NULL COMMENT \'UUID filename in storage/covers/\',
	`file_path` VARCHAR(255) NOT NULL COMMENT \'UUID filename in storage/pdf/\',
	`status` ENUM(\'draft\',\'submitted\',\'review\',\'revision\',\'published\',\'rejected\') NOT NULL DEFAULT \'draft\',
	`admin_note` TEXT NULL COMMENT \'Feedback from admin for revision or rejection\',
	`citations_count` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT \'Internal citations only — denormalized for performance\',
	`view_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`download_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`submitted_at` DATETIME NULL,
	`reviewed_at` DATETIME NULL,
	`published_at` DATETIME NULL,
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_documents` PRIMARY KEY(`id`),
	CONSTRAINT `documents_author_user_id_foreign` FOREIGN KEY (`author_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	CONSTRAINT `documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
	CONSTRAINT `documents_study_program_id_foreign` FOREIGN KEY (`study_program_id`) REFERENCES `study_programs`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	KEY `status` (`status`),
	KEY `document_type_id` (`document_type_id`),
	KEY `author_user_id` (`author_user_id`),
	KEY `study_program_id` (`study_program_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000004_CreateDocuments.php(131): CodeIgniter\Database\Forge->createTable('documents')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateDocuments->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
12 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate', [...])
13 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
14 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
15 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 15:56:33 --> Can't create table `stt_repository`.`user_profiles` (errno: 150 "Foreign key constraint is incorrectly formed")
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('ALTER TABLE `user_profiles` ADD CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('ALTER TABLE `user_profiles` ADD CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('ALTER TABLE `user_profiles` ADD CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE')
 4 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(62): CodeIgniter\Database\BaseConnection->query('ALTER TABLE `user_profiles` ADD CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE')
 5 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 6 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 7 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 8 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
 9 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
10 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
11 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate', [...])
12 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
13 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
14 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
WARNING - 2026-03-23 15:56:33 --> user_profiles FK skipped: Can't create table `stt_repository`.`user_profiles` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR - 2026-03-23 15:56:33 --> Can't create table `stt_repository`.`documents` (errno: 150 "Foreign key constraint is incorrectly formed")
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `documents` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(255) NOT NULL,
	`author_name` VARCHAR(255) NOT NULL COMMENT \'Cached from user_profiles.name at submission time\',
	`author_user_id` INT(11) UNSIGNED NULL COMMENT \'NULL if admin-uploaded without student association\',
	`nim` VARCHAR(30) NULL COMMENT \'NIM at time of submission\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`document_type_id` INT(11) UNSIGNED NOT NULL,
	`year` YEAR NOT NULL,
	`abstract` TEXT NULL,
	`keywords` VARCHAR(500) NULL COMMENT \'Comma-separated keywords\',
	`supervisor` VARCHAR(255) NULL COMMENT \'Dosen pembimbing\',
	`publisher` VARCHAR(255) NULL COMMENT \'For journals and proceedings\',
	`cover_img` VARCHAR(255) NULL COMMENT \'UUID filename in storage/covers/\',
	`file_path` VARCHAR(255) NOT NULL COMMENT \'UUID filename in storage/pdf/\',
	`status` ENUM(\'draft\',\'submitted\',\'review\',\'revision\',\'published\',\'rejected\') NOT NULL DEFAULT \'draft\',
	`admin_note` TEXT NULL COMMENT \'Feedback from admin for revision or rejection\',
	`citations_count` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT \'Internal citations only — denormalized for performance\',
	`view_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`download_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`submitted_at` DATETIME NULL,
	`reviewed_at` DATETIME NULL,
	`published_at` DATETIME NULL,
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_documents` PRIMARY KEY(`id`),
	CONSTRAINT `documents_author_user_id_foreign` FOREIGN KEY (`author_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	CONSTRAINT `documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
	CONSTRAINT `documents_study_program_id_foreign` FOREIGN KEY (`study_program_id`) REFERENCES `study_programs`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	KEY `status` (`status`),
	KEY `document_type_id` (`document_type_id`),
	KEY `author_user_id` (`author_user_id`),
	KEY `study_program_id` (`study_program_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `documents` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(255) NOT NULL,
	`author_name` VARCHAR(255) NOT NULL COMMENT \'Cached from user_profiles.name at submission time\',
	`author_user_id` INT(11) UNSIGNED NULL COMMENT \'NULL if admin-uploaded without student association\',
	`nim` VARCHAR(30) NULL COMMENT \'NIM at time of submission\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`document_type_id` INT(11) UNSIGNED NOT NULL,
	`year` YEAR NOT NULL,
	`abstract` TEXT NULL,
	`keywords` VARCHAR(500) NULL COMMENT \'Comma-separated keywords\',
	`supervisor` VARCHAR(255) NULL COMMENT \'Dosen pembimbing\',
	`publisher` VARCHAR(255) NULL COMMENT \'For journals and proceedings\',
	`cover_img` VARCHAR(255) NULL COMMENT \'UUID filename in storage/covers/\',
	`file_path` VARCHAR(255) NOT NULL COMMENT \'UUID filename in storage/pdf/\',
	`status` ENUM(\'draft\',\'submitted\',\'review\',\'revision\',\'published\',\'rejected\') NOT NULL DEFAULT \'draft\',
	`admin_note` TEXT NULL COMMENT \'Feedback from admin for revision or rejection\',
	`citations_count` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT \'Internal citations only — denormalized for performance\',
	`view_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`download_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`submitted_at` DATETIME NULL,
	`reviewed_at` DATETIME NULL,
	`published_at` DATETIME NULL,
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_documents` PRIMARY KEY(`id`),
	CONSTRAINT `documents_author_user_id_foreign` FOREIGN KEY (`author_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	CONSTRAINT `documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
	CONSTRAINT `documents_study_program_id_foreign` FOREIGN KEY (`study_program_id`) REFERENCES `study_programs`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	KEY `status` (`status`),
	KEY `document_type_id` (`document_type_id`),
	KEY `author_user_id` (`author_user_id`),
	KEY `study_program_id` (`study_program_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `documents` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(255) NOT NULL,
	`author_name` VARCHAR(255) NOT NULL COMMENT \'Cached from user_profiles.name at submission time\',
	`author_user_id` INT(11) UNSIGNED NULL COMMENT \'NULL if admin-uploaded without student association\',
	`nim` VARCHAR(30) NULL COMMENT \'NIM at time of submission\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`document_type_id` INT(11) UNSIGNED NOT NULL,
	`year` YEAR NOT NULL,
	`abstract` TEXT NULL,
	`keywords` VARCHAR(500) NULL COMMENT \'Comma-separated keywords\',
	`supervisor` VARCHAR(255) NULL COMMENT \'Dosen pembimbing\',
	`publisher` VARCHAR(255) NULL COMMENT \'For journals and proceedings\',
	`cover_img` VARCHAR(255) NULL COMMENT \'UUID filename in storage/covers/\',
	`file_path` VARCHAR(255) NOT NULL COMMENT \'UUID filename in storage/pdf/\',
	`status` ENUM(\'draft\',\'submitted\',\'review\',\'revision\',\'published\',\'rejected\') NOT NULL DEFAULT \'draft\',
	`admin_note` TEXT NULL COMMENT \'Feedback from admin for revision or rejection\',
	`citations_count` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT \'Internal citations only — denormalized for performance\',
	`view_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`download_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`submitted_at` DATETIME NULL,
	`reviewed_at` DATETIME NULL,
	`published_at` DATETIME NULL,
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_documents` PRIMARY KEY(`id`),
	CONSTRAINT `documents_author_user_id_foreign` FOREIGN KEY (`author_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	CONSTRAINT `documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
	CONSTRAINT `documents_study_program_id_foreign` FOREIGN KEY (`study_program_id`) REFERENCES `study_programs`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	KEY `status` (`status`),
	KEY `document_type_id` (`document_type_id`),
	KEY `author_user_id` (`author_user_id`),
	KEY `study_program_id` (`study_program_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `documents` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(255) NOT NULL,
	`author_name` VARCHAR(255) NOT NULL COMMENT \'Cached from user_profiles.name at submission time\',
	`author_user_id` INT(11) UNSIGNED NULL COMMENT \'NULL if admin-uploaded without student association\',
	`nim` VARCHAR(30) NULL COMMENT \'NIM at time of submission\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`document_type_id` INT(11) UNSIGNED NOT NULL,
	`year` YEAR NOT NULL,
	`abstract` TEXT NULL,
	`keywords` VARCHAR(500) NULL COMMENT \'Comma-separated keywords\',
	`supervisor` VARCHAR(255) NULL COMMENT \'Dosen pembimbing\',
	`publisher` VARCHAR(255) NULL COMMENT \'For journals and proceedings\',
	`cover_img` VARCHAR(255) NULL COMMENT \'UUID filename in storage/covers/\',
	`file_path` VARCHAR(255) NOT NULL COMMENT \'UUID filename in storage/pdf/\',
	`status` ENUM(\'draft\',\'submitted\',\'review\',\'revision\',\'published\',\'rejected\') NOT NULL DEFAULT \'draft\',
	`admin_note` TEXT NULL COMMENT \'Feedback from admin for revision or rejection\',
	`citations_count` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT \'Internal citations only — denormalized for performance\',
	`view_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`download_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
	`submitted_at` DATETIME NULL,
	`reviewed_at` DATETIME NULL,
	`published_at` DATETIME NULL,
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_documents` PRIMARY KEY(`id`),
	CONSTRAINT `documents_author_user_id_foreign` FOREIGN KEY (`author_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	CONSTRAINT `documents_document_type_id_foreign` FOREIGN KEY (`document_type_id`) REFERENCES `document_types`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
	CONSTRAINT `documents_study_program_id_foreign` FOREIGN KEY (`study_program_id`) REFERENCES `study_programs`(`id`) ON DELETE CASCADE ON UPDATE SET NULL,
	KEY `status` (`status`),
	KEY `document_type_id` (`document_type_id`),
	KEY `author_user_id` (`author_user_id`),
	KEY `study_program_id` (`study_program_id`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000004_CreateDocuments.php(131): CodeIgniter\Database\Forge->createTable('documents')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateDocuments->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
12 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate', [...])
13 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
14 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
15 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 16:03:41 --> Can't create table `stt_repository`.`user_profiles` (errno: 150 "Foreign key constraint is incorrectly formed")
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(58): CodeIgniter\Database\Forge->createTable('user_profiles')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\Migrate->run([...])
12 SYSTEMPATH/CLI/BaseCommand.php(119): CodeIgniter\CLI\Commands->run('migrate', [...])
13 SYSTEMPATH/Commands/Database/MigrateRefresh.php(91): CodeIgniter\CLI\BaseCommand->call('migrate', [...])
14 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\MigrateRefresh->CodeIgniter\Commands\Database\{closure}()
15 SYSTEMPATH/Commands/Database/MigrateRefresh.php(89): CodeIgniter\Commands\Database\MigrateRefresh->withSignalsBlocked(Object(Closure))
16 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Commands\Database\MigrateRefresh->run([...])
17 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('migrate:refresh', [])
18 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
19 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
20 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
ERROR - 2026-03-23 16:05:08 --> Can't create table `stt_repository`.`user_profiles` (errno: 150 "Foreign key constraint is incorrectly formed")
in SYSTEMPATH/Database/MySQLi/Connection.php on line 300.
 1 SYSTEMPATH/Database/MySQLi/Connection.php(300): mysqli->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci', 0)
 2 SYSTEMPATH/Database/BaseConnection.php(910): CodeIgniter\Database\MySQLi\Connection->execute('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 3 SYSTEMPATH/Database/BaseConnection.php(827): CodeIgniter\Database\BaseConnection->simpleQuery('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 4 SYSTEMPATH/Database/Forge.php(570): CodeIgniter\Database\BaseConnection->query('CREATE TABLE `user_profiles` (
	`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
	`user_id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(150) NOT NULL,
	`identity_number` VARCHAR(30) NULL COMMENT \'NIM for students, NIDN for lecturers/admins\',
	`study_program_id` INT(11) UNSIGNED NULL,
	`role` ENUM(\'super_admin\',\'admin\',\'lecturer\',\'student\') NOT NULL DEFAULT \'student\',
	`status` ENUM(\'active\',\'inactive\') NOT NULL DEFAULT \'active\',
	`created_at` DATETIME NULL,
	`updated_at` DATETIME NULL,
	CONSTRAINT `pk_user_profiles` PRIMARY KEY(`id`),
	CONSTRAINT `user_profiles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
	UNIQUE KEY `user_id` (`user_id`),
	UNIQUE KEY `identity_number` (`identity_number`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci')
 5 APPPATH/Database/Migrations/2026-03-23-000001_CreateUserProfiles.php(58): CodeIgniter\Database\Forge->createTable('user_profiles')
 6 SYSTEMPATH/Database/MigrationRunner.php(1014): App\Database\Migrations\CreateUserProfiles->up()
 7 SYSTEMPATH/Database/MigrationRunner.php(202): CodeIgniter\Database\MigrationRunner->migrate('up', Object(stdClass))
 8 SYSTEMPATH/Commands/Database/Migrate.php(89): CodeIgniter\Database\MigrationRunner->latest(null)
 9 SYSTEMPATH/CLI/SignalTrait.php(245): CodeIgniter\Commands\Database\Migrate::CodeIgniter\Commands\Database\{closure}()
10 SYSTEMPATH/Commands/Database/Migrate.php(88): CodeIgniter\Commands\Database\Migrate->withSignalsBlocked(Object(Closure))
11 VENDORPATH/codeigniter4/shield/src/Commands/Setup.php(430): CodeIgniter\Commands\Database\Migrate->run([...])
12 VENDORPATH/codeigniter4/shield/src/Commands/Setup.php(97): CodeIgniter\Shield\Commands\Setup->runMigrations()
13 VENDORPATH/codeigniter4/shield/src/Commands/Setup.php(82): CodeIgniter\Shield\Commands\Setup->publishConfig()
14 SYSTEMPATH/CLI/Commands.php(74): CodeIgniter\Shield\Commands\Setup->run([])
15 SYSTEMPATH/CLI/Console.php(47): CodeIgniter\CLI\Commands->run('shield:setup', [])
16 SYSTEMPATH/Boot.php(442): CodeIgniter\CLI\Console->run()
17 SYSTEMPATH/Boot.php(166): CodeIgniter\Boot::runCommand(Object(CodeIgniter\CLI\Console))
18 ROOTPATH/spark(86): CodeIgniter\Boot::bootSpark(Object(Config\Paths))
DEBUG - 2026-03-23 16:20:35 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:20:37 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:20:44 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2026-03-23 16:20:44 --> CSRF token verified.
DEBUG - 2026-03-23 16:20:45 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:21:00 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2026-03-23 16:21:00 --> CSRF token verified.
DEBUG - 2026-03-23 16:21:01 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:21:15 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2026-03-23 16:21:15 --> CSRF token verified.
DEBUG - 2026-03-23 16:21:15 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:21:54 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:21:55 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:21:55 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:21:56 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:22:02 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
DEBUG - 2026-03-23 16:22:05 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
CRITICAL - 2026-03-23 19:46:00 --> CodeIgniter\HTTP\Exceptions\BadRequestException: The URI you submitted has disallowed characters: "css2?family=Kreon:wght@400;600;700&display=swap"
[Method: GET, Route: https:/fonts.googleapis.com/css2%3Ffamily=Kreon:wght@400;600;700&display=swap]
in SYSTEMPATH/Router/Router.php on line 768.
 1 SYSTEMPATH/Router/Router.php(219): CodeIgniter\Router\Router->checkDisallowedChars('https:/fonts.googleapis.com/css2?family=Kreon:wght@400;600;700&display=swap')
 2 SYSTEMPATH/CodeIgniter.php(829): CodeIgniter\Router\Router->handle('https:/fonts.googleapis.com/css2?family=Kreon:wght@400;600;700&display=swap')
 3 SYSTEMPATH/CodeIgniter.php(441): CodeIgniter\CodeIgniter->tryToRouteIt(Object(CodeIgniter\Router\RouteCollection))
 4 SYSTEMPATH/CodeIgniter.php(340): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
 5 SYSTEMPATH/Boot.php(417): CodeIgniter\CodeIgniter->run()
 6 SYSTEMPATH/Boot.php(68): CodeIgniter\Boot::runCodeIgniter(Object(CodeIgniter\CodeIgniter))
 7 FCPATH/index.php(38): CodeIgniter\Boot::bootWeb(Object(Config\Paths))
CRITICAL - 2026-03-23 20:37:32 --> CodeIgniter\HTTP\Exceptions\BadRequestException: The URI you submitted has disallowed characters: "css2?family=Kreon:wght@400;600;700&display=swap"
[Method: GET, Route: https:/fonts.googleapis.com/css2%3Ffamily=Kreon:wght@400;600;700&display=swap]
in SYSTEMPATH/Router/Router.php on line 768.
 1 SYSTEMPATH/Router/Router.php(219): CodeIgniter\Router\Router->checkDisallowedChars('https:/fonts.googleapis.com/css2?family=Kreon:wght@400;600;700&display=swap')
 2 SYSTEMPATH/CodeIgniter.php(829): CodeIgniter\Router\Router->handle('https:/fonts.googleapis.com/css2?family=Kreon:wght@400;600;700&display=swap')
 3 SYSTEMPATH/CodeIgniter.php(441): CodeIgniter\CodeIgniter->tryToRouteIt(Object(CodeIgniter\Router\RouteCollection))
 4 SYSTEMPATH/CodeIgniter.php(340): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
 5 SYSTEMPATH/Boot.php(417): CodeIgniter\CodeIgniter->run()
 6 SYSTEMPATH/Boot.php(68): CodeIgniter\Boot::runCodeIgniter(Object(CodeIgniter\CodeIgniter))
 7 FCPATH/index.php(38): CodeIgniter\Boot::bootWeb(Object(Config\Paths))
