Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test-project
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Junaid Rahman pv
test-project
Commits
f50df33e
Commit
f50df33e
authored
Aug 31, 2016
by
Junaid Rahman pv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified migrations for business and location(state,district)
parent
bdd0e60a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
m160831_080848_location.php
common/migrations/db/m160831_080848_location.php
+3
-1
m160831_092919_business.php
common/migrations/db/m160831_092919_business.php
+6
-10
No files found.
common/migrations/db/m160831_080848_location.php
View file @
f50df33e
...
...
@@ -31,7 +31,6 @@ class m160831_080848_location extends Migration
],
$tableOptions
);
$this
->
createIndex
(
'idx_state_name'
,
'{{%state}}'
,
'name'
);
$this
->
createIndex
(
'idx_state_id'
,
'{{%district}}'
,
'state_id'
);
$this
->
createIndex
(
'idx_district_name'
,
'{{%district}}'
,
'name'
);
$this
->
addForeignKey
(
'fk_state_id'
,
'{{%district}}'
,
'state_id'
,
'{{%state}}'
,
'id'
,
'RESTRICT'
,
'RESTRICT'
);
...
...
@@ -42,6 +41,9 @@ class m160831_080848_location extends Migration
{
$this
->
dropForeignKey
(
'fk_state_id'
,
'{{%district}}'
);
$this
->
dropIndex
(
'idx_district_name'
,
'{{%district}}'
);
$this
->
dropIndex
(
'idx_state_name'
,
'{{%state}}'
);
$this
->
dropTable
(
'{{%district}}'
);
$this
->
dropTable
(
'{{%state}}'
);
}
...
...
common/migrations/db/m160831_092919_business.php
View file @
f50df33e
...
...
@@ -13,18 +13,18 @@ class m160831_092919_business extends Migration
$this
->
createTable
(
'{{%business}}'
,
[
'id'
=>
$this
->
primaryKey
(),
'category_id'
=>
$this
->
integer
()
->
notNull
()
,
'district_id'
=>
$this
->
integer
()
->
notNull
()
,
'category_id'
=>
$this
->
integer
(),
'district_id'
=>
$this
->
integer
(),
'domain_name'
=>
$this
->
string
(
255
)
->
notNull
(),
'name'
=>
$this
->
string
(
512
),
'name'
=>
$this
->
string
(
512
)
->
notNull
()
,
'slug'
=>
$this
->
string
(
1024
),
'address'
=>
$this
->
string
(
1024
),
'address'
=>
$this
->
string
(
1024
)
->
notNull
()
,
'landmark'
=>
$this
->
string
(
500
),
'mobile_no'
=>
$this
->
string
(
512
),
'mobile_no'
=>
$this
->
string
(
512
)
->
notNull
()
,
'toll_free_no'
=>
$this
->
string
(
512
),
'contact_no'
=>
$this
->
string
(
150
),
'fax'
=>
$this
->
string
(
512
),
'email'
=>
$this
->
string
(
1024
),
'email'
=>
$this
->
string
(
1024
)
->
notNull
()
,
'website'
=>
$this
->
string
(
1024
),
'description'
=>
$this
->
text
(),
'logo_base_url'
=>
$this
->
string
(
1024
),
...
...
@@ -36,8 +36,6 @@ class m160831_092919_business extends Migration
'updated_at'
=>
$this
->
integer
(
11
),
],
$tableOptions
);
$this
->
createIndex
(
'idx-business-category_id'
,
'{{%business}}'
,
'category_id'
);
$this
->
createIndex
(
'idx-business-district_id'
,
'{{%business}}'
,
'district_id'
);
$this
->
createIndex
(
'idx-business-domain_name'
,
'{{%business}}'
,
'domain_name'
);
$this
->
createIndex
(
'idx-business-email'
,
'{{%business}}'
,
'email'
);
...
...
@@ -53,8 +51,6 @@ class m160831_092919_business extends Migration
$this
->
dropIndex
(
'idx-business-email'
,
'{{%business}}'
);
$this
->
dropIndex
(
'idx-business-domain_name'
,
'{{%business}}'
);
$this
->
dropIndex
(
'idx-business-district_id'
,
'{{%business}}'
);
$this
->
dropIndex
(
'idx-business-category_id'
,
'{{%business}}'
);
$this
->
dropTable
(
'{{%business}}'
);
}
...
...
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