diff options
author | Camil Staps | 2019-12-30 16:57:13 +0100 |
---|---|---|
committer | Camil Staps | 2020-01-03 19:06:02 +0100 |
commit | ad10a6467f76822b9289832eeb0d0ac2038b32d1 (patch) | |
tree | 1d78251ad49be1a744dc4573a1b3cf54e295e3a4 /database/migrations | |
parent | Clarify incorrect parsing message when input is short (diff) |
Strip down for simple app for Greek verb λύω
Diffstat (limited to 'database/migrations')
14 files changed, 22 insertions, 397 deletions
diff --git a/database/migrations/2016_01_04_143639_create_stems_table.php b/database/migrations/2016_01_04_143639_create_modes_table.php index 539aa26..5bb1061 100644 --- a/database/migrations/2016_01_04_143639_create_stems_table.php +++ b/database/migrations/2016_01_04_143639_create_modes_table.php @@ -1,7 +1,7 @@ <?php /** - * HebrewParseTrainer - practice Hebrew verbs - * Copyright (C) 2015 Camil Staps <info@camilstaps.nl> + * Luo Parse Trainer - practice Ancient Greek verb forms + * Copyright (C) 2015-present Camil Staps <info@camilstaps.nl> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateStemsTable extends Migration +class CreateModesTable extends Migration { /** * Run the migrations. @@ -29,9 +29,10 @@ class CreateStemsTable extends Migration */ public function up() { - Schema::create('stems', function (Blueprint $table) { + Schema::create('modes', function (Blueprint $table) { $table->increments('id'); $table->string('name', 24)->unique(); + $table->string('abbreviation', 6)->unique(); }); } @@ -42,6 +43,6 @@ class CreateStemsTable extends Migration */ public function down() { - Schema::drop('stems'); + Schema::drop('modes'); } } diff --git a/database/migrations/2016_01_04_143647_create_tenses_table.php b/database/migrations/2016_01_04_143647_create_tenses_table.php index 45c361a..9499c43 100644 --- a/database/migrations/2016_01_04_143647_create_tenses_table.php +++ b/database/migrations/2016_01_04_143647_create_tenses_table.php @@ -1,7 +1,7 @@ <?php /** - * HebrewParseTrainer - practice Hebrew verbs - * Copyright (C) 2015 Camil Staps <info@camilstaps.nl> + * Luo Parse Trainer - practice Ancient Greek verb forms + * Copyright (C) 2015-present Camil Staps <info@camilstaps.nl> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/database/migrations/2016_01_04_143655_create_roots_table.php b/database/migrations/2016_01_04_143655_create_roots_table.php deleted file mode 100644 index 0e6d858..0000000 --- a/database/migrations/2016_01_04_143655_create_roots_table.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * HebrewParseTrainer - practice Hebrew verbs - * Copyright (C) 2015 Camil Staps <info@camilstaps.nl> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreateRootsTable extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('roots', function (Blueprint $table) { - $table->increments('id'); - $table->string('root', 24)->collate('utf8_general_ci')->unique(); - $table->boolean('strong'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('roots'); - } -} diff --git a/database/migrations/2016_01_04_143702_create_verbs_table.php b/database/migrations/2016_01_04_143702_create_forms_table.php index a50c365..4581db7 100644 --- a/database/migrations/2016_01_04_143702_create_verbs_table.php +++ b/database/migrations/2016_01_04_143702_create_forms_table.php @@ -1,7 +1,7 @@ <?php /** - * HebrewParseTrainer - practice Hebrew verbs - * Copyright (C) 2015 Camil Staps <info@camilstaps.nl> + * Luo Parse Trainer - practice Ancient Greek verb forms + * Copyright (C) 2015-present Camil Staps <info@camilstaps.nl> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateVerbsTable extends Migration +class CreateFormsTable extends Migration { /** * Run the migrations. @@ -29,21 +29,21 @@ class CreateVerbsTable extends Migration */ public function up() { - Schema::create('verbs', function (Blueprint $table) { + Schema::create('forms', function (Blueprint $table) { $table->increments('id'); - $table->string('verb', 24)->collate('utf8_general_ci'); - $table->string('root', 24)->collate('utf8_general_ci'); - $table->string('stem', 24); + $table->string('form', 24)->collate('utf8_general_ci'); $table->string('tense', 24); + $table->string('mode', 24); + $table->enum('voice', ['A','M','P','MP'])->nullable(); $table->enum('person', [1,2,3])->nullable(); - $table->enum('gender', ['m', 'f'])->nullable(); - $table->enum('number', ['s', 'p'])->nullable(); + $table->enum('number', ['sg', 'pl'])->nullable(); + $table->enum('gender', ['M', 'F', 'N'])->nullable(); + $table->enum('case', ['nom', 'gen', 'dat', 'acc'])->nullable(); - $table->unique(['verb', 'root', 'stem', 'tense', 'person', 'gender', 'number']); + $table->unique(['form', 'tense', 'mode', 'voice', 'person', 'number', 'gender', 'case']); - $table->foreign('root')->references('root')->on('roots'); - $table->foreign('stem')->references('name')->on('stems'); $table->foreign('tense')->references('name')->on('tenses'); + $table->foreign('mode')->references('name')->on('modes'); }); } @@ -54,6 +54,6 @@ class CreateVerbsTable extends Migration */ public function down() { - Schema::drop('verbs'); + Schema::drop('forms'); } } diff --git a/database/migrations/2016_01_04_144049_create_root_translations_table.php b/database/migrations/2016_01_04_144049_create_root_translations_table.php deleted file mode 100644 index 7c060ca..0000000 --- a/database/migrations/2016_01_04_144049_create_root_translations_table.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * HebrewParseTrainer - practice Hebrew verbs - * Copyright (C) 2015 Camil Staps <info@camilstaps.nl> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreateRootTranslationsTable extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('root_translations', function (Blueprint $table) { - $table->increments('id'); - $table->string('root', 24)->collate('utf8_general_ci'); - $table->string('translation', 63); - - $table->unique(['root', 'translation']); - - $table->foreign('root')->references('root')->on('roots'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('root_translations'); - } -} diff --git a/database/migrations/2016_05_10_211558_create_random_logs_table.php b/database/migrations/2016_05_10_211558_create_random_logs_table.php index 10a924e..dc7ea0d 100644 --- a/database/migrations/2016_05_10_211558_create_random_logs_table.php +++ b/database/migrations/2016_05_10_211558_create_random_logs_table.php @@ -18,7 +18,7 @@ class CreateRandomLogsTable extends Migration $table->integer('response')->unsigned(); $table->timestamp('created_at'); - $table->foreign('response')->references('id')->on('verbs'); + $table->foreign('response')->references('id')->on('forms'); }); } diff --git a/database/migrations/2016_09_04_081740_create_users_table.php b/database/migrations/2016_09_04_081740_create_users_table.php deleted file mode 100644 index c5586dc..0000000 --- a/database/migrations/2016_09_04_081740_create_users_table.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreateUsersTable extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('users', function (Blueprint $table) { - $table->increments('id'); - $table->string('email')->unique(); - $table->string('name')->unique(); - $table->string('password'); - $table->integer('points')->default(0); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('users'); - } -} diff --git a/database/migrations/2016_09_04_081754_create_verb_actions_table.php b/database/migrations/2016_09_04_081754_create_verb_actions_table.php deleted file mode 100644 index d7b0f29..0000000 --- a/database/migrations/2016_09_04_081754_create_verb_actions_table.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreateVerbActionsTable extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('verb_actions', function (Blueprint $table) { - $table->increments('id'); - $table->integer('user_id')->unsigned(); - $table->integer('verb_id')->unsigned(); - $table->tinyInteger('kind'); - $table->tinyInteger('vote_weight')->nullable(); - $table->string('comment_text')->nullable(); - $table->timestamp('date')->default(DB::raw('CURRENT_TIMESTAMP')); - - $table->foreign('user_id')->references('id')->on('users'); - $table->foreign('verb_id')->references('id')->on('verbs'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('verb_actions'); - } -} diff --git a/database/migrations/2016_09_04_081811_create_point_changes_table.php b/database/migrations/2016_09_04_081811_create_point_changes_table.php deleted file mode 100644 index 4ade816..0000000 --- a/database/migrations/2016_09_04_081811_create_point_changes_table.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreatePointChangesTable extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('point_changes', function (Blueprint $table) { - $table->increments('id'); - $table->integer('user_id')->unsigned(); - $table->integer('verb_id')->unsigned()->nullable(); - $table->tinyInteger('kind')->unsigned(); - $table->integer('change'); - $table->timestamp('date')->default(DB::raw('CURRENT_TIMESTAMP')); - - $table->foreign('user_id')->references('id')->on('users'); - $table->foreign('verb_id')->references('id')->on('verbs'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('point_changes'); - } -} diff --git a/database/migrations/2016_09_04_081924_add_active_to_verbs.php b/database/migrations/2016_09_04_081924_add_active_to_verbs.php deleted file mode 100644 index 79c5993..0000000 --- a/database/migrations/2016_09_04_081924_add_active_to_verbs.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class AddActiveToVerbs extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('verbs', function (Blueprint $table) { - $table->boolean('active')->default(true); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('verbs', function (Blueprint $table) { - $table->dropColumn('active'); - }); - } -} diff --git a/database/migrations/2016_09_05_215803_create_root_kinds.php b/database/migrations/2016_09_05_215803_create_root_kinds.php deleted file mode 100644 index 2ab1a42..0000000 --- a/database/migrations/2016_09_05_215803_create_root_kinds.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreateRootKinds extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('root_kinds', function (Blueprint $table) { - $table->increments('id'); - $table->boolean('strong'); - $table->string('name')->unique(); - }); - - Schema::table('roots', function (Blueprint $table) { - $table->dropColumn('strong'); - - $table->integer('root_kind_id')->unsigned()->nullable(); - $table->foreign('root_kind_id')->references('id')->on('root_kinds'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('roots', function (Blueprint $table) { - $table->dropForeign(['root_kind_id']); - $table->dropColumn('root_kind_id'); - - $table->boolean('strong')->default(1); - }); - - Schema::drop('root_kinds'); - } -} diff --git a/database/migrations/2016_09_05_230150_add_isadmin_to_users.php b/database/migrations/2016_09_05_230150_add_isadmin_to_users.php deleted file mode 100644 index e548420..0000000 --- a/database/migrations/2016_09_05_230150_add_isadmin_to_users.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class AddIsadminToUsers extends Migration { - /** - * Run the migrations. - * - * @return void - */ - public function up() { - Schema::table('users', function (Blueprint $table) { - $table->boolean('isadmin')->default(false); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('isadmin'); - }); - } -} diff --git a/database/migrations/2016_09_25_210947_add_remember_token.php b/database/migrations/2016_09_25_210947_add_remember_token.php deleted file mode 100644 index 83f72bd..0000000 --- a/database/migrations/2016_09_25_210947_add_remember_token.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class AddRememberToken extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::table('users', function (Blueprint $table) { - $table->rememberToken(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('remember_token'); - }); - } -} diff --git a/database/migrations/2016_09_25_230620_create_password_resets_table.php b/database/migrations/2016_09_25_230620_create_password_resets_table.php deleted file mode 100644 index bda733d..0000000 --- a/database/migrations/2016_09_25_230620_create_password_resets_table.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreatePasswordResetsTable extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('password_resets', function (Blueprint $table) { - $table->string('email')->index(); - $table->string('token')->index(); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('password_resets'); - } -} |