From 34f782030033a664c700cc4c37f6c3626b25aae2 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Tue, 6 Feb 2018 23:36:50 +0200 Subject: [PATCH] Do not allow NULL in `epp_sessions.session_id` #700 --- ...80206213435_change_epp_sessions_session_id_to_not_null.rb | 5 +++++ db/structure.sql | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20180206213435_change_epp_sessions_session_id_to_not_null.rb diff --git a/db/migrate/20180206213435_change_epp_sessions_session_id_to_not_null.rb b/db/migrate/20180206213435_change_epp_sessions_session_id_to_not_null.rb new file mode 100644 index 0000000000..887ef3cb45 --- /dev/null +++ b/db/migrate/20180206213435_change_epp_sessions_session_id_to_not_null.rb @@ -0,0 +1,5 @@ +class ChangeEppSessionsSessionIdToNotNull < ActiveRecord::Migration + def change + change_column_null :epp_sessions, :session_id, false + end +end diff --git a/db/structure.sql b/db/structure.sql index 2cad3e06fa..bf3230c575 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1050,7 +1050,7 @@ ALTER SEQUENCE domains_id_seq OWNED BY domains.id; CREATE TABLE epp_sessions ( id integer NOT NULL, - session_id character varying, + session_id character varying NOT NULL, data text, created_at timestamp without time zone, updated_at timestamp without time zone, @@ -5070,3 +5070,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180126104536'); INSERT INTO schema_migrations (version) VALUES ('20180126104903'); +INSERT INTO schema_migrations (version) VALUES ('20180206213435'); +