I am not familiar with MySQL, but for Postgres you can do something similar in your migration file:
class CreateCustomers < ActiveRecord::Migration def self.up create_table :customers do |t| t.string :name t.timestamps end execute "SELECT setval('customers_id_seq', 1000);" end
Note that the call to the execution method is performed outside the create_table block.
source share