tmp commit
This commit is contained in:
@ -15,7 +15,10 @@ class m221108_135514_create_document_template_table extends Migration
|
||||
$this->createTable('{{%document_template}}', [
|
||||
'id' => $this->primaryKey(),
|
||||
'title' => $this->string(),
|
||||
'template_body' => $this->text()
|
||||
'template_body' => $this->text(),
|
||||
'status' => $this->integer(),
|
||||
'created_at' => $this->dateTime(),
|
||||
'updated_at' => $this->dateTime(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -15,15 +15,21 @@ class m221108_135939_create_document_table extends Migration
|
||||
$this->createTable('{{%document}}', [
|
||||
'id' => $this->primaryKey(),
|
||||
'company_id' => $this->integer(11)->notNull(),
|
||||
'contractor_company_id' => $this->integer(11),
|
||||
'contractor_company_id' => $this->integer(11)->notNull(),
|
||||
'manager_id' => $this->integer(11)->notNull(),
|
||||
'contractor_manager_id' => $this->integer(11)->notNull(),
|
||||
'template_id' => $this->integer(11)->notNull(),
|
||||
'title' => $this->string(),
|
||||
'body' => $this->text(),
|
||||
'created_at' => $this->dateTime(),
|
||||
'updated_at' => $this->dateTime(),
|
||||
]);
|
||||
|
||||
$this->addForeignKey('company_document', 'document', 'company_id', 'company', 'id');
|
||||
$this->addForeignKey('contractor_company_document', 'document', 'contractor_company_id', 'company', 'id');
|
||||
$this->addForeignKey('manager_document', 'document', 'manager_id','manager', 'id');
|
||||
$this->addForeignKey('contractor_manager_document', 'document', 'contractor_manager_id','manager', 'id');
|
||||
$this->addForeignKey('document_template_document', 'document', 'template_id','document_template', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user