aboutsummaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
Diffstat (limited to 'database')
-rw-r--r--database/factories/ModelFactory.php23
-rw-r--r--database/migrations/2016_01_04_143639_create_modes_table.php (renamed from database/migrations/2016_01_04_143639_create_stems_table.php)11
-rw-r--r--database/migrations/2016_01_04_143647_create_tenses_table.php4
-rw-r--r--database/migrations/2016_01_04_143655_create_roots_table.php48
-rw-r--r--database/migrations/2016_01_04_143702_create_forms_table.php (renamed from database/migrations/2016_01_04_143702_create_verbs_table.php)26
-rw-r--r--database/migrations/2016_01_04_144049_create_root_translations_table.php52
-rw-r--r--database/migrations/2016_05_10_211558_create_random_logs_table.php2
-rw-r--r--database/migrations/2016_09_04_081740_create_users_table.php33
-rw-r--r--database/migrations/2016_09_04_081754_create_verb_actions_table.php38
-rw-r--r--database/migrations/2016_09_04_081811_create_point_changes_table.php37
-rw-r--r--database/migrations/2016_09_04_081924_add_active_to_verbs.php31
-rw-r--r--database/migrations/2016_09_05_215803_create_root_kinds.php45
-rw-r--r--database/migrations/2016_09_05_230150_add_isadmin_to_users.php28
-rw-r--r--database/migrations/2016_09_25_210947_add_remember_token.php32
-rw-r--r--database/migrations/2016_09_25_230620_create_password_resets_table.php32
-rw-r--r--database/seeds/BasisTableSeeder.php46
-rw-r--r--database/seeds/DatabaseSeeder.php7
-rw-r--r--database/seeds/FormTableSeeder.php (renamed from database/seeds/RootTableSeeder.php)31
-rw-r--r--database/seeds/VerbTableSeeder.php59
19 files changed, 46 insertions, 539 deletions
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php
deleted file mode 100644
index e0dc869..0000000
--- a/database/factories/ModelFactory.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-/*
-|--------------------------------------------------------------------------
-| Model Factories
-|--------------------------------------------------------------------------
-|
-| Here you may define all of your model factories. Model factories give
-| you a convenient way to create models for testing and seeding your
-| database. Just tell the factory how a default model should look.
-|
-*/
-
-$factory->define(App\User::class, function (Faker\Generator $faker) {
- static $password;
-
- return [
- 'name' => $faker->name,
- 'email' => $faker->unique()->safeEmail,
- 'password' => $password ?: $password = bcrypt('secret'),
- 'remember_token' => str_random(10),
- ];
-});
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');
- }
-}
diff --git a/database/seeds/BasisTableSeeder.php b/database/seeds/BasisTableSeeder.php
index d02dfe8..3f933b0 100644
--- a/database/seeds/BasisTableSeeder.php
+++ b/database/seeds/BasisTableSeeder.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\Seeder;
use HebrewParseTrainer\RootKind;
-use HebrewParseTrainer\Stem;
+use HebrewParseTrainer\Mode;
use HebrewParseTrainer\Tense;
class BasisTableSeeder extends Seeder {
@@ -32,35 +32,19 @@ class BasisTableSeeder extends Seeder {
*/
public function run()
{
- Stem::create(['name' => 'Qal']);
- Stem::create(['name' => 'Niphal']);
- Stem::create(['name' => 'Piel']);
- Stem::create(['name' => 'Pual']);
- Stem::create(['name' => 'Hiphil']);
- Stem::create(['name' => 'Hophal']);
- Stem::create(['name' => 'Hitpael']);
+ Tense::create(['name' => 'praesens', 'abbreviation' => 'pr']);
+ Tense::create(['name' => 'imperfectum', 'abbreviation' => 'impf']);
+ Tense::create(['name' => 'aoristus', 'abbreviation' => 'aor']);
+ Tense::create(['name' => 'futurum', 'abbreviation' => 'fut']);
+ Tense::create(['name' => 'perfectum', 'abbreviation' => 'pf']);
+ Tense::create(['name' => 'plusquamperfectum', 'abbreviation' => 'pqpf']);
- Tense::create(['name' => 'perfect', 'abbreviation' => 'pf']);
- Tense::create(['name' => 'imperfect', 'abbreviation' => 'ipf']);
- Tense::create(['name' => 'cohortative', 'abbreviation' => 'coh']);
- Tense::create(['name' => 'imperative', 'abbreviation' => 'imp']);
- Tense::create(['name' => 'jussive', 'abbreviation' => 'ius']);
- Tense::create(['name' => 'infinitive construct', 'abbreviation' => 'infcs']);
- Tense::create(['name' => 'infinitive absolute', 'abbreviation' => 'infabs']);
- Tense::create(['name' => 'participle active', 'abbreviation' => 'pta']);
- Tense::create(['name' => 'participle passive', 'abbreviation' => 'ptp']);
-
- RootKind::create(['strong' => true, 'name' => 'Strong']);
- RootKind::create(['strong' => false, 'name' => 'I-Guttural']);
- RootKind::create(['strong' => false, 'name' => 'I-Aleph']);
- RootKind::create(['strong' => false, 'name' => 'I-Nun']);
- RootKind::create(['strong' => false, 'name' => 'I-Waw']);
- RootKind::create(['strong' => false, 'name' => 'I-Yod']);
- RootKind::create(['strong' => false, 'name' => 'II-Guttural']);
- RootKind::create(['strong' => false, 'name' => 'III-He']);
- RootKind::create(['strong' => false, 'name' => 'Biconsonantal']);
- RootKind::create(['strong' => false, 'name' => 'Geminate']);
- RootKind::create(['strong' => false, 'name' => 'Double weak']);
+ Mode::create(['name' => 'indicativus', 'abbreviation' => 'ind']);
+ Mode::create(['name' => 'conjunctivus', 'abbreviation' => 'conj']);
+ Mode::create(['name' => 'optativus', 'abbreviation' => 'opt']);
+ Mode::create(['name' => 'imperativus', 'abbreviation' => 'imp!']);
+ Mode::create(['name' => 'participium', 'abbreviation' => 'ptc']);
+ Mode::create(['name' => 'infinitivus', 'abbreviation' => 'inf']);
}
}
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
index 7cb8402..c5b6ab0 100644
--- a/database/seeds/DatabaseSeeder.php
+++ b/database/seeds/DatabaseSeeder.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
@@ -32,8 +32,7 @@ class DatabaseSeeder extends Seeder
Model::unguard();
$this->call('BasisTableSeeder');
- $this->call('RootTableSeeder');
- $this->call('VerbTableSeeder');
+ $this->call('FormTableSeeder');
Model::reguard();
}
diff --git a/database/seeds/RootTableSeeder.php b/database/seeds/FormTableSeeder.php
index 7c3b0ea..4ddb983 100644
--- a/database/seeds/RootTableSeeder.php
+++ b/database/seeds/FormTableSeeder.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
@@ -18,26 +18,9 @@
*/
use Illuminate\Database\Seeder;
-use HebrewParseTrainer\Root;
-use HebrewParseTrainer\RootKind;
-use HebrewParseTrainer\RootTranslation;
-
-class RootTableSeeder extends Seeder {
-
- protected function add($root, $kind) {
- $kind_id = null;
- foreach (RootKind::where('name', $kind)->get() as $rootkind)
- $kind_id = $rootkind->id;
-
- if (is_null($kind_id))
- die('Unknown root kind ' . $kind . "\n");
-
- Root::create([
- 'root' => $root,
- 'root_kind_id' => $kind_id
- ]);
- }
+use HebrewParseTrainer\Form;
+class FormTableSeeder extends Seeder {
/**
* Run the database seeds.
*
@@ -45,9 +28,7 @@ class RootTableSeeder extends Seeder {
*/
public function run()
{
- $this->add('קטל', 'Strong');
-
- RootTranslation::create(['root' => 'קטל', 'translation' => 'kill']);
+ Form::create(['form' => 'λύω', 'tense' => 'praesens', 'mode' => 'indicativus',
+ 'voice' => 'A', 'person' => '1', 'number' => 'sg']);
}
-
}
diff --git a/database/seeds/VerbTableSeeder.php b/database/seeds/VerbTableSeeder.php
deleted file mode 100644
index 89a8094..0000000
--- a/database/seeds/VerbTableSeeder.php
+++ /dev/null
@@ -1,59 +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\Seeder;
-use HebrewParseTrainer\Verb;
-
-class VerbTableSeeder extends Seeder {
-
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- Verb::create(['verb' => 'קָטַל', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 3, 'gender' => 'm', 'number' => 's']);
- Verb::create(['verb' => 'קָֽטְלָה', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 3, 'gender' => 'f', 'number' => 's']);
- Verb::create(['verb' => 'קָטַ֫לְתָּ', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 2, 'gender' => 'm', 'number' => 's']);
- Verb::create(['verb' => 'קָטַלְתְּ', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 2, 'gender' => 'f', 'number' => 's']);
- Verb::create(['verb' => 'קָטַ֫לְתִּי', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 1, 'gender' => 'm', 'number' => 's']);
- Verb::create(['verb' => 'קָטַ֫לְתִּי', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 1, 'gender' => 'f', 'number' => 's']);
-
- Verb::create(['verb' => 'קָֽטְלוּ', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 3, 'gender' => 'm', 'number' => 'p']);
- Verb::create(['verb' => 'קָֽטְלוּ', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 3, 'gender' => 'f', 'number' => 'p']);
- Verb::create(['verb' => 'קְטַלְתֶּם', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 2, 'gender' => 'm', 'number' => 'p']);
- Verb::create(['verb' => 'קְטַלְתֶּן', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 2, 'gender' => 'f', 'number' => 'p']);
- Verb::create(['verb' => 'קָטַ֫לְנוּ', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 1, 'gender' => 'm', 'number' => 'p']);
- Verb::create(['verb' => 'קָטַ֫לְנוּ', 'root' => 'קטל', 'stem' => 'Qal',
- 'tense' => 'perfect', 'person' => 1, 'gender' => 'f', 'number' => 'p']);
- }
-
-} \ No newline at end of file