rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
607 stars 189 forks source link

Support for structure.sql seems to be broken #502

Open gucki opened 3 years ago

gucki commented 3 years ago

activerecord-sqlserver-adapter (6.1.0.0) tiny_tds (2.1.5)

Compile-time settings (established with the "configure" script) Version: freetds v1.2.18 freetds.conf directory: /etc MS db-lib source compatibility: yes Sybase binary compatibility: no Thread safety: yes iconv library: yes TDS version: auto iODBC: no unixodbc: yes SSPI "trusted" logins: no Kerberos: no OpenSSL: yes GnuTLS: no MARS: yes

The structure.sql (config.active_record.schema_format = :sql) generated can't be imported (rails db:setup) again. Bugs noticed so far:

aharpervc commented 3 years ago

This seems like it's more related to the AR SQL Server adapter, so probably best to ask over there: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues

gucki commented 3 years ago

Hmm yeah, maybe you are right. But afaik it just calls some command-line tool to generate the file, so most probably they won't be able to do anything about it (too). But I just created an issue there https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/944

Michoels commented 6 months ago

This is still an issue in 2024. The created structure.sql fails to import when running rails db:schema:load.

freddy77 commented 6 months ago

Fixed in FreeTDS 1.4.12 and master branch