prework
This commit is contained in:
parent
d9f9768074
commit
2580d64d9e
@ -53,7 +53,7 @@ class CreateOrdersTable extends Migration {
|
|||||||
$this->forge->addField([
|
$this->forge->addField([
|
||||||
'OrderStatID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
|
'OrderStatID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
|
||||||
'InternalOID' => ['type' => 'INT', 'null' => false],
|
'InternalOID' => ['type' => 'INT', 'null' => false],
|
||||||
'OrderStatus' => ['type' => 'varchar', 'constraint'=>2, 'null' => false],
|
'OrderStatus' => ['type' => 'INT', 'null' => false],
|
||||||
'CreateDate' => ['type' => 'Datetime', 'null' => true],
|
'CreateDate' => ['type' => 'Datetime', 'null' => true],
|
||||||
'EndDate' => ['type' => 'Datetime', 'null' => true],
|
'EndDate' => ['type' => 'Datetime', 'null' => true],
|
||||||
'ArchiveDate' => ['type' => 'Datetime', 'null' => true],
|
'ArchiveDate' => ['type' => 'Datetime', 'null' => true],
|
||||||
92
app/Database/Migrations/2025-12-11-100002_PatRes.php
Normal file
92
app/Database/Migrations/2025-12-11-100002_PatRes.php
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Database\Migrations;
|
||||||
|
|
||||||
|
use CodeIgniter\Database\Migration;
|
||||||
|
|
||||||
|
class CreatePatresTables extends Migration {
|
||||||
|
public function up() {
|
||||||
|
$this->forge->addField([
|
||||||
|
'ResultID' => ['type' => 'INT', 'auto_increment' => true],
|
||||||
|
'SiteID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'OrderID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'InternalSID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'SID' => ['type' => 'varchar', 'constraint' => 30],
|
||||||
|
'SampleID' => ['type' => 'varchar', 'constraint' => 30],
|
||||||
|
'TestSiteID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'TestSiteCode' => ['type' => 'CHAR', 'constraint' => 6, 'null' => true],
|
||||||
|
'AspCnt' => ['type' => 'INT', 'default' => 1, 'null' => true],
|
||||||
|
'Result' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
|
||||||
|
'SampleType' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
|
||||||
|
'ResultDateTime' => ['type' => 'DATETIME'],
|
||||||
|
'WorkstationID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'EquipmentID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'RefNumID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'RefTHoldID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'RefVSetID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'RefTxtID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'CreateDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'EndDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'ArchiveDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'DelDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
]);
|
||||||
|
$this->forge->addPrimaryKey('ResultID');
|
||||||
|
$this->forge->createTable('patres');
|
||||||
|
|
||||||
|
$this->forge->addField([
|
||||||
|
'ResFlagID' => ['type' => 'INT', 'auto_increment' => true],
|
||||||
|
'ResultID' => ['type' => 'INT', 'null' => false],
|
||||||
|
'Flag' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
|
||||||
|
'CreateDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'EndDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'ArchiveDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'DelDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
]);
|
||||||
|
$this->forge->addPrimaryKey('ResFlagID');
|
||||||
|
$this->forge->createTable('patresflag');
|
||||||
|
|
||||||
|
$this->forge->addField([
|
||||||
|
'ResStatusID' => ['type' => 'INT', 'auto_increment' => true],
|
||||||
|
'ResultID' => ['type' => 'INT', 'null' => false],
|
||||||
|
'SID' => ['type' => 'varchar', 'constraint' => 30],
|
||||||
|
'TestAct' => ['type' => 'varchar', 'constraint' => 255],
|
||||||
|
'ActRes' => ['type' => 'INT', 'null' => true],
|
||||||
|
'TestStatus' => ['type' => 'INT', 'null' => true],
|
||||||
|
'CurrSiteID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'CurrLocID' => ['type' => 'INT', 'null' => true],
|
||||||
|
'Origin' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
|
||||||
|
'GeoLocationSystem' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
|
||||||
|
'GeoLocationData' => ['type' => 'TEXT', 'null' => true],
|
||||||
|
'DIDType' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
|
||||||
|
'DID' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
|
||||||
|
'UserID' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
|
||||||
|
'LogDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'EndDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'ArchiveDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
]);
|
||||||
|
$this->forge->addPrimaryKey('ResStatusID');
|
||||||
|
$this->forge->createTable('patrestatus');
|
||||||
|
|
||||||
|
$this->forge->addField([
|
||||||
|
'FlagDefID' => ['type' => 'INT', 'auto_increment' => true],
|
||||||
|
'InstrumentName' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
|
||||||
|
'Flag' => ['type' => 'varchar', 'constraint' => 50, 'null' => true],
|
||||||
|
'FlagText' => ['type' => 'varchar', 'constraint' => 100, 'null' => true],
|
||||||
|
'FlagDesc' => ['type' => 'varchar', 'constraint' => 255, 'null' => true],
|
||||||
|
'OnScreen' => ['type' => 'int', 'null' => true],
|
||||||
|
'OnResult' => ['type' => 'int', 'null' => true],
|
||||||
|
'CreateDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
'EndDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
]);
|
||||||
|
$this->forge->addPrimaryKey('FlagDefID');
|
||||||
|
$this->forge->createTable('flagdef');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down() {
|
||||||
|
$this->forge->dropTable('flagdef', true);
|
||||||
|
$this->forge->dropTable('patrestatus', true);
|
||||||
|
$this->forge->dropTable('patrestech', true);
|
||||||
|
$this->forge->dropTable('patresflag', true);
|
||||||
|
$this->forge->dropTable('patres', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user