diff --git a/database/migrations/2026_01_22_122511_alter_translatable_columns_in_tables.php b/database/migrations/2026_01_22_122511_alter_translatable_columns_in_tables.php new file mode 100644 index 00000000..0a0d748d --- /dev/null +++ b/database/migrations/2026_01_22_122511_alter_translatable_columns_in_tables.php @@ -0,0 +1,90 @@ +dropUnique(['name']); + }); + Schema::table('company_activities', function (Blueprint $table) { + $table->text('name')->comment('Name of the company activity.')->change(); + }); + + Schema::table('company_sectors', function (Blueprint $table) { + $table->dropUnique(['name']); + }); + Schema::table('company_sectors', function (Blueprint $table) { + $table->text('name')->comment('Name of the company sector.')->change(); + }); + + Schema::table('dynamic_pages', function (Blueprint $table) { + $table->dropUnique(['slug']); + }); + Schema::table('dynamic_pages', function (Blueprint $table) { + $table->text('title')->comment('Title of the dynamic page.')->change(); + $table->text('slug')->comment('Slug of the dynamic page.')->change(); + }); + + Schema::table('news_categories', function (Blueprint $table) { + $table->text('name')->comment('Name of the news category.')->change(); + $table->text('slug')->comment('Slug of the news category.')->change(); + }); + + Schema::table('news_tags', function (Blueprint $table) { + $table->text('name')->comment('Name of the news tag.')->change(); + $table->text('slug')->comment('Slug of the news tag.')->change(); + }); + + Schema::table('page_configs', function (Blueprint $table) { + $table->dropUnique(['label']); + }); + Schema::table('page_configs', function (Blueprint $table) { + $table->text('label')->comment('Label of the configuration.')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down(): void + { + Schema::table('company_activities', function (Blueprint $table) { + $table->string('name')->unique()->comment('Name of the company activity.')->change(); + }); + + Schema::table('company_sectors', function (Blueprint $table) { + $table->string('name')->unique()->comment('Name of the company sector.')->change(); + }); + + Schema::table('dynamic_pages', function (Blueprint $table) { + $table->string('title')->comment('Title of the dynamic page.')->change(); + $table->string('slug')->unique()->comment('Slug of the dynamic page.')->change(); + }); + + Schema::table('news_categories', function (Blueprint $table) { + $table->string('name')->comment('Name of the news category.')->change(); + $table->string('slug')->comment('Slug of the news category.')->change(); + }); + + Schema::table('news_tags', function (Blueprint $table) { + $table->string('name')->comment('Name of the news tag.')->change(); + $table->string('slug')->comment('Slug of the news tag.')->change(); + }); + + Schema::table('page_configs', function (Blueprint $table) { + $table->string('label')->unique()->comment('Label of the configuration.')->change(); + }); + } +};