Ruby on rails 如何将Rails ActiveRecord::迁移方法table_name_options()用于set table prefix?

Ruby on rails 如何将Rails ActiveRecord::迁移方法table_name_options()用于set table prefix?,ruby-on-rails,activerecord,Ruby On Rails,Activerecord,我尝试在拐点中使用此方法。rb: ActiveRecord::Migration.table_name_options ( {table_name_prefix: 'tg_', table_name_suffix: ''}) 或 但它不起作用。您是如何使用它的?你能发布实际的迁移文件吗? ActiveRecord::Migration.table_name_prefix = 'tg_'

我尝试在拐点中使用此方法。rb:

 ActiveRecord::Migration.table_name_options ( {table_name_prefix: 'tg_', table_name_suffix: ''})


但它不起作用。

您是如何使用它的?你能发布实际的迁移文件吗?
ActiveRecord::Migration.table_name_prefix = 'tg_'