Then I have a second migration, which drops the user_id column:public function up(): void { $isSqlite = \Illuminate\Support\Facades\DB::getDriverName() === 'sqlite'; Schema::table('project_assignments', function
Install the package in a Laravel Nova project via Composer:# Install package composer require outl1ne/nova-sortableUsageCreate migrationAdd an order field to the model using Laravel migrations:// Add order column to the model Schema::table('some_model', function (Blueprint $table) { $table-...
Create migrationAdd an order field to the model using Laravel migrations:// Add order column to the model Schema::table('some_model', function (Blueprint $table) { $table->integer('sort_order'); }); // Set default sort order (just copy ID to sort order) DB::statement('UPDATE some...
I have a similar situation where I want to remove just the key constrain not the column and not working. I do not know why, maybe you can help me. Take a look at my code: --migration for creating the table-- classCreateUnitRoomTypePricesTableextendsMigration{/** * Run the migrations...
Hi guys, I encountered this issues with a migration rollback failing to remove a unique index (in my case, composed) if one of the columns used in it are also used in a foreign key constraint and, hence, in a automatically created index...
On this migration, I get this error when rolling back: SQLSTATE[HY000]: General error: 1832 Cannot change column 'user_id': used in a foreign key constraint 'accountability_partners_user_id_foreign' (SQL: ALTER TABLE accountability_partners CHANGE us er_id user_id INT NOT NULL) <?php ...
Only drop two_factor_confirmed_at column if it exists in the table … 146e4f9 crynobone closed this Jan 13, 2025 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Reviewers No reviews Assignees No one assigned Labels None yet Pr...
Laravel 5 support Readme updates 1.1.5 UUID model trait now supports custom UUIDs (instead of only generating them for you) 1.1.4 UUID fix 1.1.3 Removed the schema binding on the service provider 1.1.2 Removed the uuid column creation via custom blueprint 1.1.1 Dependency bug fix ...
Create migrationAdd an order field to the model using Laravel migrations:// Add order column to the model Schema::table('some_model', function (Blueprint $table) { $table->integer('sort_order'); }); // Set default sort order (just copy ID to sort order) DB::statement('UPDATE some...
Install the package in a Laravel Nova project via Composer: # Install package composer require optimistdigital/nova-sortable Usage Create migration Add an order field to the model using Laravel migrations: // Add order column to the model Schema::table('some_model', function (Blueprint $table)...