AspireCloud/database/migrations/2024_10_23_022540_rename_sync_tables.php
Chuck Adams 4fd07ea9b1
New Plugins and Themes tables built from AspireSync data (#65)
* chore: rename sync tables to use sync_ prefix

* feat: migration for new plugins table

* chore: create themes table migration

* refactor: move sync models to new names and subdir

* refactor: move Plugin and Theme models to App\Models\WpOrg

* feat: use parallel tasks in php-cs-fixer

* format: keep attributes on their own lines

* fix: use sync_themes for stub search
2024-10-26 14:07:26 -06:00

30 lines
1.1 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::rename('plugin_files', 'sync_plugin_files');
Schema::rename('plugins', 'sync_plugins');
Schema::rename('revisions', 'sync_revisions');
Schema::rename('sites', 'sync_sites');
Schema::rename('stats', 'sync_stats');
Schema::rename('theme_files', 'sync_theme_files');
Schema::rename('themes', 'sync_themes');
Schema::rename('not_found_items', 'sync_not_found_items');
}
public function down(): void
{
Schema::rename('sync_plugin_files', 'plugin_files');
Schema::rename('sync_plugins', 'plugins');
Schema::rename('sync_revisions', 'revisions');
Schema::rename('sync_sites', 'sites');
Schema::rename('sync_stats', 'stats');
Schema::rename('sync_theme_files', 'theme_files');
Schema::rename('sync_themes', 'themes');
Schema::rename('sync_not_found_items', 'not_found_items');
}
};