jacquestvanzuydam / laravel-firebird

Firebird Illuminate package for Laravel 5
63 stars 93 forks source link

Run migrations - double quotes #44

Closed ShellOliver closed 7 years ago

ShellOliver commented 7 years ago

When I try run the migrations happens this:

Migration table created successfully. [Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: -206 Dynamic SQL Error SQL error code = -206 Column unknown migration At line 1, column 20 (SQL: select "migration" from "migrations" order by "batch" asc, "migration" asc)

The problem is that in firebird I cant run select "migration" from "migrations" order by "batch" asc, "migration" asc it should be select migration from migrations order by batch asc, migration asc

About double quotes in other places like create table or alter table I resolved in file FirebirdGrammar.php but this query with double quotes seems be default in laravel, I just need to know where laravel build this query for remove the double quotes before run.

Using laravel 5.4, Firebird 2.5 and php 7.

jacquestvanzuydam commented 7 years ago

Hi Sheldon,

Not sure why the query isn't working. As you know Firebird converts table and column names to caps when not using quotes, which is why you need the quotes for Laravel and cross database compatibility.

I ran the query with the quotes and didn't have any problems in Flamerobin.

Perhaps there is someone else here that might have had a similar problem.

ShellOliver commented 7 years ago

Sorry, I was wrong about that, Im new in firebird. But I saw in structure of table migration and "id" is not auto increment, and when laravel try insert data causes error.

Migration table created successfully.
[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: -625 validation error for column "migrations"."id", value " null " (SQL: insert into "migrations" ("migration", "batch") values (2014_10_12_000000_create_users_table, 1)) [PDOException]
SQLSTATE[HY000]: General error: -625 validation error for column "migrations"."id", value " null "

condef5 commented 6 years ago

@ShellOliver As you solved the issue of migrations in firebird, if firebird does not accept autoincrement, please help me.