rails-sqlserver / tiny_tds

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

Can connect to db but db:structure:dump is not right #470

Closed TulioMagnus closed 4 years ago

TulioMagnus commented 4 years ago

Environment

Linux Mint 19

TinyTDS Version and Information

    gem 'tiny_tds', '~> 2.1', '>= 2.1.2'                      

FreeTDS Version

Version: freetds v1.00.82
             freetds.conf directory: /etc/freetds
     MS db-lib source compatibility: no
        Sybase binary compatibility: yes
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 4.2
                              iODBC: no
                           unixodbc: yes
              SSPI "trusted" logins: no
                           Kerberos: yes
                            OpenSSL: no
                             GnuTLS: yes
                               MARS: no

Rails -v: 5.2.4.2

Description

Hi, i'm trying to dump the development DB schemas that are on a legacy DB to load on a docker localhost test DB, using rails db:structure:dump

My legacy DB has multiple schemas and tables, like Security.User, Ticket.Park.

I can connect to the database alright, setting the User model to self.table_name = 'Security.User'

But when i dump the db using rails db:structure:dump it only generates the structure with dbo schema with sysdiagrams table.

I'm usign in config/application.rb: config.active_record.schema_format = :sql

is there anything i can do to dump this thing up?

thanks!

wpolicarpo commented 4 years ago

This is repository and issue tracker are for tiny_tds, not the Rails adapter. Can you please open an issue here https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues?