fixes
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
//Migrations acts as a version control for the database allowing you to modify the app's database schema
|
||||
|
||||
//allows use of necessary libraries
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateResource extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('resources', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string("filename")->unique();
|
||||
$table->unsignedInteger("extension_id");
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreignid("extension_id")->constrained("resource_extensions", "id");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('resources');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user