fix: 🗃️ update type for translatable columns in database
This commit is contained in:
parent
8b1c43fc85
commit
d5a40041ca
1 changed files with 90 additions and 0 deletions
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('company_activities', function (Blueprint $table) {
|
||||
$table->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();
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue