Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bang @habibimustafa, diaku kalau migration ini dijalankan kena error:

SQLSTATE[HY000]: General error: 1553 Cannot drop index 'idx_tag_subscriber': needed in a foreign key constraint (Connection: mysql, SQL: alter table sendportal_tag_subscriber drop index idx_tag_subscriber)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya benerin aja, nanti aku merge

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kayaknya perlu 2 step itu

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aku udah edit @faridatulna coba cek master

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public function up(): void
{
Schema::table('sendportal_tag_subscriber', function (Blueprint $table) {
$table->dropColumn('id');
$table->dropIndex('idx_tag_subscriber'); // redundant after PK change
$table->primary(['tag_id', 'subscriber_id']);
});
}
Expand All @@ -20,7 +19,6 @@ public function down(): void
Schema::table('sendportal_tag_subscriber', function (Blueprint $table) {
$table->dropPrimary(['tag_id', 'subscriber_id']);
$table->increments('id')->first();
$table->index(['tag_id', 'subscriber_id'], 'idx_tag_subscriber');
});
}
}