Pārlūkot izejas kodu

vamos para alla

Gabriel Santiago Plaza 3 gadus atpakaļ
vecāks
revīzija
4af12c1092

+ 42
- 0
app/database/migrations/2021_06_02_115216_create_annual_cycle.php Parādīt failu

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

+ 2
- 3
app/database/migrations/2021_06_04_003810_create_activity_criterion_table.php Parādīt failu

@@ -31,9 +31,8 @@ class CreateActivityCriterionTable extends Migration
31 31
 				->onUpdate('cascade');
32 32
 			$table->text('transformative_actions')->nullable();
33 33
 			$table->text('assessment_comments')->nullable();
34
-			$table->integer('expected_student_score')->nullable();
35
-			$table->decimal('expected_percentage_students_achieving', 5, 2)->nullable();
36
-			$table->decimal('percentage_students_who_achieved', 5, 2)->nullable();
34
+
35
+
37 36
 			$table->decimal('weight', 3, 2)->default(1.0);
38 37
 
39 38
 			$table->timestamps();

+ 1
- 13
app/database/migrations/2021_06_05_235829_create_annual_plans_table.php Parādīt failu

@@ -11,19 +11,7 @@ class CreateAnnualPlansTable extends Migration
11 11
 		Schema::create('annual_plans', function (Blueprint $table) {
12 12
 
13 13
 			$table->increments('id');
14
-			$table->string('academic_year');
15
-			$table->integer('semester_start')->unsigned();
16
-			$table->foreign('semester_start')
17
-				->references('id')
18
-				->on('semesters')
19
-				->onDelete('cascade')
20
-				->onUpdate('cascade');
21
-			$table->integer('semester_end')->unsigned();
22
-			$table->foreign('semester_end')
23
-				->references('id')
24
-				->on('semesters')
25
-				->onDelete('cascade')
26
-				->onUpdate('cascade');
14
+			$table->integer('annual_cycle_id')->unsigned();
27 15
 			$table->integer('program_id')->unsigned();
28 16
 			$table
29 17
 				->foreign('program_id')

+ 1
- 1
app/database/migrations/2021_06_06_000025_create_criterion_objective_outcome_table.php Parādīt failu

@@ -11,7 +11,7 @@ class CreateCriterionObjectiveOutcomeTable extends Migration
11 11
 		Schema::create('criterion_objective_outcome', function (Blueprint $table) {
12 12
 			$table->increments('id');
13 13
 			$table->integer('criterion_id')->unsigned();
14
-			$table->integer('objective_id')->unsigned();
14
+			$table->integer('objective_id')->unsigned()->nullable();
15 15
 			$table->integer('outcome_id')->unsigned();
16 16
 			$table
17 17
 				->foreign('criterion_id')

+ 1
- 1
app/database/migrations/2021_06_16_105139_create_activity_student.php Parādīt failu

@@ -18,7 +18,7 @@ class CreateActivityStudent extends Migration
18 18
 			$table->text('comments')->nullable();
19 19
 			$table->integer('activity_id')->unsigned();
20 20
 			$table->integer('student_id')->unsigned();
21
-			$table->foreign('activity')
21
+			$table->foreign('activity_id')
22 22
 				->references('id')
23 23
 				->on('activities')
24 24
 				->onDelete('cascade')