about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/schema.rb8
-rw-r--r--db/seeds.rb20
2 files changed, 24 insertions, 4 deletions
diff --git a/db/schema.rb b/db/schema.rb
index e781cf9..f6065a6 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -2,15 +2,15 @@
 # of editing this file, please use the migrations feature of Active Record to
 # incrementally modify your database, and then regenerate this schema definition.
 #
-# This file is the source Rails uses to define your schema when running `rails
-# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
+# This file is the source Rails uses to define your schema when running `bin/rails
+# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
 # be faster and is potentially less error prone than running all of your
 # migrations from scratch. Old migrations may fail to apply correctly if those
 # migrations use external dependencies or application code.
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 2021_08_21_230356) do
+ActiveRecord::Schema.define(version: 2021_08_23_030916) do
 
   create_table "machines", force: :cascade do |t|
     t.string "name"
@@ -21,7 +21,7 @@ ActiveRecord::Schema.define(version: 2021_08_21_230356) do
 
   create_table "players", force: :cascade do |t|
     t.string "name"
-    t.integer "strikes"
+    t.integer "strikes", default: 0
     t.boolean "paid"
     t.datetime "created_at", precision: 6, null: false
     t.datetime "updated_at", precision: 6, null: false
diff --git a/db/seeds.rb b/db/seeds.rb
index 1beea2a..696eabf 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -5,3 +5,23 @@
 #
 #   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
 #   Character.create(name: 'Luke', movie: movies.first)
+
+machines = [
+  ["Avengers", "Pro"],
+  ["Deadpool", "Pro"],
+  ["Family Guy", "Pro"],
+  ["Guardians of the Galaxy", "Pro"],
+  ["Jurassic Park", "Pro"],
+  ["Monster Bash", "Pro"],
+  ["Rick & Morty", "Pro"],
+  ["Simpsons", "Pro"],
+  ["Star Trek", "Pro"],
+  ["Star Wars", "Pro"],
+  ["Teenage Mutant Ninja Turtles", "Pro"],
+  ["The Mandalorian", "Pro"],
+  ["Walking Dead", "Pro"]
+]
+
+machines.each do |name, edition|
+  Machine.create(name: name, edition: edition)
+end