Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Alto
/
rkn
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit c3ad4cd5
authored
2021-06-07 15:44:29 +0300
by
san58
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
добавил миграцию по TIX
1 parent
f3773981
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
migrations/m210607_123711_add_host_tix_date_status.php
migrations/m210607_123711_add_host_tix_date_status.php
0 → 100644
View file @
c3ad4cd
<?php
use
yii\db\Migration
;
/**
* Class m210607_123711_add_host_tix_date_status
*/
class
m210607_123711_add_host_tix_date_status
extends
Migration
{
/**
* {@inheritdoc}
*/
public
function
safeUp
()
{
$this
->
addColumn
(
'{{%host}}'
,
'tix_status'
,
$this
->
tinyInteger
(
1
)
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'Статус проверки стоимости'
));
$this
->
addColumn
(
'{{%host}}'
,
'tix_date'
,
$this
->
dateTime
()
->
null
()
->
comment
(
'Дата проверки стоимости домена'
));
$this
->
createIndex
(
'idx-tix_status'
,
'{{%host}}'
,
'tix_status'
);
$this
->
createIndex
(
'idx-status'
,
'{{%host}}'
,
'status'
);
}
/**
* {@inheritdoc}
*/
public
function
safeDown
()
{
$this
->
dropIndex
(
'idx-status'
,
'{{%host}}'
);
$this
->
dropIndex
(
'idx-tix_status'
,
'{{%host}}'
);
$this
->
dropColumn
(
'{{%host}}'
,
'tix_date'
);
$this
->
dropColumn
(
'{{%host}}'
,
'tix_status'
);
}
}
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment