Skip to content
Browse files

You can add a custom primary key to a table

  • Loading branch information...
1 parent 90a2438 commit 23a98ffbd9b39ee70094ded1671cf1879d0d3591 @KensoDev KensoDev committed
View
5 activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -141,6 +141,11 @@ def column_exists?(table_name, column_name, type = nil, options = {})
# name varchar(80)
# )
#
+ # ====== Add a custom primary key column
+ # create_table(:objects, :id => false) do |t|
+ # t.string :slug, :primary => true
+ # end
+ #
# ====== Do not add a primary key column
# create_table(:categories_suppliers, :id => false) do |t|
# t.column :category_id, :integer

0 comments on commit 23a98ff

Please sign in to comment.
Something went wrong with that request. Please try again.