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

Several bugs with MS SQL schema creation #1577

Closed
statyan opened this Issue Jul 13, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@statyan
Contributor

statyan commented Jul 13, 2016

There is an issue with float type column is MSSQL columncompiler. It generates code ADD COLUMN ColName float(8,2), but MSSQL accepts only float(x), where x is size for bits holding mantissa.
MSSQL also have no double type column, float and double from knex should compile to decimal(x,y) column type.
Column type bit is always exactly one bit, so call it with table.column('a').bit(x)', where x is any number, leads to error.
Also, the first and after modifiers are not available for MSSQL.

So, I've fixed this issues and create current Issue just to connect it to the pull request.

statyan added a commit to statyan/knex that referenced this issue Jul 13, 2016

Fixed knex tgriesser#1577
Aslo corrected tests for primarykey

rhys-vdw added a commit that referenced this issue Jul 20, 2016

Fixed knex #1577 (#1578)
* Fixed knex #1577
Aslo corrected tests for primarykey

* Fix for installing from github

* Fix for installing from github

* Fix for installing from github

@elhigu elhigu closed this Jul 21, 2016

smorey2 added a commit that referenced this issue Nov 26, 2016

Fix incorrect MSSQL query building with lock used, with clause and Nu…
…mber with decimal part conversion (#1707)

* Fixed knex #1577
Aslo corrected tests for primarykey

* Fix for installing from github

* Fix for installing from github

* Fix for installing from github

* Move LOCK hint for MSSQL after join component of select

* Add missing import statement

* Added "WITH" clause to select, update, insert and delete queries.
Fixed forUpdate lock query building
Add detection of decimal value of Numeric parameter and set proper sql.Type for it. (Fix for #1604)

* Change let to const for variable declaration

* Fix MSSQL non-numeric parameters binding

elhigu added a commit to elhigu/knex that referenced this issue Feb 15, 2017

Fix incorrect MSSQL query building with lock used, with clause and Nu…
…mber with decimal part conversion (tgriesser#1707)

* Fixed knex tgriesser#1577
Aslo corrected tests for primarykey

* Fix for installing from github

* Fix for installing from github

* Fix for installing from github

* Move LOCK hint for MSSQL after join component of select

* Add missing import statement

* Added "WITH" clause to select, update, insert and delete queries.
Fixed forUpdate lock query building
Add detection of decimal value of Numeric parameter and set proper sql.Type for it. (Fix for tgriesser#1604)

* Change let to const for variable declaration

* Fix MSSQL non-numeric parameters binding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment