From b9ccdb6f2709ac4bd03df575681f850f2bcaa5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 21 Jul 2018 19:57:47 +0200 Subject: [PATCH] add columns field to revision, remove index_column --- app/Http/Controllers/TableController.php | 3 +++ .../migrations/2018_07_08_193600_create_revisions_table.php | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/TableController.php b/app/Http/Controllers/TableController.php index b27fb56..f6b7513 100644 --- a/app/Http/Controllers/TableController.php +++ b/app/Http/Controllers/TableController.php @@ -51,6 +51,9 @@ class TableController extends Controller ]); } + // Now we create rows, a revision pointing to them, and the table using it. + + return "Ok."; } } diff --git a/database/migrations/2018_07_08_193600_create_revisions_table.php b/database/migrations/2018_07_08_193600_create_revisions_table.php index 26edba8..2b32f8f 100644 --- a/database/migrations/2018_07_08_193600_create_revisions_table.php +++ b/database/migrations/2018_07_08_193600_create_revisions_table.php @@ -19,8 +19,9 @@ class CreateRevisionsTable extends Migration $table->unsignedInteger('refs'); // used for reference counting $table->unsignedInteger('ancestor_id')->index()->nullable(); // parent revision - // a column that can be used as the primary key for a table; possibly a composite column, if using a comma - $table->string('index_column'); + // columns specification + // array with: {name, title, type} + $table->jsonb('columns'); // author's note describing what has been changed $table->text('note');