mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-09-13 13:04:52 +00:00
43 lines
912 B
PHP
43 lines
912 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
||
|
class CreateFilesTable extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('files', function (Blueprint $table) {
|
||
|
$table->increments('id');
|
||
|
$table->string('name');
|
||
|
$table->string('path');
|
||
|
$table->integer('uploaded_to');
|
||
|
|
||
|
$table->boolean('external');
|
||
|
$table->integer('order');
|
||
|
|
||
|
$table->integer('created_by');
|
||
|
$table->integer('updated_by');
|
||
|
|
||
|
$table->index('uploaded_to');
|
||
|
$table->timestamps();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::dropIfExists('files');
|
||
|
}
|
||
|
}
|