我的Rails应用程序有一个远程数据库,在那里我独立于应用程序创建和存储表格,它是“无模型”的,我不需要或不想为这些表格使用模型或ORM。为了访问数据,我使用一个简单的
我的
ActiveRecord :: Base.connection.execute(query)
命令。我的
schema.rb
有很多被注释掉的消息:# Could not dump table "geographic_data" because of following StandardError
# Unknown type 'geometry(MultiLineString,4326)' for column 'geom'
我的问题/疑惑:
如果我安装ActiveRecord PostGIS适配器,是否会清除我在这些非模型表中已经拥有的所有数据?这是可能发生的情况吗?
add_column :people, :string, :first_name
而不是add_column :people, :first_name, :string
,就会发生这种情况。 - Kris