Conditions | 1 |
Paths | 1 |
Total Lines | 32 |
Code Lines | 22 |
Lines | 10 |
Ratio | 31.25 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function up() |
||
16 | { |
||
17 | DB::transaction(function() { |
||
18 | View Code Duplication | Schema::create('cosmicradiotv_podcast_release_types', function (Blueprint $table) { |
|
19 | $table->engine = 'InnoDB'; |
||
20 | $table->increments('id'); |
||
21 | $table->string('name'); |
||
22 | $table->string('slug'); |
||
23 | $table->string('type'); |
||
24 | $table->string('filetype'); |
||
25 | |||
26 | $table->unique('slug'); |
||
27 | }); |
||
28 | |||
29 | Schema::create('cosmicradiotv_podcast_releases', function (Blueprint $table) { |
||
30 | $table->engine = 'InnoDB'; |
||
31 | $table->increments('id'); |
||
32 | $table->unsignedInteger('episode_id'); |
||
33 | $table->unsignedInteger('release_type_id'); |
||
34 | $table->text('url'); |
||
35 | $table->bigInteger('size'); |
||
36 | $table->timestamps(); |
||
37 | |||
38 | $table->foreign('episode_id')->references('id')->on('cosmicradiotv_podcast_episodes') |
||
39 | ->onUpdate('cascade'); |
||
40 | $table->foreign('release_type_id')->references('id')->on('cosmicradiotv_podcast_release_types') |
||
41 | ->onUpdate('cascade'); |
||
42 | |||
43 | }); |
||
44 | }); |
||
45 | |||
46 | } |
||
47 | |||
58 | } |