Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7dead511
authored
Jun 10, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix migration
1 parent
09b535b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
database/migrations/2021_06_02_10638_create_goal_ad_groups_table.php
database/migrations/2021_06_07_08638_create_keywords_table.php
database/migrations/2021_06_02_10638_create_goal_ad_groups_table.php
View file @
7dead51
...
...
@@ -26,7 +26,6 @@ class CreateGoalAdGroupsTable extends Migration
$table
->
timestamp
(
'updated_need'
)
->
nullable
();
$table
->
timestamp
(
'updated_self'
)
->
nullable
();
$table
->
timestamps
();
$table
->
timestamps
();
$table
->
foreign
(
'dictionary_campaign_id'
)
->
references
(
'id'
)
->
on
(
'dictionary_campaigns'
)
...
...
database/migrations/2021_06_07_08638_create_keywords_table.php
View file @
7dead51
...
...
@@ -14,6 +14,22 @@ class CreateKeywordsTable extends Migration
*/
public
function
up
()
{
if
(
Schema
::
hasTable
(
'goal_ad_groups'
)
&&
Schema
::
hasColumn
(
'goal_ad_groups'
,
'campaign_external_id'
))
{
Schema
::
create
(
'goal_ad_groups'
,
function
(
Blueprint
$table
)
{
$table
->
renameColumn
(
'campaign_external_id'
,
'dictionary_campaign_external_id'
);
});
}
if
(
Schema
::
hasTable
(
'ad_groups'
)
&&
!
Schema
::
hasColumn
(
'ad_groups'
,
'keywords_loaded_at'
))
{
Schema
::
create
(
'ad_groups'
,
function
(
Blueprint
$table
)
{
$table
->
timestamp
(
'keywords_loaded_at'
)
->
nullable
();
});
}
Schema
::
create
(
'keywords'
,
function
(
Blueprint
$table
)
{
$table
->
id
();
$table
->
bigInteger
(
'external_id'
);
...
...
Write
Preview
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