diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-21 00:25:50 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-21 00:25:50 -0400 |
commit | 96813a5e508a54257ef03be613a704f1f71af53d (patch) | |
tree | a50f5c8dc27304a3ca27366b6268a72804727e16 /db | |
parent | 2a7a19c93ee0e0d77e4e388d43f36a721c7ab715 (diff) | |
download | thoughts-96813a5e508a54257ef03be613a704f1f71af53d.tar.gz thoughts-96813a5e508a54257ef03be613a704f1f71af53d.tar.bz2 thoughts-96813a5e508a54257ef03be613a704f1f71af53d.zip |
Added quotes database
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20231021020306_create_quotes.rb | 14 | ||||
-rw-r--r-- | db/schema.rb | 13 |
2 files changed, 26 insertions, 1 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 @@ | |||
1 | class 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 | ||
14 | end | ||
diff --git a/db/schema.rb b/db/schema.rb index f8a8c49..541f1c1 100644 --- a/db/schema.rb +++ b/db/schema.rb | |||
@@ -10,7 +10,7 @@ | |||
10 | # | 10 | # |
11 | # It's strongly recommended that you check this file into your version control system. | 11 | # It's strongly recommended that you check this file into your version control system. |
12 | 12 | ||
13 | ActiveRecord::Schema[7.0].define(version: 2023_10_20_195330) do | 13 | ActiveRecord::Schema[7.0].define(version: 2023_10_21_020306) do |
14 | create_table "active_storage_attachments", force: :cascade do |t| | 14 | create_table "active_storage_attachments", force: :cascade do |t| |
15 | t.string "name", null: false | 15 | t.string "name", null: false |
16 | t.string "record_type", null: false | 16 | t.string "record_type", null: false |
@@ -324,6 +324,17 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_20_195330) do | |||
324 | t.index ["world_ribbon_id"], name: "index_pokeviewer_trainers_on_world_ribbon_id" | 324 | t.index ["world_ribbon_id"], name: "index_pokeviewer_trainers_on_world_ribbon_id" |
325 | end | 325 | end |
326 | 326 | ||
327 | create_table "quotes", force: :cascade do |t| | ||
328 | t.text "content", null: false | ||
329 | t.string "state", null: false | ||
330 | t.string "submitter" | ||
331 | t.text "notes", null: false | ||
332 | t.integer "upvotes", default: 0, null: false | ||
333 | t.integer "downvotes", default: 0, null: false | ||
334 | t.datetime "created_at", null: false | ||
335 | t.datetime "updated_at", null: false | ||
336 | end | ||
337 | |||
327 | create_table "records", force: :cascade do |t| | 338 | create_table "records", force: :cascade do |t| |
328 | t.text "description" | 339 | t.text "description" |
329 | t.string "recordable_type", limit: 191 | 340 | t.string "recordable_type", limit: 191 |