mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Merged branch rovox-master into master
This commit is contained in:
commit
44e337cef6
@ -12,7 +12,13 @@ class CreateBooksTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
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->increments('id');
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('slug')->indexed();
|
$table->string('slug')->indexed();
|
||||||
|
@ -12,7 +12,13 @@ class CreatePagesTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
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->increments('id');
|
||||||
$table->integer('book_id');
|
$table->integer('book_id');
|
||||||
$table->integer('chapter_id');
|
$table->integer('chapter_id');
|
||||||
|
@ -12,7 +12,12 @@ class CreateChaptersTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
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->increments('id');
|
||||||
$table->integer('book_id');
|
$table->integer('book_id');
|
||||||
$table->string('slug')->indexed();
|
$table->string('slug')->indexed();
|
||||||
|
Loading…
Reference in New Issue
Block a user