parent
commit
60761ec134

+ 38
- 0
app/database/migrations/2021_07_06_082232_rubric_titles.php View File

@@ -0,0 +1,38 @@
1
+<?php
2
+
3
+use Illuminate\Database\Schema\Blueprint;
4
+use Illuminate\Database\Migrations\Migration;
5
+
6
+class RubricTitles extends Migration
7
+{
8
+
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('rubric_title', function (Blueprint $table) {
17
+			$table->increments('id');
18
+			$table->string('title');
19
+			$table->integer('position');
20
+			$table->integer('rubric_id')->unsigned();
21
+			$table->foreign('rubric_id')
22
+				->references('id')
23
+				->on('rubrics')
24
+				->onDelete('cascade')
25
+				->onUpdate('cascade');
26
+		});
27
+	}
28
+
29
+	/**
30
+	 * Reverse the migrations.
31
+	 *
32
+	 * @return void
33
+	 */
34
+	public function down()
35
+	{
36
+		Schema::drop('rubric_title');
37
+	}
38
+}

+ 38
- 0
app/database/migrations/2021_07_06_085513_template_titles.php View File

@@ -0,0 +1,38 @@
1
+<?php
2
+
3
+use Illuminate\Database\Schema\Blueprint;
4
+use Illuminate\Database\Migrations\Migration;
5
+
6
+class TemplateTitles extends Migration
7
+{
8
+
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('template_title', function (Blueprint $table) {
17
+			$table->increments('id');
18
+			$table->string('title');
19
+			$table->integer('position');
20
+			$table->integer('template_id')->unsigned();
21
+			$table->foreign('template_id')
22
+				->references('id')
23
+				->on('templates')
24
+				->onDelete('cascade')
25
+				->onUpdate('cascade');
26
+		});
27
+	}
28
+
29
+	/**
30
+	 * Reverse the migrations.
31
+	 *
32
+	 * @return void
33
+	 */
34
+	public function down()
35
+	{
36
+		Schema::drop('template_title');
37
+	}
38
+}