From ad10a6467f76822b9289832eeb0d0ac2038b32d1 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 30 Dec 2019 16:57:13 +0100 Subject: Strip down for simple app for Greek verb λύω --- .../2016_01_04_143639_create_modes_table.php | 48 ++++++++++++++++++ .../2016_01_04_143639_create_stems_table.php | 47 ----------------- .../2016_01_04_143647_create_tenses_table.php | 4 +- .../2016_01_04_143655_create_roots_table.php | 48 ------------------ .../2016_01_04_143702_create_forms_table.php | 59 ++++++++++++++++++++++ .../2016_01_04_143702_create_verbs_table.php | 59 ---------------------- ...01_04_144049_create_root_translations_table.php | 52 ------------------- .../2016_05_10_211558_create_random_logs_table.php | 2 +- .../2016_09_04_081740_create_users_table.php | 33 ------------ ...2016_09_04_081754_create_verb_actions_table.php | 38 -------------- ...016_09_04_081811_create_point_changes_table.php | 37 -------------- .../2016_09_04_081924_add_active_to_verbs.php | 31 ------------ .../2016_09_05_215803_create_root_kinds.php | 45 ----------------- .../2016_09_05_230150_add_isadmin_to_users.php | 28 ---------- .../2016_09_25_210947_add_remember_token.php | 32 ------------ ...6_09_25_230620_create_password_resets_table.php | 32 ------------ 16 files changed, 110 insertions(+), 485 deletions(-) create mode 100644 database/migrations/2016_01_04_143639_create_modes_table.php delete mode 100644 database/migrations/2016_01_04_143639_create_stems_table.php delete mode 100644 database/migrations/2016_01_04_143655_create_roots_table.php create mode 100644 database/migrations/2016_01_04_143702_create_forms_table.php delete mode 100644 database/migrations/2016_01_04_143702_create_verbs_table.php delete mode 100644 database/migrations/2016_01_04_144049_create_root_translations_table.php delete mode 100644 database/migrations/2016_09_04_081740_create_users_table.php delete mode 100644 database/migrations/2016_09_04_081754_create_verb_actions_table.php delete mode 100644 database/migrations/2016_09_04_081811_create_point_changes_table.php delete mode 100644 database/migrations/2016_09_04_081924_add_active_to_verbs.php delete mode 100644 database/migrations/2016_09_05_215803_create_root_kinds.php delete mode 100644 database/migrations/2016_09_05_230150_add_isadmin_to_users.php delete mode 100644 database/migrations/2016_09_25_210947_add_remember_token.php delete mode 100644 database/migrations/2016_09_25_230620_create_password_resets_table.php (limited to 'database/migrations') diff --git a/database/migrations/2016_01_04_143639_create_modes_table.php b/database/migrations/2016_01_04_143639_create_modes_table.php new file mode 100644 index 0000000..5bb1061 --- /dev/null +++ b/database/migrations/2016_01_04_143639_create_modes_table.php @@ -0,0 +1,48 @@ + + * + * 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 . + */ + +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateModesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('modes', function (Blueprint $table) { + $table->increments('id'); + $table->string('name', 24)->unique(); + $table->string('abbreviation', 6)->unique(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('modes'); + } +} diff --git a/database/migrations/2016_01_04_143639_create_stems_table.php b/database/migrations/2016_01_04_143639_create_stems_table.php deleted file mode 100644 index 539aa26..0000000 --- a/database/migrations/2016_01_04_143639_create_stems_table.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * 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 . - */ - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreateStemsTable extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('stems', function (Blueprint $table) { - $table->increments('id'); - $table->string('name', 24)->unique(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('stems'); - } -} 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 @@ + * Luo Parse Trainer - practice Ancient Greek verb forms + * Copyright (C) 2015-present Camil Staps * * 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 @@ - - * - * 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 . - */ - -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_forms_table.php b/database/migrations/2016_01_04_143702_create_forms_table.php new file mode 100644 index 0000000..4581db7 --- /dev/null +++ b/database/migrations/2016_01_04_143702_create_forms_table.php @@ -0,0 +1,59 @@ + + * + * 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 . + */ + +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class CreateFormsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('forms', function (Blueprint $table) { + $table->increments('id'); + $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('number', ['sg', 'pl'])->nullable(); + $table->enum('gender', ['M', 'F', 'N'])->nullable(); + $table->enum('case', ['nom', 'gen', 'dat', 'acc'])->nullable(); + + $table->unique(['form', 'tense', 'mode', 'voice', 'person', 'number', 'gender', 'case']); + + $table->foreign('tense')->references('name')->on('tenses'); + $table->foreign('mode')->references('name')->on('modes'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('forms'); + } +} diff --git a/database/migrations/2016_01_04_143702_create_verbs_table.php b/database/migrations/2016_01_04_143702_create_verbs_table.php deleted file mode 100644 index a50c365..0000000 --- a/database/migrations/2016_01_04_143702_create_verbs_table.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * 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 . - */ - -use Illuminate\Database\Schema\Blueprint; -use Illuminate\Database\Migrations\Migration; - -class CreateVerbsTable extends Migration -{ - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - Schema::create('verbs', 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('tense', 24); - $table->enum('person', [1,2,3])->nullable(); - $table->enum('gender', ['m', 'f'])->nullable(); - $table->enum('number', ['s', 'p'])->nullable(); - - $table->unique(['verb', 'root', 'stem', 'tense', 'person', 'gender', 'number']); - - $table->foreign('root')->references('root')->on('roots'); - $table->foreign('stem')->references('name')->on('stems'); - $table->foreign('tense')->references('name')->on('tenses'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('verbs'); - } -} 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 @@ - - * - * 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 . - */ - -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -string('email')->index(); - $table->string('token')->index(); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('password_resets'); - } -} -- cgit v1.2.3