about summary refs log tree commit diff stats
path: root/db/migrate/20231021020306_create_quotes.rb
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-21 00:25:50 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-21 00:25:50 -0400
commit96813a5e508a54257ef03be613a704f1f71af53d (patch)
treea50f5c8dc27304a3ca27366b6268a72804727e16 /db/migrate/20231021020306_create_quotes.rb
parent2a7a19c93ee0e0d77e4e388d43f36a721c7ab715 (diff)
downloadthoughts-96813a5e508a54257ef03be613a704f1f71af53d.tar.gz
thoughts-96813a5e508a54257ef03be613a704f1f71af53d.tar.bz2
thoughts-96813a5e508a54257ef03be613a704f1f71af53d.zip
Added quotes database
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