diff --git a/app/db/migrations/20240624023258_create_channels_table.php b/app/db/migrations/20240624023258_create_channels_table.php new file mode 100644 index 0000000..55a7af6 --- /dev/null +++ b/app/db/migrations/20240624023258_create_channels_table.php @@ -0,0 +1,61 @@ +table('channels')->addTimestamps(); + + $table->addColumn('name', 'string') + ->addColumn('description', 'string', [ 'null' => false ]) + ->addColumn('links', 'string') + ->addColumn('language', 'string') + ->addColumn('copyright', 'string') + ->addColumn('explicit', 'boolean', [ 'default' => false ]) + ->addColumn('category', 'string') + ->addColumn('owner_id', 'integer') + ->addColumn('image_id', 'integer') + ->addIndex([ 'name' ], [ 'unique' => true ]) + ->addForeignKey('owner_id', 'users') + ->create(); + } +}