Skip to content

Commit fb33756

Browse files
committed
fixed and changed some migrations
1 parent ed204f7 commit fb33756

7 files changed

+56
-56
lines changed

composer.lock

+38-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

database/migrations/2024_08_12_030903_create_tb_admin_table.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
public function up(): void
1313
{
1414
Schema::create('tb_Admin', function (Blueprint $table) {
15-
$table->id()->comment('Tự động tăng id');
16-
$table->string('taiKhoan')->unique()->comment('Tài khoản admin, duy nhất');
17-
$table->string('matKhau')->comment('Mật khẩu đã được mã hóa');
18-
$table->tinyInteger('phanQuyen')->default(0)->comment(' 0=Nhân viên, 1=Admin');
19-
$table->timestamps()->comment('Thời gian tạo và cập nhật');
15+
$table->id(); // tự động tăng id
16+
$table->string('taiKhoan')->unique(); // tài khoản admin, duy nhất
17+
$table->string('matKhau'); // mật khẩu đã được mã hóa
18+
$table->tinyInteger('phanQuyen')->default(0); // 0=Nhân viên, 1=Admin
19+
$table->timestamps();
2020
});
2121
}
2222

database/migrations/2024_08_12_031135_create_tb_ky_thi_table.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function up(): void
1313
{
1414
Schema::create('tb_KyThi', function (Blueprint $table) {
1515
$table->id(); // Tự động tăng id
16-
$table->string('tenKyThi')->nullable(); // Tên kỳ thi
16+
$table->string('tenKyThi'); // Tên kỳ thi
1717
$table->date('ngayBatDau')->nullable(); // Ngày bắt đầu
1818
$table->date('ngayKetThuc')->nullable(); // Ngày kết thúc
1919
$table->timestamps();

database/migrations/2024_08_12_031142_create_tb_ca_thi_table.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ public function up(): void
1212
{
1313
Schema::create('tb_CaThi', function (Blueprint $table) {
1414
$table->id(); // Tự động tăng id
15-
$table->string('tenCa')->nullable(); // Tên ca thi
16-
$table->dateTime('thoiGianBatDau')->nullable(); // Thời gian bắt đầu
17-
$table->dateTime('thoiGianKetThuc')->nullable(); // Thời gian kết thúc
15+
$table->string('tenCa'); // Tên ca thi
16+
$table->dateTime('thoiGianBatDau'); // Thời gian bắt đầu
17+
$table->dateTime('thoiGianKetThuc'); // Thời gian kết thúc
1818
$table->unsignedBigInteger('kythi_id'); // Khóa ngoại tham chiếu đến bảng 'tb_kithi'
1919
$table->unsignedBigInteger('monhoc_id'); // Khóa ngoại tham chiếu đến bảng 'tb_monhoc'
2020
$table->timestamps();

database/migrations/2024_08_12_031143_create_tb_de_thi_table.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ public function up(): void
1212
{
1313
Schema::create('tb_DeThi', function (Blueprint $table) {
1414
$table->id();
15-
$table->string('tenDe')->nullable();
16-
$table->integer('soLuongCauHoi')->nullable();
17-
$table->integer('tiLeKho')->nullable();
18-
$table->integer('tiLeTrungBinh')->nullable();
19-
$table->integer('tiLeDe')->nullable();
20-
$table->json('cauHoi')->nullable();
21-
$table->integer('thoiGian')->nullable();
15+
$table->string('tenDe');
16+
$table->integer('soLuongCauHoi');
17+
$table->integer('tiLeKho');
18+
$table->integer('tiLeTrungBinh');
19+
$table->integer('tiLeDe');
20+
$table->json('cauHoi');
21+
$table->integer('thoiGian');
2222
$table->unsignedBigInteger('monhoc_id');
2323
$table->unsignedBigInteger('cathi_id');
2424
$table->timestamps();

database/migrations/2024_08_12_031153_create_tb_ket_qua_table.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function up(): void
1313
{
1414
Schema::create('tb_KetQua', function (Blueprint $table) {
1515
$table->id(); // Tự động tăng id
16-
$table->decimal('diemSo', 5, 2)->nullable(); // Điểm số, kiểu decimal với 2 chữ số thập phân
16+
$table->decimal('diemSo', 5, 2); // Điểm số, kiểu decimal với 2 chữ số thập phân
1717
$table->json('danhSachDapAn')->nullable(); // Danh sách đáp án
1818
$table->unsignedBigInteger('dethi_id'); // Khóa ngoại tham chiếu đến bảng 'tb_dethi'
1919
$table->unsignedBigInteger('sinhvien_id'); // Khóa ngoại tham chiếu đến bảng 'tb_sinhvien'

database/migrations/2024_08_12_031302_create_tb_phong_thi_table.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function up(): void
1313
{
1414
Schema::create('tb_PhongThi', function (Blueprint $table) {
1515
$table->id(); // Tự động tăng id
16-
$table->string('tenPhongThi')->nullable(); // Tên phòng thi
16+
$table->string('tenPhongThi'); // Tên phòng thi
1717
$table->json('danhSachSinhVien')->nullable(); // Danh sách sinh viên
1818
$table->unsignedBigInteger('cathi_id'); // Khóa ngoại tham chiếu đến bảng ca thi
1919
$table->timestamps();

0 commit comments

Comments
 (0)