image admin

This commit is contained in:
2026-05-05 22:53:55 +02:00
parent 05b8b151cb
commit 4aaed0607c
22 changed files with 222 additions and 53 deletions
@@ -0,0 +1,11 @@
class CreateImages < ActiveRecord::Migration[7.1]
def change
create_table :images do |t|
t.string :filename, null: false
t.string :original_filename, null: false
t.string :content_type, null: false, default: "application/octet-stream"
t.timestamps
end
end
end
@@ -0,0 +1,5 @@
class AddImageIdToSoftwares < ActiveRecord::Migration[7.1]
def change
add_reference :softwares, :image, null: true, foreign_key: true
end
end
@@ -0,0 +1,5 @@
class AddImageIdToMembers < ActiveRecord::Migration[7.1]
def change
add_reference :members, :image, null: true, foreign_key: true
end
end