hh
This commit is contained in:
32
console/migrations/m181121_103329_create_hh_table.php
Normal file
32
console/migrations/m181121_103329_create_hh_table.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Handles the creation of table `hh`.
|
||||
*/
|
||||
class m181121_103329_create_hh_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->createTable('hh', [
|
||||
'id' => $this->primaryKey(),
|
||||
'hh_id' => $this->integer(11),
|
||||
'url' => $this->string(255)->notNull(),
|
||||
'title' => $this->string(255),
|
||||
'dt_add' => $this->integer(11),
|
||||
'photo' => $this->string(255)
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropTable('hh');
|
||||
}
|
||||
}
|
36
console/migrations/m181121_112940_create_hh_job_table.php
Normal file
36
console/migrations/m181121_112940_create_hh_job_table.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Handles the creation of table `hh_job`.
|
||||
*/
|
||||
class m181121_112940_create_hh_job_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->createTable('hh_job', [
|
||||
'id' => $this->primaryKey(),
|
||||
'employer_id' => $this->integer(11),
|
||||
'hh_id' => $this->integer(11),
|
||||
'title' => $this->string(255),
|
||||
'url' => $this->string(255),
|
||||
'salary_from' => $this->integer(11),
|
||||
'salary_to' => $this->integer(11),
|
||||
'salary_currency' => $this->string(100),
|
||||
'address' => $this->string(255),
|
||||
'dt_add' => $this->integer(11)
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropTable('hh_job');
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Handles adding hh_id to table `project`.
|
||||
*/
|
||||
class m181121_135329_add_hh_id_column_to_project_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->addColumn('project', 'hh_id', $this->integer(11));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropColumn('project', 'hh_id');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user