# frozen_string_literal: true class CreateAPIImages < ActiveRecord::Migration[7.1] def change create_table(:api_images, id: :uuid) do |t| t.references(:creator, foreign_key: { to_table: :api_users }, null: false) t.inet(:creator_ip_addr, null: false) t.string(:artists, array: true, default: []) t.string(:sources, array: true, default: []) t.integer(:width, null: false) t.integer(:height, null: false) t.string(:mime_type, null: false) t.string(:category, null: false) t.string(:created_by, null: false) t.string(:original_url) t.string(:file_ext, null: false) t.integer(:file_size, null: false) t.timestamps end end end