summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20241231134759_add_name_to_tartiflettes.rb5
-rw-r--r--db/schema.rb3
-rw-r--r--db/seeds.rb17
3 files changed, 20 insertions, 5 deletions
diff --git a/db/migrate/20241231134759_add_name_to_tartiflettes.rb b/db/migrate/20241231134759_add_name_to_tartiflettes.rb
new file mode 100644
index 0000000..cc74a0a
--- /dev/null
+++ b/db/migrate/20241231134759_add_name_to_tartiflettes.rb
@@ -0,0 +1,5 @@
+class AddNameToTartiflettes < ActiveRecord::Migration[8.0]
+ def change
+ add_column :tartiflettes, :name, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index eb5b7e8..4be092f 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[8.0].define(version: 2024_12_27_181134) do
+ActiveRecord::Schema[8.0].define(version: 2024_12_31_134759) do
create_table "scores", force: :cascade do |t|
t.integer "tartiflette_id", null: false
t.integer "scoring_criterium_id", null: false
@@ -41,6 +41,7 @@ ActiveRecord::Schema[8.0].define(version: 2024_12_27_181134) do
t.integer "scoring_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.string "name"
end
create_table "users", force: :cascade do |t|
diff --git a/db/seeds.rb b/db/seeds.rb
index 7fb3253..c70512c 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -10,14 +10,23 @@
User.create!(
email_address: "wtt@marius-peter.com",
- password: "password",
- password_confirmation: "password",
+ password: "#wtt2024",
+ password_confirmation: "#wtt2024",
admin: true
)
puts "Seeded admin account"
-(1..8).each do |id|
- Tartiflette.create!(scoring_id: id)
+[ "Tartiff Clofi",
+ "Tartiff Caraïbe-Ananas",
+ "L'Irrésistible",
+ "[quatre]",
+ "[cinq]",
+ "[six]",
+ "[sept]",
+ "[huit]",
+].each_with_index do |name, id|
+ scoring_id = id + 1
+ Tartiflette.create!(name: name, scoring_id: scoring_id)
end
puts "Seeded tartiflettes"
Copyright 2019--2025 Marius PETER