activerecord-sqlserver-adapter icon indicating copy to clipboard operation
activerecord-sqlserver-adapter copied to clipboard

TinyTds::Error: Type T_FK is not a defined system type.

Open nPaul opened this issue 5 years ago • 4 comments

Rails version 6 multi database using

for example if run db:rollback got error:

--trace log


** Invoke db:rollback (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:rollback
== 20200810025414 AddDescriptionToOrders: reverting ===========================
-- remove_column(:orders, :description, :string)
   -> 0.0017s
== 20200810025414 AddDescriptionToOrders: reverted (0.0026s) ==================

** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke db:load_config 
** Execute db:schema:dump
rails aborted!
ActiveRecord::StatementInvalid: TinyTds::Error: Type T_FK is not a defined system type
```.

other databases is normal dumped after db:migration and db:rollback
this error got also if run
rails db:migrate:down:primary VERSION=123123123

i think sql adapter has bug on dumping command


nPaul avatar Aug 10 '20 03:08 nPaul

FREETDS version

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

nPaul avatar Aug 10 '20 03:08 nPaul