aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20241114152218_create_resource_types.rb9
-rw-r--r--db/migrate/20241114152810_add_resource_type_to_pdf_resource.rb5
2 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20241114152218_create_resource_types.rb b/db/migrate/20241114152218_create_resource_types.rb
new file mode 100644
index 0000000..f7f9de6
--- /dev/null
+++ b/db/migrate/20241114152218_create_resource_types.rb
@@ -0,0 +1,9 @@
+class CreateResourceTypes < ActiveRecord::Migration[8.0]
+ def change
+ create_table :resource_types do |t|
+ t.string :name
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20241114152810_add_resource_type_to_pdf_resource.rb b/db/migrate/20241114152810_add_resource_type_to_pdf_resource.rb
new file mode 100644
index 0000000..e1c853b
--- /dev/null
+++ b/db/migrate/20241114152810_add_resource_type_to_pdf_resource.rb
@@ -0,0 +1,5 @@
+class AddResourceTypeToPdfResource < ActiveRecord::Migration[8.0]
+ def change
+ add_reference :pdfresources, :resource_type, foreign_key: true
+ end
+end