Skip to content
Snippets Groups Projects
Commit 3402c095 authored by Kurniandha Sukma Yunastrian's avatar Kurniandha Sukma Yunastrian
Browse files

edit migration

parent c04b13d1
Branches
1 merge request!8Finalize
...@@ -18,6 +18,7 @@ class CreateTopicsTable extends Migration ...@@ -18,6 +18,7 @@ class CreateTopicsTable extends Migration
$table->bigInteger('id_course')->unsigned(); $table->bigInteger('id_course')->unsigned();
$table->string('name'); $table->string('name');
$table->string('content'); $table->string('content');
$table->string('id_spreadsheet');
$table->foreign('id_course')->references('id')->on('courses'); $table->foreign('id_course')->references('id')->on('courses');
}); });
......
...@@ -14,13 +14,13 @@ class CreateSpreadsheetsTable extends Migration ...@@ -14,13 +14,13 @@ class CreateSpreadsheetsTable extends Migration
public function up() public function up()
{ {
Schema::create('spreadsheets', function (Blueprint $table) { Schema::create('spreadsheets', function (Blueprint $table) {
$table->bigInteger('id_topic')->unsigned(); $table->string('id');
$table->string('cell'); $table->string('cell');
$table->string('value'); $table->string('value');
$table->string('type'); $table->string('type');
$table->primary(['id_topic', 'cell']); $table->primary(['id', 'cell']);
$table->foreign('id_topic')->references('id')->on('topics'); $table->foreign('id')->references('id_spreadsheet')->on('topics');
}); });
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment