image admin
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user