18 lines
513 B
Ruby
18 lines
513 B
Ruby
class CreateDomainPerceptualHashes < ActiveRecord::Migration[7.0]
|
|
def change
|
|
create_table :domain_perceptual_hashes do |t|
|
|
t.references :thumbnail,
|
|
null: false,
|
|
foreign_key: {
|
|
to_table: :domain_post_file_thumbnails,
|
|
},
|
|
index: true
|
|
t.string :algorithm, null: false, index: true
|
|
t.vector :hash_value
|
|
t.timestamps
|
|
end
|
|
|
|
# TODO - figure out right index type for hash_value
|
|
end
|
|
end
|