Quellcode durchsuchen

sE ACAbo ese juego

Gabriel Santiago Plaza vor 3 Jahren
Ursprung
Commit
025103dc98

+ 34
- 0
app/database/migrations/2021_06_22_150017_delete_min_max_scales.php Datei anzeigen

@@ -0,0 +1,34 @@
1
+<?php
2
+
3
+use Illuminate\Database\Schema\Blueprint;
4
+use Illuminate\Database\Migrations\Migration;
5
+use Illuminate\Support\Facades\Blade;
6
+
7
+class DeleteMinMaxScales extends Migration
8
+{
9
+
10
+	/**
11
+	 * Run the migrations.
12
+	 *
13
+	 * @return void
14
+	 */
15
+	public function up()
16
+	{
17
+		Schema::table('scales', function (Blueprint $table) {
18
+			$table->dropColumn(array('min_score', 'max_score'));
19
+		});
20
+	}
21
+
22
+	/**
23
+	 * Reverse the migrations.
24
+	 *
25
+	 * @return void
26
+	 */
27
+	public function down()
28
+	{
29
+		Schema::table('scales', function (Blueprint $table) {
30
+			$table->integer('min_score')->unsigned();
31
+			$table->integer('max_score')->unsigned();
32
+		});
33
+	}
34
+}

+ 41
- 0
app/database/migrations/2021_06_22_150108_add_copyright_notes_rubric_criterion.php Datei anzeigen

@@ -0,0 +1,41 @@
1
+<?php
2
+
3
+use Illuminate\Database\Schema\Blueprint;
4
+use Illuminate\Database\Migrations\Migration;
5
+use Illuminate\Support\Facades\Schema;
6
+
7
+class AddCopyrightNotesRubricCriterion extends Migration
8
+{
9
+
10
+	/**
11
+	 * Run the migrations.
12
+	 *
13
+	 * @return void
14
+	 */
15
+	public function up()
16
+	{
17
+		Schema::table('criterion_rubric', function (Blueprint $table) {
18
+			$table->text('copyright')->nullable();
19
+			$table->text('notes')->nullable();
20
+		});
21
+		Schema::table('template_criterion', function (Blueprint $table) {
22
+			$table->text('copyright')->nullable();
23
+			$table->text('notes')->nullable();
24
+		});
25
+	}
26
+
27
+	/**
28
+	 * Reverse the migrations.
29
+	 *
30
+	 * @return void
31
+	 */
32
+	public function down()
33
+	{
34
+		Schema::table('criterion_rubric', function (Blueprint $table) {
35
+			$table->dropColumn(array('copyright', 'notes'));
36
+		});
37
+		Schema::table('template_criterion', function (Blueprint $table) {
38
+			$table->dropColumn(array('copyright', 'notes'));
39
+		});
40
+	}
41
+}

+ 34
- 0
app/database/migrations/2021_06_22_150135_change_weight_float.php Datei anzeigen

@@ -0,0 +1,34 @@
1
+<?php
2
+
3
+use Illuminate\Database\Schema\Blueprint;
4
+use Illuminate\Database\Migrations\Migration;
5
+
6
+class ChangeWeightFloat extends Migration
7
+{
8
+
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::table('activity_criterion', function (Blueprint $table) {
17
+
18
+			DB::statement("ALTER TABLE `activity_criterion` MODIFY COLUMN `weight` decimal(6,2)");
19
+		});
20
+	}
21
+
22
+	/**
23
+	 * Reverse the migrations.
24
+	 *
25
+	 * @return void
26
+	 */
27
+	public function down()
28
+	{
29
+		Schema::table('activity_criterion', function (Blueprint $table) {
30
+
31
+			DB::statement("ALTER TABLE `activity_criterion` MODIFY COLUMN `weight` decimal(3,2)");
32
+		});
33
+	}
34
+}