Skip to content

Instantly share code, notes, and snippets.

@lxneng
Created March 14, 2010 03:08
Show Gist options
  • Save lxneng/331743 to your computer and use it in GitHub Desktop.
Save lxneng/331743 to your computer and use it in GitHub Desktop.
set default ActiveRecord id (mysql)
class CreateCustomers < ActiveRecord::Migration
def self.up
create_table :customers do |t|
t.string :name
t.timestamps
end
execute "ALTER TABLE customers AUTO_INCREMENT = 1000;"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment