Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2016-06-04 16:33:23 +0100
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Commit
44e337cef632807d25fd426af72a72c98fd22ecf
44e337ce
2 parents
eec9c055
1bec3eaa
Merged branch rovox-master into master
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
database/migrations/2015_07_12_114933_create_books_table.php
database/migrations/2015_07_12_190027_create_pages_table.php
database/migrations/2015_07_27_172342_create_chapters_table.php
database/migrations/2015_07_12_114933_create_books_table.php
View file @
44e337c
...
...
@@ -12,7 +12,13 @@ class CreateBooksTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'books'
,
function
(
Blueprint
$table
)
{
$pdo
=
\DB
::
connection
()
->
getPdo
();
$mysqlVersion
=
$pdo
->
getAttribute
(
PDO
::
ATTR_SERVER_VERSION
);
$requiresISAM
=
strpos
(
$mysqlVersion
,
'5.5'
)
===
0
;
Schema
::
create
(
'books'
,
function
(
Blueprint
$table
)
use
(
$requiresISAM
)
{
if
(
$requiresISAM
)
$table
->
engine
=
'MyISAM'
;
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
);
$table
->
string
(
'slug'
)
->
indexed
();
...
...
database/migrations/2015_07_12_190027_create_pages_table.php
View file @
44e337c
...
...
@@ -12,7 +12,13 @@ class CreatePagesTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'pages'
,
function
(
Blueprint
$table
)
{
$pdo
=
\DB
::
connection
()
->
getPdo
();
$mysqlVersion
=
$pdo
->
getAttribute
(
PDO
::
ATTR_SERVER_VERSION
);
$requiresISAM
=
strpos
(
$mysqlVersion
,
'5.5'
)
===
0
;
Schema
::
create
(
'pages'
,
function
(
Blueprint
$table
)
use
(
$requiresISAM
)
{
if
(
$requiresISAM
)
$table
->
engine
=
'MyISAM'
;
$table
->
increments
(
'id'
);
$table
->
integer
(
'book_id'
);
$table
->
integer
(
'chapter_id'
);
...
...
database/migrations/2015_07_27_172342_create_chapters_table.php
View file @
44e337c
...
...
@@ -12,7 +12,12 @@ class CreateChaptersTable extends Migration
*/
public
function
up
()
{
Schema
::
create
(
'chapters'
,
function
(
Blueprint
$table
)
{
$pdo
=
\DB
::
connection
()
->
getPdo
();
$mysqlVersion
=
$pdo
->
getAttribute
(
PDO
::
ATTR_SERVER_VERSION
);
$requiresISAM
=
strpos
(
$mysqlVersion
,
'5.5'
)
===
0
;
Schema
::
create
(
'chapters'
,
function
(
Blueprint
$table
)
use
(
$requiresISAM
)
{
if
(
$requiresISAM
)
$table
->
engine
=
'MyISAM'
;
$table
->
increments
(
'id'
);
$table
->
integer
(
'book_id'
);
$table
->
string
(
'slug'
)
->
indexed
();
...
...
Please
register
or
sign in
to post a comment