| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function up(): void |
||
| 16 | { |
||
| 17 | Schema::create(config('rinvex.subscriptions.tables.plan_features'), function (Blueprint $table) { |
||
| 18 | // Columns |
||
| 19 | $table->increments('id'); |
||
| 20 | $table->integer('plan_id')->unsigned(); |
||
| 21 | $table->string('slug'); |
||
| 22 | $table->{$this->jsonable()}('name'); |
||
| 23 | $table->{$this->jsonable()}('description')->nullable(); |
||
| 24 | $table->string('value'); |
||
| 25 | $table->smallInteger('resettable_period')->unsigned()->default(0); |
||
| 26 | $table->string('resettable_interval')->default('month'); |
||
| 27 | $table->mediumInteger('sort_order')->unsigned()->default(0); |
||
| 28 | $table->timestamps(); |
||
| 29 | $table->softDeletes(); |
||
| 30 | |||
| 31 | // Indexes |
||
| 32 | $table->unique(['plan_id', 'slug']); |
||
| 33 | $table->foreign('plan_id')->references('id')->on(config('rinvex.subscriptions.tables.plans')) |
||
| 34 | ->onDelete('cascade')->onUpdate('cascade'); |
||
| 35 | }); |
||
| 36 | } |
||
| 37 | |||
| 62 |