Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
d20e80c2
Commit
d20e80c2
authored
Mar 24, 2016
by
Shakarim Sapa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Добавлена миграция для таблицы cases_sending_schedule
parent
bac0259c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
console/migrations/m160324_145913_add_the_cases_sending_schedule_table.php
...s/m160324_145913_add_the_cases_sending_schedule_table.php
+60
-0
No files found.
console/migrations/m160324_145913_add_the_cases_sending_schedule_table.php
0 → 100644
View file @
d20e80c2
<?php
use
yii\db\Migration
;
class
m160324_145913_add_the_cases_sending_schedule_table
extends
Migration
{
// Use safeUp/safeDown to run migration code within a transaction
public
function
safeUp
()
{
$this
->
createTable
(
'cases_schedule'
,
[
'id'
=>
$this
->
primaryKey
(),
'user_id'
=>
$this
->
integer
(
11
)
->
notNull
(),
'case_id'
=>
$this
->
integer
(
11
)
->
notNull
(),
'template_id'
=>
$this
->
integer
(
11
)
->
defaultValue
(
null
),
'send_date'
=>
$this
->
date
()
->
notNull
(),
'sended_date'
=>
$this
->
dateTime
()
->
defaultValue
(
null
),
'sended'
=>
$this
->
boolean
()
->
defaultValue
(
0
),
'actual'
=>
$this
->
boolean
()
->
defaultValue
(
1
)
]
);
$this
->
addForeignKey
(
'fk_cases_schedule_user'
,
'cases_schedule'
,
'user_id'
,
'users'
,
'id'
);
$this
->
addForeignKey
(
'fk_cases_schedule_case_id'
,
'cases_schedule'
,
'case_id'
,
'co_content'
,
'id'
);
$this
->
addForeignKey
(
'fk_cases_schedule_template_id'
,
'cases_schedule'
,
'template_id'
,
'message_template'
,
'id'
);
}
public
function
safeDown
()
{
$this
->
dropForeignKey
(
'fk_cases_schedule_user'
,
'cases_schedule'
);
$this
->
dropForeignKey
(
'fk_cases_schedule_case_id'
,
'cases_schedule'
);
$this
->
dropForeignKey
(
'fk_cases_schedule_template_id'
,
'cases_schedule'
);
$this
->
dropTable
(
'cases_schedule'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment