recreate project

This commit is contained in:
root
2026-02-10 22:11:06 -05:00
commit 663c0cdbda
10149 changed files with 1379710 additions and 0 deletions
@@ -0,0 +1,69 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CreateGradingLocks extends Migration
{
public function up()
{
if ($this->db->tableExists('grading_locks')) {
return;
}
$this->forge->addField([
'id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'auto_increment' => true,
],
'class_section_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'semester' => [
'type' => 'VARCHAR',
'constraint' => 20,
],
'school_year' => [
'type' => 'VARCHAR',
'constraint' => 9,
],
'is_locked' => [
'type' => 'TINYINT',
'constraint' => 1,
'default' => 0,
],
'locked_by' => [
'type' => 'INT',
'constraint' => 11,
'null' => true,
],
'locked_at' => [
'type' => 'DATETIME',
'null' => true,
],
'created_at' => [
'type' => 'DATETIME',
'null' => true,
],
'updated_at' => [
'type' => 'DATETIME',
'null' => true,
],
]);
$this->forge->addKey('id', true);
$this->forge->addKey(['class_section_id', 'semester', 'school_year'], false, false, 'idx_grading_locks_section_term');
$this->forge->addUniqueKey(['class_section_id', 'semester', 'school_year'], 'uniq_grading_locks_section_term');
$this->forge->createTable('grading_locks', true);
}
public function down()
{
$this->forge->dropTable('grading_locks', true);
}
}