Transfer should add copy_from_id

This commit is contained in:
Priit Tark 2015-09-10 14:49:37 +03:00
parent 180c159ed4
commit 2438a4ac75
6 changed files with 83 additions and 40 deletions

View file

@ -0,0 +1,5 @@
class AddCopyFromId < ActiveRecord::Migration
def change
add_column :contacts, :copy_from_id, :integer
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150825125118) do
ActiveRecord::Schema.define(version: 20150910113839) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -201,6 +201,7 @@ ActiveRecord::Schema.define(version: 20150825125118) do
t.integer "legacy_id"
t.string "statuses", array: true
t.hstore "status_notes"
t.integer "copy_from_id"
end
add_index "contacts", ["code"], name: "index_contacts_on_code", using: :btree

View file

@ -596,7 +596,8 @@ CREATE TABLE contacts (
state character varying,
legacy_id integer,
statuses character varying[],
status_notes hstore
status_notes hstore,
copy_from_id integer
);
@ -4928,3 +4929,5 @@ INSERT INTO schema_migrations (version) VALUES ('20150810114746');
INSERT INTO schema_migrations (version) VALUES ('20150825125118');
INSERT INTO schema_migrations (version) VALUES ('20150910113839');