1 |
344b1e53
|
zabran
|
<?php
|
2 |
|
|
|
3 |
|
|
use Illuminate\Database\Migrations\Migration;
|
4 |
|
|
use Illuminate\Database\Schema\Blueprint;
|
5 |
|
|
use Illuminate\Support\Facades\Schema;
|
6 |
|
|
|
7 |
|
|
class CreateMetadataTable extends Migration
|
8 |
|
|
{
|
9 |
|
|
/**
|
10 |
|
|
* Run the migrations.
|
11 |
|
|
*
|
12 |
|
|
* @return void
|
13 |
|
|
*/
|
14 |
|
|
public function up()
|
15 |
|
|
{
|
16 |
|
|
Schema::create('metadata', function (Blueprint $table) {
|
17 |
|
|
$table->id();
|
18 |
|
|
$table->integer('artefact_id')->unsigned();
|
19 |
|
|
$table->foreign('artefact_id')->references('id')->on('artefacts');
|
20 |
|
|
|
21 |
|
|
$table->string('name');
|
22 |
|
|
$table->longText('noteCZ');
|
23 |
|
|
$table->longText('noteEN');
|
24 |
|
|
|
25 |
|
|
$table->integer('page');
|
26 |
|
|
$table->integer('likes');
|
27 |
|
|
});
|
28 |
|
|
}
|
29 |
|
|
|
30 |
|
|
/**
|
31 |
|
|
* Reverse the migrations.
|
32 |
|
|
*
|
33 |
|
|
* @return void
|
34 |
|
|
*/
|
35 |
|
|
public function down()
|
36 |
|
|
{
|
37 |
|
|
Schema::dropIfExists('metadata');
|
38 |
|
|
}
|
39 |
|
|
}
|