about summary refs log tree commit diff stats
path: root/db/migrate/20231021020306_create_quotes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20231021020306_create_quotes.rb')
-rw-r--r--db/migrate/20231021020306_create_quotes.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20231021020306_create_quotes.rb b/db/migrate/20231021020306_create_quotes.rb new file mode 100644 index 0000000..60424e5 --- /dev/null +++ b/db/migrate/20231021020306_create_quotes.rb
@@ -0,0 +1,14 @@
1class CreateQuotes < ActiveRecord::Migration[7.0]
2 def change
3 create_table :quotes do |t|
4 t.text :content, null: false
5 t.string :state, null: false
6 t.string :submitter
7 t.text :notes, null: false
8 t.integer :upvotes, null: false, default: 0
9 t.integer :downvotes, null: false, default: 0
10
11 t.timestamps
12 end
13 end
14end