mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
parent
8e90769366
commit
2ff05c4b00
3 changed files with 11 additions and 2 deletions
|
@ -0,0 +1,7 @@
|
||||||
|
class ChangePricelistDurationTypeToInterval < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
execute <<-SQL
|
||||||
|
ALTER TABLE pricelists ALTER COLUMN duration TYPE interval USING (trim(duration)::interval)
|
||||||
|
SQL
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20170422142116) do
|
ActiveRecord::Schema.define(version: 20170422162824) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
|
@ -2542,7 +2542,7 @@ CREATE TABLE pricelists (
|
||||||
updator_str character varying,
|
updator_str character varying,
|
||||||
created_at timestamp without time zone NOT NULL,
|
created_at timestamp without time zone NOT NULL,
|
||||||
updated_at timestamp without time zone NOT NULL,
|
updated_at timestamp without time zone NOT NULL,
|
||||||
duration character varying,
|
duration interval,
|
||||||
operation_category character varying
|
operation_category character varying
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -5221,3 +5221,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170422130054');
|
||||||
|
|
||||||
INSERT INTO schema_migrations (version) VALUES ('20170422142116');
|
INSERT INTO schema_migrations (version) VALUES ('20170422142116');
|
||||||
|
|
||||||
|
INSERT INTO schema_migrations (version) VALUES ('20170422162824');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue