summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-04-06 20:11:30 -0400
committerDavid Gay <david@davidgay.org>2021-04-06 20:11:30 -0400
commit84db8024dfe821efefadf77f91922f0944833a40 (patch)
treeb91ba0785f26131eac63512484df664f6f44407a /db
parentbf4912554058164fabd410b3082b6aa53e7ed026 (diff)
PTU action types
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210407000858_create_ptu_action_types.rb9
-rw-r--r--db/schema.rb8
-rw-r--r--db/seeds.rb2
3 files changed, 18 insertions, 1 deletions
diff --git a/db/migrate/20210407000858_create_ptu_action_types.rb b/db/migrate/20210407000858_create_ptu_action_types.rb
new file mode 100644
index 0000000..fc33972
--- /dev/null
+++ b/db/migrate/20210407000858_create_ptu_action_types.rb
@@ -0,0 +1,9 @@
+class CreatePtuActionTypes < ActiveRecord::Migration[6.1]
+ def change
+ create_table :ptu_action_types do |t|
+ t.string :name
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index af23532..354a229 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,11 +10,17 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2021_04_06_235514) do
+ActiveRecord::Schema.define(version: 2021_04_07_000858) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
+ create_table "ptu_action_types", force: :cascade do |t|
+ t.string "name"
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ end
+
create_table "ptu_frequencies", force: :cascade do |t|
t.string "name"
t.datetime "created_at", precision: 6, null: false
diff --git a/db/seeds.rb b/db/seeds.rb
index efd1ce7..6d2b152 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -12,3 +12,5 @@
["Static", "At-Will", "EOT", "Scene", "Scene x2", "Scene x3", "Daily"].each do |name|
PtuFrequency.find_or_create_by(name: name)
end
+
+%w[Standard Shift Swift Free].each { |name| PtuActionType.find_or_create_by(name: name) }