diff --git a/app/app/Database/Migrations/2024-05-13-011205_AddUsers.php b/app/app/Database/Migrations/2024-05-13-011205_AddUsers.php new file mode 100644 index 0000000..f9e4864 --- /dev/null +++ b/app/app/Database/Migrations/2024-05-13-011205_AddUsers.php @@ -0,0 +1,39 @@ +forge->addField([ + 'id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'email' => [ + 'type' => 'VARCHAR', + 'constraint' => 255 + ], + 'password' => [ + 'type' => 'VARCHAR', + 'constraint' => 255, + ], + 'name' => [ + 'type' => 'VARCHARD', + 'constraint' => 255, + ] + ]); + + $this->forge->addKey('id', true); + $this->forge->createTable('users'); + } + + public function down(): void + { + $this->forge->dropTable('users'); + } +} diff --git a/app/app/Database/Migrations/2024-05-13-012059_CreateChannels.php b/app/app/Database/Migrations/2024-05-13-012059_CreateChannels.php new file mode 100644 index 0000000..c10ef2c --- /dev/null +++ b/app/app/Database/Migrations/2024-05-13-012059_CreateChannels.php @@ -0,0 +1,68 @@ +forge->addField([ + 'id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'name' => [ + 'type' => 'VARCHAR', + 'constraint' => 255, + ], + 'description' => [ + 'type' => 'TEXT', + ], + 'link' => [ + 'type' => 'TEXT' + ], + 'language' => [ + 'type' => 'VARCHAR', + 'constraint' => 2, + ], + 'copyright' => [ + 'type' => 'VARCHAR', + 'constraint', 255, + ], + + ] + ]); + + $this->forge->createTable('channels'); + } + + public function down(): void + { + $this->forge->dropTable('channels'); + } +} diff --git a/app/app/Database/Migrations/2024-05-13-013011_CreateEpisodes.php b/app/app/Database/Migrations/2024-05-13-013011_CreateEpisodes.php new file mode 100644 index 0000000..1e16460 --- /dev/null +++ b/app/app/Database/Migrations/2024-05-13-013011_CreateEpisodes.php @@ -0,0 +1,18 @@ +