openstreetmap-website/db/migrate/20250104140952_add_description_to_notes.rb
Nenad Vujicic 16bdcac6d7 Added description, user_id, user_ip columns to notes
Added migration for adding new columns (description, user_id, user_ip) to notes table. Also, migration adds foreign key connecting notes and users tables (using user_id column).
2025-01-13 10:52:38 +01:00

9 lines
345 B
Ruby

class AddDescriptionToNotes < ActiveRecord::Migration[7.2]
def change
add_column :notes, :description, :text, :null => false, :default => ""
add_column :notes, :user_id, :bigint
add_column :notes, :user_ip, :inet
add_foreign_key :notes, :users, :column => :user_id, :name => "notes_user_id_fkey", :validate => false
end
end