Skip to content

Commit

Permalink
rename type and category in plural
Browse files Browse the repository at this point in the history
  • Loading branch information
NathaRuiz committed Feb 14, 2024
1 parent cd15c08 commit aa4b7c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
public function up(): void
{
Schema::create('type', function (Blueprint $table) {
Schema::create('types', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->timestamps();
Expand All @@ -23,6 +23,6 @@ public function up(): void
*/
public function down(): void
{
Schema::dropIfExists('type');
Schema::dropIfExists('types');
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
public function up(): void
{
Schema::create('category', function (Blueprint $table) {
Schema::create('categories', function (Blueprint $table) {
$table->id();
$table->string('category_title');
$table->timestamps();
Expand All @@ -23,6 +23,6 @@ public function up(): void
*/
public function down(): void
{
Schema::dropIfExists('category');
Schema::dropIfExists('categories');
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public function up(): void
$table->unsignedBigInteger('extra_resources_id2')->nullable();
$table->unsignedBigInteger('extra_resources_id3')->nullable();

$table->foreign('type_id')->references('id')->on('type');
$table->foreign('category_id')->references('id')->on('category');
$table->foreign('type_id')->references('id')->on('types');
$table->foreign('category_id')->references('id')->on('categories');
$table->foreign('extra_resources_id1')->references('id')->on('extra_resources');
$table->foreign('extra_resources_id2')->references('id')->on('extra_resources');
$table->foreign('extra_resources_id3')->references('id')->on('extra_resources');
Expand Down

0 comments on commit aa4b7c1

Please sign in to comment.