chore: optimized migration files for mariadb
This commit is contained in:
@@ -97,10 +97,6 @@ return new class extends Migration
|
|||||||
$table->index(['is_activated', 'created_at'], 'activation_keys_activated_created_at_index');
|
$table->index(['is_activated', 'created_at'], 'activation_keys_activated_created_at_index');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('settings', function (Blueprint $table): void {
|
|
||||||
$table->index('key', 'settings_key_index');
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::table('metas', function (Blueprint $table): void {
|
Schema::table('metas', function (Blueprint $table): void {
|
||||||
$table->index('key', 'metas_key_index');
|
$table->index('key', 'metas_key_index');
|
||||||
});
|
});
|
||||||
@@ -197,10 +193,6 @@ return new class extends Migration
|
|||||||
$table->dropIndex('activation_keys_activated_created_at_index');
|
$table->dropIndex('activation_keys_activated_created_at_index');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('settings', function (Blueprint $table): void {
|
|
||||||
$table->dropIndex('settings_key_index');
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::table('metas', function (Blueprint $table): void {
|
Schema::table('metas', function (Blueprint $table): void {
|
||||||
$table->dropIndex('metas_key_index');
|
$table->dropIndex('metas_key_index');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ return new class extends Migration
|
|||||||
$table->json('metadata')->nullable();
|
$table->json('metadata')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
||||||
$table->unique(['user_id', 'plan_feature_id', 'usage_type', 'period_start']);
|
$table->unique(['user_id', 'plan_feature_id', 'usage_type', 'period_start'], 'plan_usage_unique');
|
||||||
$table->index(['user_id', 'period_start']);
|
$table->index(['user_id', 'period_start']);
|
||||||
$table->index(['plan_feature_id', 'period_start']);
|
$table->index(['plan_feature_id', 'period_start']);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user