Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

rails start id to 1000

create_table :orders do |t|
  t.integer  :price
  # other stuff
end

# for Postgres
execute "SELECT setval('orders_id_seq', 1000)"

# and for mysql ...
execute "ALTER TABLE products AUTO_INCREMENT = 1000"
Comment

PREVIOUS NEXT
Code Example
Ruby :: ||= ruby 
Ruby :: ros2 publish message command line 
Ruby :: string formattion ruby 
Ruby :: ruby do something x times 
Ruby :: ruby rspec change matcher 
Ruby :: ruby named parameters 
Ruby :: ruby bundler load error 
Ruby :: rails faker address 
Ruby :: ruby find by multiple columns 
Ruby :: using nested select in rails query 
Ruby :: cant find user without id error in rails 
Ruby :: rails format number k - m 
Ruby :: how to overwrite last line of console in ubuntu rails 
Ruby :: is codegrepper rafe approved? 
Ruby :: ruby hash from array 
Ruby :: ruby &w 
Ruby :: rails class sti reminders 
R :: how to set a column as index r 
R :: how to add new value in R list 
R :: r mean by group 
R :: set row names in r 
R :: superscript in r 
R :: r merge columns 
R :: how to use ifelse in r 
R :: R squared regression in r with ggplot 
R :: for loop in R dictionary 
R :: how to convert categorical data to numerical data in r 
R :: Use regex to extract row in R (problem) 
R :: Which library allows modification of Excel files from R 
R :: print string without quotes and escape sequence r 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =