Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading laravel/framework v11.15.0 fails migration containing table update (ORA-01430) #864

Closed
timoteo7 opened this issue Jul 10, 2024 · 1 comment · Fixed by #867
Closed
Labels

Comments

@timoteo7
Copy link
Contributor

Summary of problem or feature request

when I updated the
laravel/framework (v11.14.0 => v11.15.0)
a migration containing a table update (adding a string and date column for example),
the failure occurs:
ORA-01430: column being added already exists in table
(I'm not sure if this only happens with Oracle DB, I haven't tested it on other databases)

but downgrading solves the problem:
php composer update laravel/framework:11.14.0

Code snippet of problem

        Schema::table('users', function (Blueprint $table) {
            $table->string('string_test')->nullable();
            $table->date('date_test')->nullable();
        });

System details

  • Operating System : Linux 6.5.0-41-generic
  • PHP Version : PHP 8.3.8 (cli)
  • Laravel Version : 11.15.0
  • Laravel-OCI8 Version : v11.3.0
@timoteo7 timoteo7 changed the title Upgrading laravel/framework v11.15.0 fails migration (ORA-01430) containing table update Upgrading laravel/framework v11.15.0 fails migration containing table update (ORA-01430) Jul 10, 2024
@hafezdivandari
Copy link

The overridden compileAdd and compileChange methods of the \Yajra\Oci8\Schema\Grammars\OracleGrammar should change, just like PR laravel/framework#51373.

You may check the changes on MySqlGrammar as an example.

public function compileAdd(Blueprint $blueprint, Fluent $command)
{
    if (laravel version >= 11.15) {
        // add single column
    } else {
        // previous code (add all columns at once)
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants