develop
Last change
on this file since c6b84df was c6b84df, checked in by beratkjufliju <kufliju@…>, 3 years ago |
added fileTypes controller, notifications, excel export, edited views
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[24a616f] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | use Illuminate\Database\Migrations\Migration;
|
---|
| 4 | use Illuminate\Database\Schema\Blueprint;
|
---|
| 5 | use Illuminate\Support\Facades\Schema;
|
---|
| 6 |
|
---|
[c6b84df] | 7 | class CreateFoldersTable extends Migration
|
---|
[24a616f] | 8 | {
|
---|
| 9 | /**
|
---|
| 10 | * Run the migrations.
|
---|
| 11 | *
|
---|
| 12 | * @return void
|
---|
| 13 | */
|
---|
| 14 | public function up()
|
---|
| 15 | {
|
---|
[c6b84df] | 16 | Schema::create('folders', function (Blueprint $table) {
|
---|
[24a616f] | 17 | $table->bigIncrements('id');
|
---|
| 18 | $table->string("arch_id")->unique();
|
---|
| 19 | $table->string("name");
|
---|
[c6b84df] | 20 | $table->text("note")->nullable();
|
---|
| 21 | $table->string("location");
|
---|
[24a616f] | 22 | $table->integer("user_id")->unsigned();
|
---|
| 23 | $table->integer("department_id")->unsigned();
|
---|
[c6b84df] | 24 | $table->boolean("is_important")->default(false);
|
---|
[24a616f] | 25 | $table->timestamps();
|
---|
| 26 |
|
---|
| 27 | $table->foreign("user_id")->references("id")->on("users")->onDelete("cascade")->onUpdate("cascade");
|
---|
| 28 | $table->foreign("department_id")->references("id")->on("departments")->onDelete("cascade")->onUpdate("cascade");
|
---|
| 29 | });
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | /**
|
---|
| 33 | * Reverse the migrations.
|
---|
| 34 | *
|
---|
| 35 | * @return void
|
---|
| 36 | */
|
---|
| 37 | public function down()
|
---|
| 38 | {
|
---|
[c6b84df] | 39 | Schema::dropIfExists('folders');
|
---|
[24a616f] | 40 | }
|
---|
| 41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.