about summary refs log tree commit diff stats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20231021020306_create_quotes.rb14
-rw-r--r--db/schema.rb13
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 @@
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
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
13ActiveRecord::Schema[7.0].define(version: 2023_10_20_195330) do 13ActiveRecord::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