Closed shial4 closed 6 years ago
The issue is here:
let type = column.type?.create(queryBuilder: QueryBuilder()) {
The QueryBuilder being passed to create is the default QueryBuilder. You would need to pass the database specific QueryBuilder to access the correct type substitution. Each database connection has a queryBuilder property which should allow you to do this.
Let me know if you need more help.
Marking this as resolved.
Context and Description
ERROR: type "double" does not exist
QueryBuilder() for swift type Double retourns "double" instead of "double precision"
Environment Details
Steps to Reproduce
1) Create Model class with Swift.Double properties 2) Run program to setup table and all 3) Modify Model class adding new properties type of Swift.Double 4) Try executing custom query to alter table. (We want to insert new column) 5) Query example above. Type returned is wrong
ERROR: type "double" does not exist
Expected vs. Actual Behaviour
column.type?.create(queryBuilder: QueryBuilder()) For swift type Double should return "double precision". However, at current version
0.3.1
it does return "double".