We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f71001 commit 60d1641Copy full SHA for 60d1641
database/migrations/create_subscription_features_table.php.stub
@@ -11,11 +11,13 @@ class CreateSubscriptionFeaturesTable extends Migration
11
Schema::create('subscription_features', function (Blueprint $table) {
12
$table->id();
13
$table->foreignId('subscription_id')->constrained()->onDelete('cascade');
14
- $table->string('code', 64)->unique();
+ $table->string('code', 64);
15
$table->boolean('metered')->default(false);
16
$table->unsignedInteger('quota')->nullable()->default(null);
17
$table->unsignedInteger('used')->nullable()->default(null);
18
$table->timestamps();
19
+
20
+ $table->unique(['subscription_id', 'code']);
21
});
22
}
23
0 commit comments