mirror of
https://github.com/internetee/registry.git
synced 2025-05-15 17:07:18 +02:00
parent
c5f8c7e1e8
commit
38f967a7d6
3 changed files with 19 additions and 1 deletions
|
@ -0,0 +1,10 @@
|
||||||
|
class ExtractUserIdFromEppSessionsData < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
EppSession.all.each do |epp_session|
|
||||||
|
user_id = Marshal.load(::Base64.decode64(epp_session.data_before_type_cast))[:api_user_id]
|
||||||
|
user = ApiUser.find(user_id)
|
||||||
|
epp_session.user = user
|
||||||
|
epp_session.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
5
db/migrate/20180207072139_remove_epp_sessions_data.rb
Normal file
5
db/migrate/20180207072139_remove_epp_sessions_data.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class RemoveEppSessionsData < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
remove_column :epp_sessions, :data, :string
|
||||||
|
end
|
||||||
|
end
|
|
@ -1051,7 +1051,6 @@ ALTER SEQUENCE domains_id_seq OWNED BY domains.id;
|
||||||
CREATE TABLE epp_sessions (
|
CREATE TABLE epp_sessions (
|
||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
session_id character varying NOT NULL,
|
session_id character varying NOT NULL,
|
||||||
data text,
|
|
||||||
created_at timestamp without time zone,
|
created_at timestamp without time zone,
|
||||||
updated_at timestamp without time zone,
|
updated_at timestamp without time zone,
|
||||||
registrar_id integer,
|
registrar_id integer,
|
||||||
|
@ -5083,3 +5082,7 @@ INSERT INTO schema_migrations (version) VALUES ('20180206213435');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20180206234620');
|
INSERT INTO schema_migrations (version) VALUES ('20180206234620');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20180207071528');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20180207072139');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue