From 4c2d4e55e4f586a69ee7e854ded614185c5b017c Mon Sep 17 00:00:00 2001 From: mahdahar <89adham@gmail.com> Date: Mon, 22 Sep 2025 16:22:20 +0700 Subject: [PATCH] add counter table --- .../Migrations/2025-09-22-155700_Counter.php | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 app/Database/Migrations/2025-09-22-155700_Counter.php diff --git a/app/Database/Migrations/2025-09-22-155700_Counter.php b/app/Database/Migrations/2025-09-22-155700_Counter.php new file mode 100644 index 0000000..8651488 --- /dev/null +++ b/app/Database/Migrations/2025-09-22-155700_Counter.php @@ -0,0 +1,27 @@ +forge->addField([ + 'CounterID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], + 'CounterValue' => ['type' => 'INT', 'null' => false], + 'CounterStart' => ['type' => 'INT', 'null' => false], + 'CounterEnd' => ['type' => 'INT', 'null' => false], + 'CounterDesc' => ['type' => 'varchar', 'constraint' => 255, 'null' => true], + 'CounterReset' => ['type' => 'varchar', 'constraint' => 1, 'null' => true], + 'EndDate' => ['type' => 'DATETIME', 'null' => true] + ]); + $this->forge->addField('CreateDate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP'); + $this->forge->addKey('CounterID', true); + $this->forge->createTable('counter'); + } + + public function down() { + $this->forge->dropTable('counter'); + } +} \ No newline at end of file