Created
December 22, 2022 14:10
-
-
Save doolin/ef33e312d40b98c77d6a9214600fcf03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Orders < ActiveRecord::Migration[7.0] | |
def change | |
create_table :orders do |t| | |
t.string :first_name # use Rails validations | |
t.string :last_name, null: false, limit: 128 | |
end | |
end | |
end | |
Orders.migrate(:up) unless Orders.data_source_exists?(:orders) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment