summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20230325061452_create_cards.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20230325061452_create_cards.rb b/db/migrate/20230325061452_create_cards.rb
new file mode 100644
index 0000000..6e06e36
--- /dev/null
+++ b/db/migrate/20230325061452_create_cards.rb
@@ -0,0 +1,14 @@
+class CreateCards < ActiveRecord::Migration[7.0]
+ def change
+ create_table :cards do |t|
+ t.string :number
+ t.integer :expiration_month
+ t.integer :expiration_year
+ t.integer :expiration_day
+ t.integer :security_code
+ t.references :user_account, null: false, foreign_key: true
+
+ t.timestamps
+ end
+ end
+end