Skip to content

Commit 0a87009

Browse files
committed
Update database table naming to CyberCog defaults
1 parent 01bf9d0 commit 0a87009

15 files changed

+33
-33
lines changed

tests/Stubs/Models/Character.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Character extends Model implements CanBeOwnerContract
2626
*
2727
* @var string
2828
*/
29-
protected $table = 'character';
29+
protected $table = 'characters';
3030

3131
/**
3232
* The attributes that are mass assignable.

tests/Stubs/Models/EntityWithCustomizedOwner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class EntityWithCustomizedOwner extends Model implements OwnableContract
5151
*
5252
* @var string
5353
*/
54-
protected $table = 'entity_with_customized_owner';
54+
protected $table = 'entity_with_customized_owners';
5555

5656
/**
5757
* The attributes that are mass assignable.

tests/Stubs/Models/EntityWithDefaultCustomizedOwner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class EntityWithDefaultCustomizedOwner extends Model implements OwnableContract
5252
*
5353
* @var string
5454
*/
55-
protected $table = 'entity_with_customized_owner';
55+
protected $table = 'entity_with_customized_owners';
5656

5757
/**
5858
* The attributes that are mass assignable.

tests/Stubs/Models/EntityWithDefaultMorphOwner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class EntityWithDefaultMorphOwner extends Model implements OwnableContract
3131
*
3232
* @var string
3333
*/
34-
protected $table = 'entity_with_morph_owner';
34+
protected $table = 'entity_with_morph_owners';
3535

3636
/**
3737
* The attributes that are mass assignable.

tests/Stubs/Models/EntityWithDefaultOwner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class EntityWithDefaultOwner extends Model implements OwnableContract
3131
*
3232
* @var string
3333
*/
34-
protected $table = 'entity_with_owner';
34+
protected $table = 'entity_with_owners';
3535

3636
/**
3737
* The attributes that are mass assignable.

tests/Stubs/Models/EntityWithMorphOwner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class EntityWithMorphOwner extends Model implements OwnableContract
2929
*
3030
* @var string
3131
*/
32-
protected $table = 'entity_with_morph_owner';
32+
protected $table = 'entity_with_morph_owners';
3333

3434
/**
3535
* The attributes that are mass assignable.

tests/Stubs/Models/EntityWithOwner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class EntityWithOwner extends Model implements OwnableContract
2929
*
3030
* @var string
3131
*/
32-
protected $table = 'entity_with_owner';
32+
protected $table = 'entity_with_owners';
3333

3434
/**
3535
* The attributes that are mass assignable.

tests/Stubs/Models/Group.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Group extends Model implements CanBeOwnerContract
3333
*
3434
* @var string
3535
*/
36-
protected $table = 'group';
36+
protected $table = 'groups';
3737

3838
/**
3939
* The attributes that are mass assignable.

tests/Stubs/Models/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class User extends Authenticatable implements CanBeOwnerContract
2626
*
2727
* @var string
2828
*/
29-
protected $table = 'user';
29+
protected $table = 'users';
3030

3131
/**
3232
* The attributes that are mass assignable.

tests/database/migrations/2016_09_02_173301_create_character_table.php renamed to tests/database/migrations/2016_09_02_173301_create_characters_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
use Illuminate\Database\Migrations\Migration;
1515

1616
/**
17-
* Class CreateCharacterTable.
17+
* Class CreateCharactersTable.
1818
*/
19-
class CreateCharacterTable extends Migration
19+
class CreateCharactersTable extends Migration
2020
{
2121
public function up()
2222
{
23-
Schema::create('character', function (Blueprint $table) {
23+
Schema::create('characters', function (Blueprint $table) {
2424
$table->increments('id');
2525
$table->string('name');
2626
$table->timestamps();
@@ -29,6 +29,6 @@ public function up()
2929

3030
public function down()
3131
{
32-
Schema::dropIfExists('character');
32+
Schema::dropIfExists('characters');
3333
}
3434
}

tests/database/migrations/2016_09_02_173301_create_group_table.php renamed to tests/database/migrations/2016_09_02_173301_create_groups_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
use Illuminate\Database\Migrations\Migration;
1515

1616
/**
17-
* Class CreateGroupTable.
17+
* Class CreateGroupsTable.
1818
*/
19-
class CreateGroupTable extends Migration
19+
class CreateGroupsTable extends Migration
2020
{
2121
public function up()
2222
{
23-
Schema::create('group', function (Blueprint $table) {
23+
Schema::create('groups', function (Blueprint $table) {
2424
$table->increments('gid');
2525
$table->integer('user_id')->unsigned()->nullable();
2626
$table->string('name');
@@ -30,6 +30,6 @@ public function up()
3030

3131
public function down()
3232
{
33-
Schema::dropIfExists('group');
33+
Schema::dropIfExists('groups');
3434
}
3535
}

tests/database/migrations/2016_09_02_173301_create_user_table.php renamed to tests/database/migrations/2016_09_02_173301_create_users_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
use Illuminate\Database\Migrations\Migration;
1515

1616
/**
17-
* Class CreateUserTable.
17+
* Class CreateUsersTable.
1818
*/
19-
class CreateUserTable extends Migration
19+
class CreateUsersTable extends Migration
2020
{
2121
public function up()
2222
{
23-
Schema::create('user', function (Blueprint $table) {
23+
Schema::create('users', function (Blueprint $table) {
2424
$table->increments('id');
2525
$table->string('name');
2626
$table->timestamps();
@@ -29,6 +29,6 @@ public function up()
2929

3030
public function down()
3131
{
32-
Schema::dropIfExists('user');
32+
Schema::dropIfExists('users');
3333
}
3434
}

tests/database/migrations/2016_12_15_000000_create_entity_with_customized_owner_table.php renamed to tests/database/migrations/2016_12_15_000000_create_entity_with_customized_owners_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use Illuminate\Database\Migrations\Migration;
1515

1616
/**
17-
* Class CreateEntityWithCustomizedOwnerTable.
17+
* Class CreateEntityWithCustomizedOwnersTable.
1818
*/
19-
class CreateEntityWithCustomizedOwnerTable extends Migration
19+
class CreateEntityWithCustomizedOwnersTable extends Migration
2020
{
2121
/**
2222
* Run the migrations.
@@ -25,7 +25,7 @@ class CreateEntityWithCustomizedOwnerTable extends Migration
2525
*/
2626
public function up()
2727
{
28-
Schema::create('entity_with_customized_owner', function (Blueprint $table) {
28+
Schema::create('entity_with_customized_owners', function (Blueprint $table) {
2929
$table->increments('id');
3030
$table->string('name');
3131
$table->integer('group_id')->unsigned()->nullable();
@@ -40,6 +40,6 @@ public function up()
4040
*/
4141
public function down()
4242
{
43-
Schema::dropIfExists('entity_with_customized_owner');
43+
Schema::dropIfExists('entity_with_customized_owners');
4444
}
4545
}

tests/database/migrations/2016_12_15_000000_create_entity_with_morph_owner_table.php renamed to tests/database/migrations/2016_12_15_000000_create_entity_with_morph_owners_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use Illuminate\Database\Migrations\Migration;
1515

1616
/**
17-
* Class CreateEntityWithMorphOwnerTable.
17+
* Class CreateEntityWithMorphOwnersTable.
1818
*/
19-
class CreateEntityWithMorphOwnerTable extends Migration
19+
class CreateEntityWithMorphOwnersTable extends Migration
2020
{
2121
/**
2222
* Run the migrations.
@@ -25,7 +25,7 @@ class CreateEntityWithMorphOwnerTable extends Migration
2525
*/
2626
public function up()
2727
{
28-
Schema::create('entity_with_morph_owner', function (Blueprint $table) {
28+
Schema::create('entity_with_morph_owners', function (Blueprint $table) {
2929
$table->increments('id');
3030
$table->string('name');
3131
$table->integer('owned_by_id')->unsigned()->nullable();
@@ -46,6 +46,6 @@ public function up()
4646
*/
4747
public function down()
4848
{
49-
Schema::dropIfExists('entity_with_morph_owner');
49+
Schema::dropIfExists('entity_with_morph_owners');
5050
}
5151
}

tests/database/migrations/2016_12_15_000000_create_entity_with_owner_table.php renamed to tests/database/migrations/2016_12_15_000000_create_entity_with_owners_table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use Illuminate\Database\Migrations\Migration;
1515

1616
/**
17-
* Class CreateEntityWithOwnerTable.
17+
* Class CreateEntityWithOwnersTable.
1818
*/
19-
class CreateEntityWithOwnerTable extends Migration
19+
class CreateEntityWithOwnersTable extends Migration
2020
{
2121
/**
2222
* Run the migrations.
@@ -25,7 +25,7 @@ class CreateEntityWithOwnerTable extends Migration
2525
*/
2626
public function up()
2727
{
28-
Schema::create('entity_with_owner', function (Blueprint $table) {
28+
Schema::create('entity_with_owners', function (Blueprint $table) {
2929
$table->increments('id');
3030
$table->string('name');
3131
$table->integer('owned_by_id')->unsigned()->nullable();
@@ -40,6 +40,6 @@ public function up()
4040
*/
4141
public function down()
4242
{
43-
Schema::dropIfExists('entity_with_owner');
43+
Schema::dropIfExists('entity_with_owners');
4444
}
4545
}

0 commit comments

Comments
 (0)