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

[bug] placing more than one DDL command in a closure fails (5.2 & 5.3) #15042

Closed
salarmehr opened this issue Aug 25, 2016 · 3 comments
Closed

Comments

@salarmehr
Copy link

salarmehr commented Aug 25, 2016

Running the following migration on a sqlite db fails:

Schema::table('t', function (Blueprint $table) {
      $table->renameColumn('foo', 'bar');
      $table->dropColumn('baz');
    });

while the following works:

Schema::table('t', function (Blueprint $table) {
      $table->renameColumn('foo', 'bar');
        });

Schema::table('t', function (Blueprint $table) {
        $table->dropColumn('baz');
    });


SQLSTATE[HY000]: General error: 1 no such column: ... (SQL: CREATE TEMPORARY TABLE __temp__meaning AS SELECT ...)

@salarmehr salarmehr changed the title [bug] placing more than one DDL command in a closure fails Sqlite (5.2 & 5.3) [bug] placing more than one DDL command in a closure fails (5.2 & 5.3) Aug 25, 2016
@GrahamCampbell
Copy link
Member

Thanks. This is not a bug though I'm afraid, just a limitation.

@salarmehr
Copy link
Author

salarmehr commented Aug 25, 2016

@taylorotwell But that works in other DBMSs.

@GrahamCampbell
Copy link
Member

Yeh, like I said, it's a limitation. It's not great I know.

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

No branches or pull requests

2 participants