text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
-- This file should undo anything in `up.sql` CREATE OR REPLACE FUNCTION payment_service_api.pay(data json) RETURNS json LANGUAGE plpgsql AS $function$ declare _project project_service.projects; _result json; _payment payment_service.catalog_payments; _user_id uuid; _user community_service.users; _version payment_service.catalog_payment_versions; _credit_card payment_service.credit_cards; _subscription payment_service.subscriptions; _reward project_service.rewards; _refined jsonb; _external_id text; _is_international boolean default false; begin -- check if is foreign payment _is_international := coalesce(nullif(($1->>'is_international'), '')::boolean, false); -- ensure that roles come from any permitted perform core.force_any_of_roles('{platform_user, scoped_user}'); -- ensure that foreign payment can't generate a boleto if _is_international and ($1->>'payment_method')::text = 'boleto' then raise 'invalid_payment_method'; end if; -- check if is repaying a error payment if ($1->>'payment_id')::uuid is not null then select * from payment_service.catalog_payments cp where cp.id = ($1->>'payment_id')::uuid and core.is_owner_or_admin(cp.user_id) and platform_id = core.current_platform_id() and cp.status = 'error' into _payment; if _payment.subscription_id is not null then select * from payment_service.subscriptions where id = _payment.subscription_id into _subscription; end if; if _payment.id is null then raise exception 'cant pay this payment'; end if; end if; -- check roles to define how user_id is set if current_role = 'platform_user' then _user_id := ($1 ->> 'user_id')::uuid; _external_id := ($1 ->> 'external_id')::text; else _user_id := core.current_user_id(); end if; -- check if project exists on platform if ($1->>'project_id')::uuid is null OR not core.project_exists_on_platform(($1->>'project_id')::uuid, core.current_platform_id()) then raise exception 'project not found on platform: %, platform: %', ($1->>'project_id'), core.current_platform_id(); end if; -- -- get project select * from project_service.projects p where p.id = ($1->>'project_id')::uuid and p.platform_id = core.current_platform_id() into _project; -- only sub projects can use this route if _project.mode <> 'sub' then raise 'only_sub_projects'; end if; -- set user into variable select * from community_service.users where id = _user_id and platform_id = core.current_platform_id() into _user; -- check if user exists on current platform if _user.id is null then raise exception 'missing user'; end if; -- get and check if reward exists if ($1->>'reward_id')::uuid is not null then select * from project_service.rewards where project_id = ($1->>'project_id')::uuid and id = ($1->>'reward_id')::uuid into _reward; if _reward.id is null then raise 'reward not found: %', ($1->>'reward_id'); end if; if ($1->>'amount')::decimal < (_reward.data->>'minimum_value')::decimal then raise 'payment amount is bellow of reward minimum %', (_reward.data->>'minimum_value')::decimal; end if; end if; -- fill ip address to received params _refined := jsonb_set(($1)::jsonb, '{current_ip}'::text[], to_jsonb(core.force_ip_address()::text)); -- if user already has filled document_number/name/email should use then if not core_validator.is_empty((_user.data->>'name')::text) then _refined := jsonb_set(_refined, '{customer,name}', to_jsonb(_user.data->>'name'::text)); end if; if not core_validator.is_empty((_user.data->>'email')::text) then _refined := jsonb_set(_refined, '{customer,email}', to_jsonb(_user.data->>'email'::text)); end if; if not core_validator.is_empty((_user.data->>'document_number')::text) then _refined := jsonb_set(_refined, '{customer,document_number}', to_jsonb(_user.data->>'document_number'::text)); end if; -- fill with anonymous _refined := jsonb_set(_refined, '{anonymous}'::text[], to_jsonb(coalesce(($1->>'anonymous')::boolean, false))); -- fill with is_international _refined := jsonb_set(_refined, '{is_international}'::text[], to_jsonb(_is_international)); -- generate a base structure to payment json _refined := (payment_service._serialize_payment_basic_data((_refined)::json))::jsonb; -- if payment_method is credit_card should check for card_hash or card_id if _refined->>'payment_method'::text = 'credit_card' then -- fill with credit_card_owner_document _refined := jsonb_set( _refined, '{credit_card_owner_document}'::text[], to_jsonb( coalesce( replace(replace(replace(($1->> 'credit_card_owner_document')::text, '.', ''), '/', ''), '-', '')::text , '' ) ) ); -- fill with save_card _refined := jsonb_set(_refined, '{save_card}'::text[], to_jsonb(coalesce(($1->>'save_card')::boolean, false))); -- check if card_hash or card_id is present if core_validator.is_empty((($1)->>'card_hash')::text) and core_validator.is_empty((($1)->>'card_id')::text) then raise 'missing card_hash or card_id'; end if; -- if has card_id check if user is card owner if not core_validator.is_empty((($1)->>'card_id')::text) then select cc.* from payment_service.credit_cards cc where cc.user_id = _user_id and cc.id = (($1)->>'card_id')::uuid into _credit_card; if _credit_card.id is null then raise 'invalid card_id'; end if; _refined := jsonb_set(_refined, '{card_id}'::text[], to_jsonb(_credit_card.id::text)); elsif not core_validator.is_empty((($1)->>'card_hash')::text) then _refined := jsonb_set(_refined, '{card_hash}'::text[], to_jsonb($1->>'card_hash'::text)); end if; end if; -- check if document_number is a valid format if is not international if not _is_international then if not core_validator.verify_cpf(_refined -> 'customer' ->> 'document_number'::text) and not core_validator.verify_cnpj(_refined -> 'customer' ->> 'document_number'::text) then raise 'invalid_document'; end if; if not core_validator.is_empty((_refined->>'credit_card_owner_document')::text) and not core_validator.verify_cpf(_refined->>'credit_card_owner_document') and not core_validator.verify_cnpj(_refined->>'credit_card_owner_document') then raise 'invalid_card_owner_document'; end if; end if; if _payment.id is not null then update payment_service.catalog_payments set data = _refined where id = _payment.id returning * into _payment; perform payment_service.transition_to(_payment, 'pending', row_to_json(_payment)); else -- insert payment in table insert into payment_service.catalog_payments ( external_id, platform_id, project_id, user_id, reward_id, data, gateway ) values ( _external_id, core.current_platform_id(), ($1->>'project_id')::uuid, _user_id, _reward.id, _refined, coalesce(($1->>'gateway')::text, 'pagarme') ) returning * into _payment; -- check if payment is a subscription to create one if nullif(($1->>'subscription'), '') is not null and ($1->>'subscription')::boolean then insert into payment_service.subscriptions ( platform_id, credit_card_id, project_id, user_id, reward_id, checkout_data ) values (_payment.platform_id, _credit_card.id, _payment.project_id, _payment.user_id, _reward.id, payment_service._serialize_subscription_basic_data(_payment.data::json)::jsonb) returning * into _subscription; update payment_service.catalog_payments set subscription_id = _subscription.id where id = _payment.id; end if; end if; -- insert first payment version insert into payment_service.catalog_payment_versions ( catalog_payment_id, data ) values ( _payment.id, _payment.data ) returning * into _version; -- build result json with payment_id and subscription_id select json_build_object( 'id', _payment.id, 'subscription_id', _subscription.id, 'old_version_id', _version.id ) into _result; -- notify to backend processor via listen PERFORM pg_notify('payment_stream', json_build_object( 'action', 'process_payment', 'id', _payment.id, 'subscription_id', _subscription.id, 'created_at', _payment.created_at::timestamp, 'sent_to_queue_at', now()::timestamp )::text ); return _result; end; $function$;
the_stack
create table dcs_cpu( idle real check(idle > 0), vcpu_num int, node text, scope_name text, server_ip text not null, iowait real, time_string timestamp ); insert into dcs_cpu VALUES(1.0,1,'node_a','scope_a','1.1.1.1',1.0,'2019-07-12 00:10:10'); insert into dcs_cpu VALUES(2.0,2,'node_b','scope_a','1.1.1.2',2.0,'2019-07-12 00:12:10'); insert into dcs_cpu VALUES(3.0,3,'node_c','scope_b','1.1.1.3',3.0,'2019-07-12 00:13:10'); select time_window(interval '1 min',time_string),server_ip from dcs_cpu order by server_ip; select time_fill(interval '1 min',time_string,'2019-07-12 00:09:00','2019-07-12 00:14:00'),avg(idle) from dcs_cpu group by time_fill order by time_fill; select time_fill(interval '1 min',time_string,'2019-07-12 00:09:00','2019-07-12 00:14:00'), fill_last(avg(idle)) from dcs_cpu group by time_fill order by time_fill; select first(array_agg(idle),array_agg(time_string)), sum(idle) from dcs_cpu group by scope_name order by scope_name; select last(array_agg(idle),array_agg(time_string)), sum(idle) from dcs_cpu group by scope_name order by scope_name; drop table dcs_cpu; --- --- time window --- \set ON_ERROR_STOP 1 SELECT time_window(interval '1 microsecond', '2019-07-12 11:09:01.001'::timestamptz); SELECT time_window(interval '1 millisecond', '2019-07-12 11:09:01.0000001'::timestamptz); SELECT time_window(interval '1 second', '2019-07-12 11:09:01.001'::timestamptz); SELECT time_window(interval '1 min', '2019-07-12 11:09:01'::timestamptz); SELECT time_window(interval '1 hour', '2019-07-12 11:09:01'::timestamptz); SELECT time_window(interval '1 day', '2019-07-12 11:09:01'::timestamptz); ------------------------------------------ SELECT time_window(interval '1 week', '2019-07-12 11:09:01'::timestamptz); SELECT time_window(interval '1 microsecond', '2019-07-12 11:09:01.001'::timestamp); SELECT time_window(interval '1 millisecond', '2019-07-12 11:09:01.0000001'::timestamp); SELECT time_window(interval '1 second', '2019-07-12 11:09:01.001'::timestamp); SELECT time_window(interval '1 min', '2019-07-12 11:09:01'::timestamp); SELECT time_window(interval '1 hour', '2019-07-12 11:09:01'::timestamp); SELECT time_window(interval '1 day', '2019-07-12 11:09:01'::timestamp); ------------------------------------------ SELECT time_window(interval '1 week', '2019-07-12 11:09:01'::timestamp); SELECT time_window(interval '10 week', '2019-07-12 11:09:01'::timestamp); SELECT time_window(interval '100 day', '2019-07-12 11:09:01'::timestamp); SELECT time_window(interval '1000 hour', '2019-07-12 11:09:01'::timestamp); SELECT time_window(interval '1 min', '2019-07-12 11:09:01'); SELECT time_window(1, '2019-07-12 11:09:01'::timestamptz); SELECT time_window(NULL, '2019-07-12 11:09:01'::timestamptz); ------------------------------------------ SELECT time_window(interval '1 min', NULL); ------------------------------------------ SELECT time_window(interval '1 min', NULL); ------------------------------------------ \set ON_ERROR_STOP 0 SELECT time_window(interval '1 month', '2019-07-12 11:09:01'::timestamptz); SELECT time_window(interval '1 year', '2019-07-12 11:09:01'::timestamptz); SELECT time_window(interval '1 month', '2019-07-12 11:09:01'::timestamp); SELECT time_window(interval '1 year', '2019-07-12 11:09:01'::timestamp); SELECT time_window(interval '1 min', 1); SELECT time_window(-1, '2019-07-12 11:09:01'::timestamptz); SELECT time_window(10000000000000, '2019-07-12 11:09:01'::timestamptz); SELECT time_window(interval '1 min', 'test'); \set ON_ERROR_STOP 1 -- test multiple time_window calls SELECT time_window(interval '1 min',time),time_window(interval '3 min',time),time_window(interval '3 min',time,'2019-07-11 00:02:05'::timestamptz) FROM (VALUES ('2019-07-12 00:00:05'::timestamptz),('2019-07-12 00:02:10'::timestamptz)) v(time); SELECT time_window(interval '1 min',time),time_window(interval '3 min',time) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1,2; -- test nested time_window calls SELECT time_window(interval '3 min',time_window(interval '1 min',time)) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz),('2019-07-12 00:05:01'::timestamptz)) v(time); -- test references to different columns SELECT time_window(interval '1 min',t) as t, min(t),max(t),min(v),max(v) FROM(VALUES ('2019-07-12 00:00:01'::timestamptz,3), ('2019-07-12 00:00:01'::timestamptz,4),('2019-07-12 00:03:01'::timestamptz,5),('2019-07-12 00:03:01'::timestamptz,6)) tb(t,v) GROUP BY 1 ORDER BY 1; -- test gap fill without rows in resultset SELECT time_window(interval '1 min',time), min(time) FROM ( VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) WHERE false GROUP BY 1 ORDER BY 1; -- test coalesce SELECT time_window(interval '1 min',time), coalesce(min(time),'2019-07-11 23:59:01'::timestamptz), coalesce(min(value),0), coalesce(min(value),7) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz,1),('2019-07-12 00:01:00'::timestamptz,NULL),('2019-07-12 00:03:00'::timestamptz,3)) v(time,value) GROUP BY 1 ORDER BY 1; -- test over SELECT time_window(interval '1 min',time), min(time), 4 as c, lag(min(time)) OVER () FROM (VALUES ('2019-07-12 00:01:01'::timestamptz),('2019-07-12 00:02:01'::timestamptz),('2019-07-12 00:03:01'::timestamptz)) v(time) GROUP BY 1; --- --- first / last --- \set ON_ERROR_STOP 1 -- test different type SELECT first(array_agg(1),array_agg('2019-07-12 00:01:01'::timestamptz)),last(array_agg(2),array_agg('2019-07-12 00:01:01'::timestamptz)); SELECT first(array_agg(NULL::int),array_agg('2019-07-12 00:01:01'::timestamptz)),last(array_agg(NULL::int),array_agg('2019-07-12 00:01:01'::timestamptz)); SELECT first(array_agg('as'::text),array_agg('2019-07-12 00:01:01'::timestamptz)),last(array_agg('sa'::text),array_agg('2019-07-12 00:01:01'::timestamptz)); SELECT first(array_agg(1::int),array_agg(NULL::timestamptz)),last(array_agg(2::int),array_agg(NULL::timestamptz)); SELECT first(array_agg('2019-07-12 00:02:01'::timestamptz),array_agg('2019-07-12 00:01:01'::timestamptz)), last(array_agg('2019-07-12 00:03:01'::timestamptz),array_agg('2019-07-12 00:01:01'::timestamptz)); SELECT first(array_agg(NULL::int),array_agg(NULL::timestamptz)),last(array_agg(NULL::int),array_agg(NULL::timestamptz)); SELECT first(array_agg(repeat('4',4)),array_agg(NULL::timestamptz)),last(array_agg(repeat('4',4)),array_agg(NULL::timestamptz)); -- test unmatched input length SELECT first(ARRAY[1,2,3],array_agg('2019-07-12 00:01:01'::timestamptz)),last(ARRAY[1,2,3],array_agg('2019-07-12 00:01:01'::timestamptz)); SELECT first(ARRAY[2],ARRAY['2019-07-12 00:00:01'::timestamptz,'2019-07-12 00:01:01'::timestamptz]), last(ARRAY[1],ARRAY['2019-07-12 00:00:01'::timestamptz,'2019-07-12 00:01:01'::timestamptz]); SELECT first(array_agg(value),array_agg(time)),last(array_agg(value),array_agg(time)) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, 2),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); SELECT first(array_agg(value),array_agg(time)),last(array_agg(value),array_agg(time)) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, 2),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value) GROUP BY value; SELECT first(array_agg(value),array_agg(time)),last(array_agg(value),array_agg(time)) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, 2),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value) GROUP BY time; \set ON_ERROR_STOP 0 SELECT first(1,2),last(1,2); SELECT first(NULL,array_agg('2019-07-12 00:01:01'::timestamptz)), last(NULL,array_agg('2019-07-12 00:01:01'::timestamptz)); SELECT first(NULL,array_agg('2019-07-12 00:01:01'::timestamptz)), last(NULL,array_agg('2019-07-12 00:01:01'::timestamptz)); SELECT first(array_agg(time),array_agg(value)),last(array_agg(time),array_agg(value)) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, 2),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); -- test nested time_window calls SELECT first(array_agg(last(value)),array_agg(time)) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, 2),('2019-07-12 00:02:00'::timestamptz, 1)) v(time,value) GROUP BY value; -- test result as group by reference SELECT first(array_agg(value),array_agg(time)),last(array_agg(value),array_agg(time)) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, 2),('2019-07-12 00:02:00'::timestamptz, 1)) v(time,value) GROUP BY 1; \set ON_ERROR_STOP 1 -- test first without rows in resultset SELECT first(array_agg(time),array_agg(time)), last(array_agg(time),array_agg(time)), min(time) FROM ( VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) WHERE false GROUP BY time ORDER BY 1; -- test over SELECT first(array_agg(time),array_agg(time)), last(array_agg(time),array_agg(time)), min(time), 4 as c, lag(min(time)) OVER () FROM (VALUES ('2019-07-12 00:01:01'::timestamptz),('2019-07-12 00:02:01'::timestamptz),('2019-07-12 00:03:01'::timestamptz)) v(time) GROUP BY time; \set ON_ERROR_STOP 1 --- --- fill --- -- test different argument in over SELECT time , CASE WHEN value is not null THEN value else fill(value) over(partition by time) END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over(partition by value) END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over(partition by time,value) END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over(order by value,time) END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over(order by time,value) END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over(partition by time order by value) END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over(partition by value order by time) END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); -- test different type in fill SELECT time , CASE WHEN value is not null THEN value else fill(value) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 'a'),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 'c')) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, ARRAY[1,2,3]),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, ARRAY[4,5,6])) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, repeat('4',4)),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, repeat('4',4))) v(time,value); SELECT time , CASE WHEN value is not null THEN value else fill(value) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, '2019-07-12 00:00:00'::timestamptz), ('2019-07-12 00:00:00'::timestamptz, NULL), ('2019-07-12 00:02:00'::timestamptz, '2019-07-12 00:00:00'::timestamptz)) v(time,value); -- test duplicate call SELECT time , CASE WHEN value is not null THEN value else fill(value) over() END ,CASE WHEN value is not null THEN value else fill(value) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); -- test with group SELECT min(time) , CASE WHEN min(value) is not null THEN min(value) else fill(min(value)) over() END ,tag FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1 ,'a'),('2019-07-12 00:00:00'::timestamptz, NULL ,'a'),('2019-07-12 00:02:00'::timestamptz, 3 ,'a')) v(time,value,tag) GROUP BY 3; \set ON_ERROR_STOP 0 -- test nested time_fill calls SELECT time , CASE WHEN value is not null THEN value else fill(CASE WHEN value is not null THEN value else fill(value) over() END) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value); -- test with group SELECT time , CASE WHEN value is not null THEN value else fill(value) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value) GROUP BY 2; SELECT time , CASE WHEN value is not null THEN value else fill(value) over() END FROM (VALUES ('2019-07-12 00:00:00'::timestamptz, 1),('2019-07-12 00:00:00'::timestamptz, NULL),('2019-07-12 00:02:00'::timestamptz, 3)) v(time,value) GROUP BY 1; --- --- time fill --- \set ON_ERROR_STOP 0 -- test fill_last call errors out when used outside gapfill context SELECT fill_last(1); -- test fill_last call errors out when used outside gapfill context with NULL arguments SELECT fill_last(NULL::int); -- test time_fill not top level function call SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) + interval '1 min' FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; ------------------------------------------------- -- test multiple time_fill calls SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz),time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; -- test nested time_fill calls SELECT time_fill(interval '1 min',time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz),'2019-07-11 23:59:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; -- test time_fill without aggregation SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time); -- test time_fill with within group SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) WITHIN GROUP (ORDER BY time) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time); -- test NULL args SELECT time_fill(NULL,time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; SELECT time_fill(interval '1 min',NULL,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; SELECT time_fill(interval '1 min',time,NULL,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,NULL) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; -- test interval is bigger than the distance of start and finish SELECT time_fill(interval '1 day',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; -- test start is bigger than finish SELECT time_fill(interval '1 min',time,'2019-07-12 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; \set ON_ERROR_STOP 0 -- test tamstamp SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamp) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamp,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; \set ON_ERROR_STOP 1 SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) GROUP BY 1; SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:00'::timestamp),('2019-07-12 00:02:00'::timestamp)) v(time) GROUP BY 1; -- simple fill query SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:12:01'::timestamptz) AS time, sum(value) AS value FROM (values ('2019-07-12 00:00:01'::timestamptz,1),('2019-07-12 00:00:59'::timestamptz,2),('2019-07-12 00:01:01'::timestamptz,3), ('2019-07-12 00:03:01'::timestamptz,4),('2019-07-12 00:06:01'::timestamptz,5),('2019-07-12 00:10:01'::timestamptz,6),('2019-07-12 00:14:01'::timestamptz,7)) v(time,value) GROUP BY 1 ORDER BY 1; SELECT time_fill(0.001,time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:12:01'::timestamptz) AS time, sum(value) AS value FROM (values ('2019-07-12 00:00:01'::timestamptz,1),('2019-07-12 00:00:59'::timestamptz,2),('2019-07-12 00:01:01'::timestamptz,3), ('2019-07-12 00:03:01'::timestamptz,4),('2019-07-12 00:06:01'::timestamptz,5),('2019-07-12 00:10:01'::timestamptz,6),('2019-07-12 00:14:01'::timestamptz,7)) v(time,value) GROUP BY 1 ORDER BY 1; -- test references to different columns SELECT time_fill(interval '1 min',t,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz) as t, min(t),max(t),min(v),max(v) FROM(VALUES ('2019-07-12 00:00:01'::timestamptz,3), ('2019-07-12 00:00:01'::timestamptz,4),('2019-07-12 00:03:01'::timestamptz,5),('2019-07-12 00:03:01'::timestamptz,6)) tb(t,v) GROUP BY 1 ORDER BY 1; SELECT time_fill(interval '1 min',t,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz) as t, min(t),max(t),min(v),max(v) FROM(VALUES ('2019-07-12 00:00:01'::timestamptz,3), ('2019-07-12 00:00:02'::timestamptz,4),('2019-07-12 00:03:01'::timestamptz,5),('2019-07-12 00:03:02'::timestamptz,6)) tb(t,v) GROUP BY 1 ORDER BY 1; -- test passing of values outside boundaries SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz), min(time) FROM (VALUES ('2019-07-11 23:57:01'::timestamptz),('2019-07-12 00:01:01'::timestamptz),('2019-07-12 00:03:01'::timestamptz),('2019-07-12 00:07:01'::timestamptz)) v(time) GROUP BY 1 ORDER BY 1; -- test gap fill without rows in resultset SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), min(time) FROM ( VALUES ('2019-07-12 00:00:00'::timestamptz),('2019-07-12 00:02:00'::timestamptz)) v(time) WHERE false GROUP BY 1 ORDER BY 1; -- test coalesce SELECT time_fill(interval '1 min',time, '2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), coalesce(min(time),'2019-07-11 23:59:01'::timestamptz), coalesce(min(value),0), coalesce(min(value),7) FROM (VALUES ('2019-07-12 00:00:00'::timestamptz,1),('2019-07-12 00:01:00'::timestamptz,2),('2019-07-12 00:03:00'::timestamptz,3)) v(time,value) GROUP BY 1 ORDER BY 1; -- test case SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), min(time), CASE WHEN min(time) IS NOT NULL THEN min(time) ELSE '2019-07-11 00:59:01'::timestamptz END, CASE WHEN min(time) IS NOT NULL THEN min(time) + interval '6 min' ELSE '2019-07-11 00:59:01'::timestamptz END, CASE WHEN 1 = 1 THEN 1 ELSE 0 END FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,1),('2019-07-12 00:01:01'::timestamptz,2),('2019-07-12 00:02:01'::timestamptz,3)) v(time,value) GROUP BY 1 ORDER BY 1; -- test constants SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), count(time), 4 as c FROM (VALUES ('2019-07-12 00:00:01'::timestamptz),('2019-07-12 00:01:01'::timestamptz),('2019-07-12 00:02:01'::timestamptz)) v(time) GROUP BY 1 ORDER BY 1; -- test column reordering SELECT 1 as c1, '2' as c2, time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), 3.0 as c3, min(time), min(time), 4 as c4 FROM (VALUES ('2019-07-12 00:00:01'::timestamptz),('2019-07-12 00:01:01'::timestamptz),('2019-07-12 00:02:01'::timestamptz)) v(time) GROUP BY 3 ORDER BY 3; -- test grouping by non-time columns SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, id, min(value) as m FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,1,1),('2019-07-12 00:01:01'::timestamptz,2,2)) v(time,id,value) GROUP BY 1,id ORDER BY 2,1; -- test grouping by non-time columns with no rows in resultset SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, id, min(value) as m FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,1,1),('2019-07-12 00:01:01',2,2)) v(time,id,value) WHERE false GROUP BY 1,id ORDER BY 2,1; -- test duplicate columns in GROUP BY SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, id, id, min(value) as m FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,1,1),('2019-07-12 00:01:01'::timestamptz,2,2)) v(time,id,value) GROUP BY 1,2,3 ORDER BY 2,1; -- test grouping by columns not in resultset SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, min(value) as m FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,1,1),('2019-07-12 00:01:01'::timestamptz,2,2)) v(time,id,value) GROUP BY 1,id ORDER BY id,1; -- test grouping by with text columns SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, color, min(value) as m FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'blue',1),('2019-07-12 00:01:01'::timestamptz,'red',2)) v(time,color,value) GROUP BY 1,color ORDER BY 2,1; -- test grouping by with text columns with no rows in resultset SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, color, min(value) as m FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'blue',1),('2019-07-12 00:01:01'::timestamptz,'red',2)) v(time,color,value) WHERE false GROUP BY 1,color ORDER BY 2,1; -- test insert into SELECT CREATE TABLE insert_test(id timestamptz); INSERT INTO insert_test SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:03:01'::timestamptz),('2019-07-12 00:01:01'::timestamptz)) v(time) GROUP BY 1 ORDER BY 1; SELECT * FROM insert_test order by id; DROP TABLE insert_test; -- test join ---------------- ERROR ---------------- ---------------- SELECT t1.*,t2.* FROM ( SELECT time_fill(interval '1 min',time,'2019-07-11 23:58:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, color, min(value) as m FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:01:01'::timestamptz,'blue',2)) v(time,color,value) GROUP BY 1,color ORDER BY 2,1 ) t1 INNER JOIN ( SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz) as time, color, min(value) as m FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,'red',1),('2019-07-12 00:04:01'::timestamptz,'blue',2)) v(time,color,value) GROUP BY 1,color ORDER BY 2,1 ) t2 ON t1.time = t2.time AND t1.color=t2.color; -- test join with fill_last SELECT t1.*,t2.m FROM ( SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz) as time, color, fill_last(min(value)) as fill_last FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value) GROUP BY 1,color ORDER BY 2,1 ) t1 INNER JOIN ( SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz) as time, color, fill_last(min(value)) as m FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,'red',1),('2019-07-12 00:04:01'::timestamptz,'blue',2)) v(time,color,value) GROUP BY 1,color ORDER BY 2,1 ) t2 ON t1.time = t2.time AND t1.color=t2.color; -- test join with time_window SELECT t1.*,t2.* FROM ( SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:02:01'::timestamptz) as time, color, fill_last(min(value)) as fill_last FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,10,1),('2019-07-12 00:00:01'::timestamptz,11,2),('2019-07-12 00:01:01'::timestamptz,10,3)) v(time,color,value) GROUP BY 1,color ORDER BY 2,1 ) t1 JOIN ( SELECT time_window(interval '1 min',time) as time, color, min(value) as m FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,10,1)) v(time,color,value) GROUP BY 1,color ORDER BY 2,1 ) t2 ON 1 = 1; ---------------- ExecNestLoop -- test fill_last SELECT time_fill(interval '10 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:50:01'::timestamptz) AS time, fill_last(min(value)) AS value FROM (values ('2019-07-12 00:00:01'::timestamptz,9),('2019-07-12 00:10:01'::timestamptz,3),('2019-07-12 00:40:01'::timestamptz,6)) v(time,value) GROUP BY 1 ORDER BY 1; -- test fill_last with constants SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), 2, fill_last(min(value)) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,1,3),('2019-07-12 00:02:01'::timestamptz,2,3)) v(time,value) GROUP BY 1 ORDER BY 1; -- test fill_last with out of boundary lookup SELECT time_fill(interval '10 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:50:01'::timestamptz) AS time, fill_last(min(value)) AS value FROM (values ('2019-07-12 00:10:01'::timestamptz,9),('2019-07-12 00:30:01'::timestamptz,6)) v(time,value) GROUP BY 1 ORDER BY 1; -- test fill_last with different datatypes SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz) as time, fill_last(min(v1)) AS text, fill_last(min(v2)) AS "int[]", fill_last(min(v3)) AS "text 4/8k" FROM (VALUES ('2019-07-12 00:01:01'::timestamptz,'foo',ARRAY[1,2,3],repeat('4',4)), ('2019-07-12 00:03:01'::timestamptz,'bar',ARRAY[3,4,5],repeat('8',8)) ) v(time,v1,v2,v3) GROUP BY 1; -- test fill_last lookup query does not trigger when not needed -- CREATE TABLE metrics_int(time timestamptz,device_id int, sensor_id int, value float); INSERT INTO metrics_int VALUES ('2019-07-11 23:59:01'::timestamptz,1,1,0.0), ('2019-07-11 23:59:01'::timestamptz,1,2,-100.0), ('2019-07-12 00:00:01'::timestamptz,1,1,5.0), ('2019-07-12 00:00:03'::timestamptz,1,2,10.0), ('2019-07-12 00:01:01'::timestamptz,1,1,0.0), ('2019-07-12 00:01:01'::timestamptz,1,2,-100.0) ; SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz) AS time, device_id, sensor_id, fill_last(min(value)::int) AS fill_last3 FROM metrics_int m1 WHERE time >= '2019-07-11 23:59:59'::timestamptz AND time < '2019-07-12 00:04:01'::timestamptz GROUP BY 1,2,3 ORDER BY 2,3,1; drop table metrics_int; -- test cte with gap filling in outer query WITH data AS ( SELECT * FROM (VALUES ('2019-07-12 00:01:01'::timestamptz,1,1),('2019-07-12 00:02:01'::timestamptz,2,2)) v(time,id,value) ) SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, id, min(value) as m FROM data GROUP BY 1,id; -- test cte with gap filling in inner query WITH gapfill AS ( SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, id, min(value) as m FROM (VALUES ('2019-07-12 00:01:01'::timestamptz,1,1),('2019-07-12 00:02:01'::timestamptz,2,2)) v(time,id,value) GROUP BY 1,id ) SELECT * FROM gapfill; \set ON_ERROR_STOP 0 SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:05:01'::timestamptz), min(time), 4 as c, lag(min(time)) OVER () FROM (VALUES ('2019-07-12 00:01:01'::timestamptz),('2019-07-12 00:02:01'::timestamptz),('2019-07-12 00:03:01'::timestamptz)) v(time) GROUP BY 1; \set ON_ERROR_STOP 1 -- test reorder SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz) as time, id, min(value) as m FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,1,1),('2019-07-12 00:01:01'::timestamptz,2,2)) v(time,id,value) GROUP BY 1,id ORDER BY 1,id; -- test order by fill_last SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), fill_last(min(time)) FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,1,1),('2019-07-12 00:01:01'::timestamptz,1,1)) v(time) GROUP BY 1 ORDER BY 2,1; SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), fill_last(min(time)) FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,1,1),('2019-07-12 00:01:01'::timestamptz,1,1)) v(time) GROUP BY 1 ORDER BY 2 NULLS FIRST,1; SELECT time_fill(interval '1 min',time,'2019-07-11 23:59:01'::timestamptz,'2019-07-12 00:03:01'::timestamptz), fill_last(min(time)) FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,1,1),('2019-07-12 00:01:01'::timestamptz,1,1)) v(time) GROUP BY 1 ORDER BY 2 NULLS LAST,1; \set ON_ERROR_STOP 0 -- NULL start expression and no usable time constraints SELECT time_fill(interval '1 min',t,CASE WHEN length(version())>0 THEN '2019-07-11 23:59:01'::timestamptz ELSE '2019-07-12 00:02:01'::timestamptz END,'2019-07-12 00:05:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz),('2019-07-12 00:03:01'::timestamptz)) v(t) WHERE true AND true GROUP BY 1; -- unsupported start expression and no usable time constraints SELECT time_fill(interval '1 min',t,t,'2019-07-12 00:05:01'::timestamptz) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz),('2019-07-12 00:03:01'::timestamptz)) v(t) WHERE true AND true GROUP BY 1; \set ON_ERROR_STOP 1 -- expression with multiple column references SELECT time_fill(interval '1 min',t1,'2019-07-11 23:59:01'::timestamptz + interval '1 min','2019-07-12 00:03:01'::timestamptz) FROM (VALUES ('2019-07-12 00:01:01'::timestamptz,2),('2019-07-12 00:02:01'::timestamptz,2)) v(t1,t2) WHERE true GROUP BY 1; -- percentile_cont WITHIN GROUP \set ON_ERROR_STOP 0 SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value,color) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value); SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY color) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value); SELECT percentile_cont(0.5) WITHIN GROUP () FROM (VALUES (1),(2)) v(value); SELECT percentile_cont(0.5) WITHIN GROUP (color) FROM (VALUES (1),(2)) v(value); -- NULL SELECT percentile_cont(NULL) WITHIN GROUP (ORDER BY value) FROM (VALUES (1),(2)) v(value); -- test different type in WITHIN GROUP SELECT percentile_cont(0.5) WITHIN GROUP (order by ARRAY[1,2,3]) FROM (VALUES (1),(2)) v(value); SELECT percentile_cont(0.5) WITHIN GROUP (order by value) FROM (VALUES ('red'),('yellow')) v(value); SELECT percentile_cont(0.5) WITHIN GROUP (order by value) FROM (VALUES (ARRAY[1,2,3]),(ARRAY[2,3,4])) v(value); -- test not [0,1] SELECT percentile_cont(2) WITHIN GROUP (ORDER BY value) FROM (VALUES (1),(2)) v(value); SELECT percentile_cont(-1) WITHIN GROUP (ORDER BY value) FROM (VALUES (1),(2)) v(value); ----- OVER SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) over(partition by color) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value) ; SELECT percentile_cont(0.5) over(ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value) ; ------ float8[] SELECT percentile_cont(array[0.5,0.9]) WITHIN GROUP (ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value); ------ multi-call SELECT percentile_cont(0.5),percentile_cont(0.7) WITHIN GROUP (ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value); \set ON_ERROR_STOP 1 SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value); -- desc SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value desc) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value); -- interval SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',interval '1 day'),('2019-07-12 00:00:01'::timestamptz,'blue','3 day')) v(time,color,value); SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM (VALUES (1),(2)) v(value); SELECT percentile_cont(0.5) within group (order by value) FROM (SELECT generate_series(0.01, 1, 0.01) as value); -- test compute SELECT percentile_cont(0.5) within group (order by value * 2) FROM (SELECT generate_series(0.01, 1, 0.01) as value); SELECT percentile_cont(0.5 * 2 - 0.3) within group (order by value) FROM (SELECT generate_series(0.01, 1, 0.01) as value); -- test NULL SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY NULL) FROM (VALUES (1),(2)) v(value); -- test GROUP BY SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value) GROUP BY color; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value) GROUP BY color,time; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',0.1),('2019-07-12 00:00:01'::timestamptz,'blue',-3),('2019-07-12 00:00:01'::timestamptz,'blue',-0.3),('2019-07-12 00:00:01'::timestamptz,'red',2)) v(time,color,value) GROUP BY color; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',0.1),('2019-07-12 00:00:01'::timestamptz,'blue',-3),('2019-07-12 00:00:01'::timestamptz,'blue',-0.3),('2019-07-12 00:00:01'::timestamptz,'red',2)) v(time,color,value) GROUP BY color,time,value; -- test GROUP BY desc SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value desc) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value) GROUP BY color; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value desc) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value) GROUP BY color,time; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value desc) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',0.1),('2019-07-12 00:00:01'::timestamptz,'blue',-3),('2019-07-12 00:00:01'::timestamptz,'blue',-0.3),('2019-07-12 00:00:01'::timestamptz,'red',2)) v(time,color,value) GROUP BY color; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value desc) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',0.1),('2019-07-12 00:00:01'::timestamptz,'blue',-3),('2019-07-12 00:00:01'::timestamptz,'blue',-0.3),('2019-07-12 00:00:01'::timestamptz,'red',2)) v(time,color,value) GROUP BY color,time,value; -- test order by const SELECT percentile_cont(0.5) WITHIN GROUP (order by 2) FROM (VALUES (1),(2)) v(value); SELECT percentile_cont(0.5) WITHIN GROUP (order by 2); SELECT percentile_cont(0.5) WITHIN GROUP (order by -2); --- multiple percentile_cont SELECT k, percentile_cont(k) within group (order by value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',1),('2019-07-12 00:00:01'::timestamptz,'blue',2)) v(time,color,value) , generate_series(0.1, 1, 0.01) as k group by k; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value),percentile_cont(0.5) WITHIN GROUP (ORDER BY value2) FROM (VALUES (0.1,'red',0.1),(-3,'blue',-3),(-0.3,'blue',-0.3),(2,'red',2)) v(value2,color,value) GROUP BY color; WITH s1 as ( SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) as per,percentile_cont(0.5) WITHIN GROUP (ORDER BY value2) FROM (VALUES (0.1,'red',0.1),(-3,'blue',-3),(-0.3,'blue',-0.3),(2,'red',2)) v(value2,color,value) GROUP BY color) SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY s1.per) from s1; --- with other aggregate SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value desc), sum(value),count(time),max(value) FROM (VALUES ('2019-07-12 00:00:01'::timestamptz,'red',0.1),('2019-07-12 00:00:01'::timestamptz,'blue',-3),('2019-07-12 00:00:01'::timestamptz,'blue',-0.3),('2019-07-12 00:00:01'::timestamptz,'red',2)) v(time,color,value) GROUP BY color; --- mix with time_fill WITH s1 as ( SELECT time_fill(interval '1 min',time,'2019-07-12 00:01:01'::timestamptz,'2019-07-12 00:06:01'::timestamptz) as rtime, fill_last(min(value)) as rvalue, fill_last(min(tag)) as rtag FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,2,2),('2019-07-12 00:01:01'::timestamptz,1,1),('2019-07-12 00:05:01'::timestamptz,3,3)) v(time, value, tag) GROUP BY rtime ORDER BY 1 ) SELECT first(array_agg(s1.rvalue),array_agg(s1.rtime)), last(array_agg(s1.rvalue),array_agg(s1.rtime)), percentile_cont(0.5) WITHIN GROUP (ORDER BY s1.rvalue) FROM s1; CREATE TABLE metrics_int(time timestamptz,device_id int, sensor_id int, value float); INSERT INTO metrics_int VALUES ('2019-07-11 23:59:01'::timestamptz,11,1,0.0), ('2019-07-11 23:59:01'::timestamptz,11,2,-100.0), ('2019-07-12 00:00:01'::timestamptz,12,3,5.0), ('2019-07-12 00:00:03'::timestamptz,12,4,10.0), ('2019-07-13 00:01:03'::timestamptz,11,5,0.0), ('2019-07-14 00:01:04'::timestamptz,11,5,0.0), ('2019-07-15 00:01:05'::timestamptz,11,5,0.0), ('2019-07-16 00:01:06'::timestamptz,11,5,0.0), ('2019-07-17 00:01:07'::timestamptz,11,5,0.0), ('2019-07-12 00:01:01'::timestamptz,12,6,-100.0) ; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM metrics_int; SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY value) FROM metrics_int group by device_id; drop table metrics_int; --- --- combination -- -- combine time_fill, fill_last, time_window, first, last, percentile WITH s1 as ( SELECT time_fill(interval '1 min',time,'2019-07-12 00:01:01'::timestamptz,'2019-07-12 00:06:01'::timestamptz) as rtime, fill_last(min(value)) as rvalue, fill_last(min(tag)) as rtag FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,2,2),('2019-07-12 00:01:01'::timestamptz,1,1),('2019-07-12 00:05:01'::timestamptz,3,3)) v(time, value, tag) GROUP BY rtime ORDER BY 1 ) SELECT first(array_agg(s1.rvalue),array_agg(s1.rtime)), last(array_agg(s1.rvalue),array_agg(s1.rtime)), percentile_cont(0.5) WITHIN GROUP (ORDER BY rvalue) FROM s1; -- combine time_fill, fill_last, time_window, first, last, percentile, fill WITH s1 as ( SELECT time_window(interval '1 min',time) as t_time, first(array_agg(value),array_agg(time)) as f_value, last(array_agg(value),array_agg(time)) as l_value, first(array_agg(tag),array_agg(time)) as f_tag, last(array_agg(tag),array_agg(time)) as l_tag, CASE WHEN first(array_agg(tag),array_agg(time)) is NOT NULL THEN first(array_agg(tag),array_agg(time)) ELSE fill(first(array_agg(tag),array_agg(time))) over (order by 1) END as fill_tag FROM (VALUES ('2019-07-12 00:03:01'::timestamptz,2,2),('2019-07-12 00:01:01'::timestamptz,1,NULL),('2019-07-12 00:05:01'::timestamptz,3,3)) v(time, value, tag) GROUP BY t_time ) SELECT time_fill(interval '1 min',t_time,'2019-07-12 00:01:01'::timestamptz,'2019-07-12 00:06:01'::timestamptz) as rtime, min(f_value) as m_f_value, min(l_value) as m_l_value, min(f_tag) as m_f_tag, min(l_tag) as m_l_tag, min(fill_tag) as m_fill_tag, fill_last(min(f_value)) as fill_f_value, fill_last(min(l_value)) as fill_l_value, fill_last(min(f_tag)) as fill_last_f_tag, fill_last(min(l_tag)) as fill_last_l_tag FROM s1 GROUP BY rtime ORDER BY rtime; --- --- bottom_k --- \set ON_ERROR_STOP 1 SELECT bottom_k(ARRAY[1,2,3], 0.95); SELECT bottom_k(array_agg(v), 0.95) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); SELECT bottom_k(array_agg(v), 2) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); SELECT bottom_k(array_agg(v), 0) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); SELECT bottom_k(array_agg(v), -2) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); SELECT bottom_k(array_agg(v), 0.5),v2 FROM (VALUES (1,'a'),(2,'a'),(3,'a'),(4,'a'),(5,'a'),(6,'a')) v(v,v2) group by v2; SELECT bottom_k(array_agg(v), 0.1),v2 FROM (VALUES (1,'a'),(2,'a'),(3,'a'),(4,'a'),(5,'a'),(6,'a')) v(v,v2) group by v2; \set ON_ERROR_STOP 0 SELECT bottom_k(array_agg(v), 0.5),v2 FROM (VALUES (1,'a'),(2,'a'),(3,'a'),(4,'a'),(5,'a'),(6,'a')) v(v,v2); SELECT bottom_k(v, 0.5) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); --- --- top_k --- \set ON_ERROR_STOP 1 SELECT top_k(ARRAY[1,2,3], 0.95); SELECT top_k(array_agg(v), 0.95) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); SELECT top_k(array_agg(v), 2) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); SELECT top_k(array_agg(v), 0) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); SELECT top_k(array_agg(v), -2) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); SELECT top_k(array_agg(v), 0.5),v2 FROM (VALUES (1,'a'),(2,'a'),(3,'a'),(4,'a'),(5,'a'),(6,'a')) v(v,v2) group by v2; SELECT top_k(array_agg(v), 0.1),v2 FROM (VALUES (1,'a'),(2,'a'),(3,'a'),(4,'a'),(5,'a'),(6,'a')) v(v,v2) group by v2; \set ON_ERROR_STOP 0 SELECT top_k(array_agg(v), 0.5),v2 FROM (VALUES (1,'a'),(2,'a'),(3,'a'),(4,'a'),(5,'a'),(6,'a')) v(v,v2); SELECT top_k(v, 0.5) FROM (VALUES (1),(2),(-3),(-1.1),(5),(6.6),(0)) v(v); -- delta agg select delta(idle) over (rows 1 preceding) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:03Z',2),('2020-04-17T17:00:03Z',3)) v(time, idle); select delta(idle) over (rows 1 preceding) from (values('2020-04-17T17:00:03Z','a'),('2020-04-17T17:00:03Z','a'),('2020-04-17T17:00:03Z','a')) v(time, idle); select delta(avg(idle)) over (rows 1 preceding) from (values('2020-04-17T17:00:03Z','a'),('2020-04-17T17:00:03Z','a'),('2020-04-17T17:00:03Z','a')) v(time, idle); select delta(NULL::int) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:03Z',2),('2020-04-17T17:00:03Z',3)) v(time, idle); select delta(idle) over (rows 1 preceding) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:03Z',3),('2020-04-17T17:00:03Z',3)) v(time, idle) group by time; select delta(idle) over (rows 1 preceding) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:03Z',3),('2020-04-17T17:00:03Z',3)) v(time, idle); -- spread agg select spread(idle) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:03Z',2),('2020-04-17T17:00:03Z',3)) v(time, idle); select spread(idle) from (values('2020-04-17T17:00:03Z','a'),('2020-04-17T17:00:03Z','b'),('2020-04-17T17:00:03Z','c')) v(time, idle); select spread(idle) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:02Z',2),('2020-04-17T17:00:03Z',5),('2020-04-17T17:00:03Z',9),('2020-04-17T17:00:02Z',8),('2020-04-17T17:00:03Z',2)) v(time, idle) group by time; select spread(avg(idle)) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:02Z',2),('2020-04-17T17:00:03Z',5),('2020-04-17T17:00:03Z',9),('2020-04-17T17:00:02Z',8),('2020-04-17T17:00:03Z',2)) v(time, idle) group by time; select spread(NULL) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:03Z',2),('2020-04-17T17:00:03Z',3)) v(time, idle); select spread(idle) over (partition by time) from (values('2020-04-17T17:00:03Z',1),('2020-04-17T17:00:02Z',2),('2020-04-17T17:00:03Z',5),('2020-04-17T17:00:03Z',9),('2020-04-17T17:00:02Z',8),('2020-04-17T17:00:03Z',2)) v(time, idle) group by idle;
the_stack
SET NAMES utf8mb4; CREATE SCHEMA IF NOT EXISTS job_execute; USE job_execute; CREATE TABLE IF NOT EXISTS `task_instance` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `app_id` bigint(20) NOT NULL, `task_id` bigint(20) NOT NULL, `task_template_id` bigint(20) NOT NULL, `name` varchar(512) NOT NULL, `type` tinyint(4) NOT NULL, `operator` varchar(128) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '0', `current_step_id` bigint(20) NOT NULL DEFAULT '0', `startup_mode` tinyint(4) NOT NULL, `total_time` bigint(20) DEFAULT NULL, `callback_url` varchar(1024) DEFAULT NULL, `is_debug_task` tinyint(4) NOT NULL DEFAULT '0', `cron_task_id` bigint(20) NOT NULL DEFAULT '0', `create_time` bigint(20) DEFAULT NULL, `start_time` bigint(20) DEFAULT NULL, `end_time` bigint(20) DEFAULT NULL, `app_code` varchar(128) DEFAULT NULL, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY (`app_id`), KEY (`operator`), KEY (`task_id`), KEY (`status`), KEY (`create_time`) ) ENGINE = InnoDB AUTO_INCREMENT = 1000000 DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `step_instance` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `step_id` bigint(20) NOT NULL, `task_instance_id` bigint(20) NOT NULL, `app_id` bigint(20) NOT NULL, `name` varchar(512) DEFAULT NULL, `type` tinyint(4) NOT NULL, `operator` varchar(128) DEFAULT NULL, `status` tinyint(4) NOT NULL DEFAULT '1', `execute_count` int(11) NOT NULL DEFAULT '0', `target_servers` longtext, `abnormal_agent_ip_list` longtext, `start_time` bigint(20) DEFAULT NULL, `end_time` bigint(20) DEFAULT NULL, `total_time` bigint(20) DEFAULT NULL, `total_ip_num` int(11) DEFAULT '0', `abnormal_agent_num` int(11) DEFAULT '0', `run_ip_num` int(11) DEFAULT '0', `fail_ip_num` int(11) DEFAULT '0', `success_ip_num` int(11) DEFAULT '0', `create_time` bigint(20) DEFAULT NULL, `ignore_error` tinyint(4) NOT NULL DEFAULT 0, `step_num` int(11) NOT NULL DEFAULT 0, `step_order` int(11) NOT NULL DEFAULT 0, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY (`task_instance_id`) ) ENGINE = InnoDB AUTO_INCREMENT = 1000000 DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `step_instance_script` ( `step_instance_id` bigint(20) NOT NULL, `script_content` mediumtext, `script_type` tinyint(4) DEFAULT NULL, `script_param` text, `resolved_script_param` text, `execution_timeout` int(11) DEFAULT NULL, `system_account_id` bigint(20) DEFAULT NULL, `system_account` varchar(256) DEFAULT NULL, `db_account_id` bigint(20) DEFAULT NULL, `db_type` tinyint(4) DEFAULT NULL, `db_account` varchar(256) DEFAULT NULL, `db_password` varchar(512) DEFAULT NULL, `db_port` int(5) DEFAULT NULL, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `script_source` tinyint(4) DEFAULT 1, `script_id` varchar(32) DEFAULT NULL, `script_version_id` bigint(20) DEFAULT NULL, `is_secure_param` tinyint(1) DEFAULT 0, PRIMARY KEY (`step_instance_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `step_instance_file` ( `step_instance_id` bigint(20) NOT NULL, `file_source` mediumtext NOT NULL, `resolved_file_source` mediumtext DEFAULT NULL, `file_target_path` varchar(512) DEFAULT NULL, `file_target_name` varchar(512) DEFAULT NULL, `resolved_file_target_path` varchar(512) DEFAULT NULL, `file_upload_speed_limit` int(11) DEFAULT NULL, `file_download_speed_limit` int(11) DEFAULT NULL, `file_duplicate_handle` tinyint(4) DEFAULT NULL, `not_exist_path_handler` tinyint(4) DEFAULT NULL, `execution_timeout` int(11) DEFAULT NULL, `system_account_id` bigint(20) DEFAULT NULL, `system_account` varchar(256) DEFAULT NULL, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`step_instance_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `step_instance_confirm` ( `step_instance_id` bigint(20) NOT NULL, `confirm_message` text NOT NULL, `confirm_reason` varchar(256) DEFAULT NULL, `confirm_users` varchar(1024) DEFAULT NULL, `confirm_roles` varchar(512) DEFAULT NULL, `notify_channels` varchar(256) DEFAULT NULL, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`step_instance_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `gse_task_log` ( `step_instance_id` bigint(20) NOT NULL DEFAULT '0', `execute_count` int(11) NOT NULL DEFAULT '0', `start_time` bigint(20) DEFAULT NULL, `end_time` bigint(20) DEFAULT NULL, `total_time` bigint(11) DEFAULT NULL, `status` tinyint(4) DEFAULT '1', `gse_task_id` varchar(64) DEFAULT NULL, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`step_instance_id`, `execute_count`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `gse_task_ip_log` ( `step_instance_id` bigint(20) NOT NULL, `execute_count` int(11) NOT NULL DEFAULT '0', `ip` varchar(30) NOT NULL, `status` int(11) DEFAULT '1', `start_time` bigint(20) DEFAULT NULL, `end_time` bigint(20) DEFAULT NULL, `total_time` bigint(20) DEFAULT NULL, `error_code` int(11) DEFAULT '0', `exit_code` int(11) DEFAULT NULL, `tag` varchar(256) DEFAULT '', `log_offset` int(11) NOT NULL DEFAULT '0', `display_ip` varchar(30) NOT NULL, `is_target` tinyint(1) NOT NULL default '1', `is_source` tinyint(1) NOT NULL default '0', `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`step_instance_id`, `execute_count`, `ip`), KEY (`display_ip`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `operation_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `task_instance_id` bigint(20) NOT NULL, `op_code` tinyint(4) NOT NULL, `operator` varchar(255) NOT NULL, `detail` text, `create_time` bigint(20) DEFAULT NULL, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY (`task_instance_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `task_instance_variable` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `task_instance_id` bigint(20) NOT NULL, `name` varchar(512) NOT NULL, `type` tinyint(4) NOT NULL, `value` longtext, `is_changeable` tinyint(1) NOT NULL, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY (`task_instance_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `dangerous_record` ( `row_create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `id` bigint(20) NOT NULL AUTO_INCREMENT, `rule_id` bigint(20) NOT NULL, `rule_expression` varchar(255) NOT NULL, `app_id` bigint(20) NOT NULL, `app_name` varchar(1024) NOT NULL, `operator` varchar(128) NOT NULL, `script_language` tinyint(4) NOT NULL, `script_content` longtext NOT NULL, `create_time` bigint(20) NOT NULL, `startup_mode` tinyint(4) NOT NULL, `client` varchar(128) NOT NULL, `action` tinyint(4) NOT NULL, `check_result` text NOT NULL, `ext_data` text, PRIMARY KEY (`id`), KEY `idx_create_time_rule_id` (`create_time`,`rule_id`), KEY `idx_create_time_rule_expression` (`create_time`,`rule_expression`), KEY `idx_create_time_app_id` (`create_time`,`app_id`), KEY `idx_create_time_operator` (`create_time`,`operator`), KEY `idx_create_time_startup_mode` (`create_time`,`startup_mode`), KEY `idx_create_time_client` (`create_time`,`client`), KEY `idx_create_time_mode` (`create_time`,`action`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `step_instance_variable` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `task_instance_id` bigint(20) NOT NULL, `step_instance_id` bigint(20) NOT NULL, `execute_count` int(11) NOT NULL DEFAULT '0', `type` tinyint(4) NOT NULL, `param_values` longtext NOT NULL, `row_create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `row_update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY (`step_instance_id`, `execute_count`, `type`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
the_stack
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- ** insert positionedDelete.sql -- -- tests for positioned delete -- -- note that comments that begin '-- .' are test cases from the test plan -- assumed available in queries at time of initial writing: -- subqueries. Additional tests will be needed once we have: -- order by, group by, having, aggregates, distinct, views ... -- setup some tables for use in the tests create table t1 ( i int, v varchar(10), d double precision, t time ); create table t1_copy ( i int, v varchar(10), d double precision, t time ); create table t2 ( s smallint, c char(10), r real, ts timestamp ); -- populate the first table and copy insert into t1 values (1, '1111111111', 11e11, time('11:11:11')); insert into t1_copy select * from t1; -- we need to turn autocommit off so that cursors aren't closed before -- the positioned statements against them. autocommit off; -- empty table tests -- .no table name given -- this should fail with a syntax error delete; -- this should succeed get cursor c0 as 'select * from t1 for update'; next c0; delete from t1 where current of c0; select * from t1; close c0; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .same table name -- .cursor before 1st row get cursor c1 as 'select * from t2 for update'; -- 'cursor not on a row' expected delete from t2 where current of c1; -- .different table name delete from t1 where current of c1; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .non-existant table delete from not_exists where current of c1; close c1; -- .delete from base table, not exposed table name -- (this one should work, since base table) get cursor c2 as 'select * from t2 asdf for update'; delete from t2 where current of c2; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .match correlation name -- (this one should fail, since correlation name) delete from asdf where current of c2; close c2; -- .non-updatable cursor -- NOTE - forupdate responsible for extensive tests get cursor c3 as 'select * from t2 for read only'; delete from t2 where current of c3; close c3; -- .target cursor does not exist delete from t2 where current of c44; -- .target cursor after last row get cursor c4 as 'select * from t1 for update'; next c4; next c4; next c4; delete from t1 where current of c4; close c4; -- .target cursor exists, closed get cursor c5 as 'select * from t1'; close c5; delete from t1 where current of c5; -- .target cursor on row get cursor c6 as 'select * from t1 for update'; next c6; delete from t1 where current of c6; select * from t1; close c6; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .target cursor on row deleted by another cursor get cursor c7 as 'select * from t1 for update'; next c7; get cursor c8 as 'select * from t1 for update'; next c8; delete from t1 where current of c7; delete from t1 where current of c8; select * from t1; close c7; close c8; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .target cursor on already deleted row get cursor c9 as 'select * from t1 for update'; next c9; delete from t1 where current of c9; delete from t1 where current of c9; select * from t1; close c9; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- delete to row which was subject to searched update -- (row still within cursor qualification) get cursor c10 as 'select * from t1 for update'; next c10; update t1 set i = i + 1; select * from t1; delete from t1 where current of c10; select * from t1; close c10; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- delete to row which was subject to searched update -- (row becomes outside of cursor qualification) get cursor c10a as 'select * from t1 where i = 1 for update'; next c10a; update t1 set i = i + 1; select * from t1; delete from t1 where current of c10a; select * from t1; close c10a; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- delete to row which was subject to positioned update -- (row becomes outside of cursor qualification) get cursor c11 as 'select * from t1 where i = 1 for update'; next c11; update t1 set i = i + 1 where current of c11; select * from t1; delete from t1 where current of c11; select * from t1; close c11; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- delete to row which was subject to 2 searched updates -- (1st puts row outside of cursor qualification, 2nd restores it) get cursor c12 as 'select * from t1 where i = 1 for update'; next c12; update t1 set i = i + 1; update t1 set i = 1; select * from t1; delete from t1 where current of c12; select * from t1; close c12; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- positioned delete on table with index (#724) create table t5 (c1 int, c2 int); insert into t5 values (1, 1), (2, 2), (3, 3), (4, 4); commit; create index i5 on t5(c1); get cursor c1 as 'select * from t5 where c1 > 1 for update of c2'; next c1; delete from t5 where current of c1; next c1; next c1; delete from t5 where current of c1; select * from t5; close c1; rollback; create index i5 on t5(c2); get cursor c1 as 'select * from t5 where c1 > 1 for update of c2'; next c1; delete from t5 where current of c1; next c1; next c1; delete from t5 where current of c1; select * from t5; close c1; rollback; -- reset autocommit autocommit on; -- drop the tables drop table t1; drop table t2; drop table t5; drop table t1_copy; -- ** insert positionedUpdate.sql -- -- tests for positioned update -- -- note that comments that begin '-- .' are test cases from the test plan -- assumed available in queries at time of initial writing: -- subqueries. Additional tests will be needed once we have: -- order by, group by, having, aggregates, distinct, views ... -- setup some tables for use in the tests create table t1 ( i int, v varchar(10), d double precision, t time ); create table t1_copy ( i int, v varchar(10), d double precision, t time ); create table t2 ( s smallint, c char(10), r real, ts timestamp ); -- populate the first table and copy insert into t1 values (1, '1111111111', 11e11, time('11:11:11')); insert into t1_copy select * from t1; -- we need to turn autocommit off so that cursors aren't closed before -- the positioned statements against them. autocommit off; -- empty table tests -- .no table name given -- this should fail with a syntax error update set c1 = c1; -- this should succeed get cursor c0 as 'select * from t1 for update'; next c0; update t1 set i = 999 where current of c0; select * from t1; update t1 set i = 1 where current of c0; select * from t1; close c0; -- .same table name -- .cursor before 1st row get cursor c1 as 'select * from t2 for update'; -- 'cursor not on a row' expected update t2 set s = s where current of c1; -- .different table name update t1 set i = i where current of c1; -- .non-existant table update not_exists set i = i where current of c1; close c1; -- .update base table, not exposed table name -- (this one should work, since base table) get cursor c2 as 'select * from t2 asdf for update'; update t2 set s = s where current of c2; -- .match correlation name -- (this one should fail, since correlation name) update asdf set s = s where current of c2; close c2; -- .non-updatable cursor -- NOTE - forupdate responsible for extensive tests get cursor c3 as 'select * from t2 for read only'; update t2 set s = s where current of c3; close c3; -- .target cursor does not exist update t2 set s = s where current of c44; -- .target cursor after last row get cursor c4 as 'select * from t1 for update'; next c4; next c4; next c4; update t1 set i = i where current of c4; close c4; -- .target cursor exists, closed get cursor c5 as 'select * from t1'; close c5; update t1 set i = i where current of c5; -- .target cursor on row get cursor c6 as 'select * from t1 for update'; next c6; update t1 set i = i + 1 where current of c6; select * from t1; -- .consecutive updates to same row in cursor, keeping it in the cursor qual update t1 set i = i + 1 where current of c6; select * from t1; close c6; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .target cursor on row deleted by another cursor get cursor c7 as 'select * from t1 for update'; next c7; get cursor c8 as 'select * from t1 for update'; next c8; delete from t1 where current of c7; update t1 set i = i + 1 where current of c8; select * from t1; close c7; close c8; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .target cursor on already deleted row get cursor c9 as 'select * from t1 for update'; next c9; delete from t1 where current of c9; update t1 set i = i + 1 where current of c9; select * from t1; close c9; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- update to row which was subject to searched update -- (row still within cursor qualification) get cursor c10 as 'select * from t1 for update'; next c10; update t1 set i = i + 1; select * from t1; update t1 set i = i + 2 where current of c10; select * from t1; close c10; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- update to row which was subject to searched update -- (row becomes outside of cursor qualification) get cursor c10a as 'select * from t1 where i = 1 for update'; next c10a; update t1 set i = i + 1; select * from t1; update t1 set i = i + 2 where current of c10a; select * from t1; close c10a; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- update to row which was subject to positioned update -- (row becomes outside of cursor qualification) get cursor c11 as 'select * from t1 where i = 1 for update'; next c11; update t1 set i = i + 1 where current of c11; select * from t1; update t1 set i = i + 2 where current of c11; select * from t1; close c11; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- update to row which was subject to 2 searched updates -- (1st puts row outside of cursor qualification, 2nd restores it) get cursor c12 as 'select * from t1 where i = 1 for update'; next c12; update t1 set i = i + 1; update t1 set i = 1; select * from t1; update t1 set i = i + 2 where current of c12; select * from t1; -- negative test - try to update a non-existant column update t1 set notacolumn = i + 1 where current of c12; close c12; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- update column not in SELECT list, but in FOR UPDATE OF list get cursor c13 as 'select i from t1 for update of v'; next c13; update t1 set v = '999' where current of c13; select * from t1; -- update column not in FOR UPDATE OF list (negative test) update t1 set i = 999 where current of c13; select * from t1; close c13; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- update a non-referenced column get cursor c14 as 'select i from t1 for update'; next c14; update t1 set v = '999' where current of c14; select * from t1; close c14; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .update columns in list in order different from the list's get cursor c15 as 'select i, v from t1 for update of i, v'; next c15; update t1 set v = '999', i = 888 where current of c15; select * from t1; -- . show that target table name must be used as qualifier, other names not allowed update t1 set t1.v = '998' where current of c15; update t1 set t2.v = '997' where current of c15; select * from t1; close c15; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .update only 1 column in the list get cursor c16 as 'select i, v from t1 for update of i, v'; next c16; update t1 set v = '999' where current of c16; select * from t1; close c16; -- restore t1 delete from t1; insert into t1 select * from t1_copy; select * from t1; -- .try to update through a closed cursor get cursor c17 as 'select i, v from t1 for update of i, v'; next c17; close c17; update t1 set v = '999' where current of c17; select * from t1; -- a positioned update requires a named target table. -- if we prepare the positioned update, close the underlying cursor -- and reopen it on a different table, then the positioned update -- should fail create table t3(c1 int, c2 int); insert into t3 values (1,1), (2, 1), (3,3); create table t4(c1 int, c2 int); insert into t4 select * from t3; get cursor c1 as 'select c1 from t3 for update of c1'; next c1; prepare u1 as 'update t3 set c1 = c1 + 1 where current of c1'; execute u1; next c1; select * from t3; close c1; get cursor c1 as 'select c1 from t4 for update of c1'; next c1; execute u1; select * from t4; select * from t3; close c1; -- now, reopen c1 on a table without column c1 and see -- what happens on an attempted positioned update get cursor c1 as 'select * from t1 for update'; next c1; execute u1; close c1; -- now, reopen c1 on t3, but as a read only cursor select * from t3; get cursor c1 as 'select c1 from t3 '; next c1; execute u1; select * from t3; close c1; -- positioned update on table with index (#724) create table t5 (c1 int, c2 int); insert into t5 values (1, 1), (2, 2), (3, 3), (4, 4); commit; create index i5 on t5(c1); get cursor c1 as 'select * from t5 where c1 > 1 for update of c2'; next c1; update t5 set c2 = 9 where current of c1; next c1; next c1; update t5 set c2 = 9 where current of c1; select * from t5; close c1; rollback; create index i5 on t5(c2); get cursor c1 as 'select * from t5 where c1 > 1 for update of c2'; next c1; update t5 set c2 = 9 where current of c1; next c1; next c1; update t5 set c2 = 9 where current of c1; select * from t5; close c1; rollback; -- reset autocommit autocommit on; -- drop the tables drop table t1; drop table t2; drop table t3; drop table t4; drop table t5; drop table t1_copy; -- tests for beetle 4417, schema and correlation name not working with -- current of create schema ejb; create table ejb.test1 (primarykey varchar(41) not null primary key, name varchar(200), parentkey varchar(41)); insert into ejb.test1 values('0','jack','jill'); autocommit off; -- test update with schema name get cursor c1 as 'select primarykey, parentkey, name from ejb.test1 where primarykey = ''0'' for update'; next c1; prepare p1 as 'update ejb.test1 set name = ''john'' where current of c1'; execute p1; select primarykey, parentkey, name from ejb.test1; close c1; -- test update with schema name and correlation name get cursor c1 as 'select t1.primarykey, t1.parentkey, t1.name from ejb.test1 t1 where t1.primarykey = ''0'' for update'; next c1; prepare p1 as 'update ejb.test1 set name = ''joe'' where current of c1'; execute p1; select primarykey, parentkey, name from ejb.test1; close c1; -- test update with set schema set schema ejb; get cursor c1 as 'select primarykey, parentkey, name from test1 where primarykey = ''0'' for update'; next c1; prepare p1 as 'update test1 set name = ''john'' where current of c1'; execute p1; select primarykey, parentkey, name from ejb.test1; close c1; -- test update with set schema and correlation name get cursor c1 as 'select t1.primarykey, t1.parentkey, t1.name from test1 t1 where t1.primarykey = ''0'' for update'; next c1; prepare p1 as 'update test1 set name = ''joe'' where current of c1'; execute p1; select primarykey, parentkey, name from ejb.test1; close c1; -- test update with set schema and correlation name and schema name get cursor c1 as 'select t1.primarykey, t1.parentkey, t1.name from ejb.test1 t1 where t1.primarykey = ''0'' for update'; next c1; prepare p1 as 'update ejb.test1 set name = ''joe'' where current of c1'; execute p1; select primarykey, parentkey, name from ejb.test1; close c1; -- -- reset schema name set schema app; -- test delete with schema name get cursor c1 as 'select primarykey, parentkey, name from ejb.test1 where primarykey = ''0'' for update'; next c1; prepare p2 as 'delete from ejb.test1 where current of c1'; execute p2; select primarykey, parentkey, name from ejb.test1; close c1; -- test delete with schema name and correlation name insert into ejb.test1 values('0','jack','jill'); get cursor c1 as 'select t1.primarykey, t1.parentkey, t1.name from ejb.test1 t1 where t1.primarykey = ''0'' for update'; next c1; prepare p2 as 'delete from ejb.test1 where current of c1'; execute p2; select primarykey, parentkey, name from ejb.test1; close c1; -- test delete with set schema set schema ejb; insert into test1 values('0','jack','jill'); get cursor c1 as 'select primarykey, parentkey, name from test1 where primarykey = ''0'' for update'; next c1; prepare p2 as 'delete from test1 where current of c1'; execute p2; select primarykey, parentkey, name from ejb.test1; close c1; -- test delete with set schema and correlation name insert into test1 values('0','jack','jill'); get cursor c1 as 'select t1.primarykey, t1.parentkey, t1.name from test1 t1 where t1.primarykey = ''0'' for update'; next c1; prepare p2 as 'delete from test1 where current of c1'; execute p2; select primarykey, parentkey, name from ejb.test1; close c1; -- test delete with set schema and correlation name and schema name insert into test1 values('0','jack','jill'); get cursor c1 as 'select t1.primarykey, t1.parentkey, t1.name from ejb.test1 t1 where t1.primarykey = ''0'' for update'; next c1; prepare p2 as 'delete from ejb.test1 where current of c1'; execute p2; select primarykey, parentkey, name from ejb.test1; close c1; commit; -- clean up autocommit on; set schema app; drop table ejb.test1; --drop schema ejb restrict; - can't drop this because it will fail SPS tests since --statements are created and would need to be dropped -- test correlation on select in current of cursor in current schema -- this was also broken create table test1 (primarykey varchar(41) not null primary key, name varchar(200), parentkey varchar(41)); -- make sure a cursor will work fine in this situation insert into test1 values('0','jack','jill'); autocommit off; get cursor c1 as 'select t1.primarykey, t1.parentkey, t1.name from test1 t1 where t1.primarykey = ''0'' for update'; next c1; prepare p2 as 'delete from test1 where current of c1'; execute p2; select primarykey, parentkey, name from test1; close c1; commit; -- clean up autocommit on; drop table test1;
the_stack
-- -- This is a test plan for Extension Connector. -- Contents: -- -- * Part-1: Abnormal scene -- * Part-2: Data Type of MPPDB -- * Part-3: Query Plan -- * Part-4: Query with local and remote tables -- * Part-5: Test SQL: DDL/DML/DQL/TEXT -- ---- --- Prepare Public Objects: User, Data Source, Table, etc. ---- -- create a user to be connected create user ploken identified by 'Gs@123456'; -- create a data source for connection create data source myself options (dsn 'myself'); -- create a table for test create table test_tbl (c1 int); insert into test_tbl values (119); insert into test_tbl values (119); insert into test_tbl values (911); -- grant grant select on table test_tbl to ploken; ---- --- Part-1: Test Abnormal scene ---- -- create test table create table s1_tbl_001 (c1 int); create table s1_tbl_002 (c1 bool, c2 int, c3 float8, c4 text, c5 numeric(15,5), c6 varchar2(20)); create table s1_tbl_003 (c1 int, c2 blob, c3 bytea); insert into s1_tbl_002 values (true, 119, 1234.56, '@ploken@', 987654321.01234567, '##ploken##'); insert into s1_tbl_002 values (false, 119, 1234.56, '@ploken@', 987654321.01234567, '##ploken##'); grant select on table s1_tbl_002 to ploken; grant select on table s1_tbl_003 to ploken; -- create test data source create data source myself1 options (dsn 'myself', username '', password ''); create data source myself2 type 'MPPDB' version 'V100R007C10' options (dsn 'myself', username 'ploken', password 'Gs@123456', encoding 'utf8'); create data source myself3 options (dsn 'myself', encoding 'utf99'); -- Data Source missing select * from exec_on_extension('', 'select * from test_tbl') as (c1 int); -- DSN missing select * from exec_hadoop_sql('', 'select * from test_tbl', '') as (c1 int); -- SQL missing select * from exec_on_extension('myself', '') as (c1 int); select * from exec_hadoop_sql('myself', '', '') as (c1 int); -- Data Source not found select * from exec_on_extension('IAmInvalidDataSource', 'select * from test_tbl') as (c1 int); -- Target Tbl missing select * from exec_on_extension('myself', 'select * from test_tbl'); -- No Privileges on the table select * from exec_on_extension('myself', 'select * from s1_tbl_001') as (c1 int); -- Invalid SQL select * from exec_on_extension('myself', 'select * from ') as (c1 int); -- Number(Col_Target_Tbl) > Number(Col_RETSET) select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int, c2 int); -- Unsupported Data Type in Target Tbl select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 blob); -- Unsupported Data Type in RETSET select * from exec_on_extension('myself', 'select * from s1_tbl_003') as (c1 int, c2 text, c3 text); -- Unsupported Encoding Method select * from exec_on_extension('myself3', 'select * from test_tbl') as (c1 int); -- Read Full Options select * from exec_on_extension('myself2', 'select * from test_tbl') as (c1 int); select * from exec_hadoop_sql('myself', 'select * from test_tbl', 'utf8') as (c1 int); -- Read Empty Options select * from exec_on_extension('myself1', 'select * from test_tbl') as (c1 int); select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int); -- Done revoke select on table s1_tbl_002 from ploken; revoke select on table s1_tbl_003 from ploken; drop table s1_tbl_001; drop table s1_tbl_002; drop table s1_tbl_003; drop data source myself1; drop data source myself2; drop data source myself3; ---- --- Part-2: Test Data Types of MPPDB ---- -- create numeric table create table t1_row (c1 tinyint, c2 smallint, c3 integer, c4 bigint, c5 float4, c6 float8, c7 numeric(38,25), c8 numeric(38), c9 boolean); insert into t1_row values (255, 32767, 2147483647, 9223372036854775807, 123456789.123456789, 12345678901234567890.1234567890123456789, 1234567890123.1234567890123456789012345, 12345678901234567890123456789012345678, true); insert into t1_row values (0, -32768, -2147483648, -9223372036854775808, -123456789.123456789, -12345678901234567890.1234567890123456789, -1234567890123.1234567890123456789012345, -12345678901234567890123456789012345678, false); create table t1_col with(orientation=column) as select * from t1_row; -- create char table create table t2_row (c1 char, c2 char(20), c3 varchar, c4 varchar(20), c5 varchar2, c6 varchar2(20), c7 nchar, c8 nchar(20), c9 nvarchar2, c10 nvarchar2(20), c11 text); insert into t2_row values ('@', '+ploken+ char', 'S', '+ploken+ varchar', 'H', '+ploken+ varchar2', 'E', '+ploken+ nchar', 'N', '+ploken+ nvarchar2', '+ploken+ text'); insert into t2_row values (':', '+ploken+ char', '#', '+ploken+ varchar', '?', '+ploken+ varchar2', '&', '+ploken+ nchar', '%', '+ploken+ nvarchar2', '+ploken+ text'); create table t2_col with(orientation=column) as select * from t2_row; -- create date table create table t3_row (c1 date, c2 timestamp(6), c3 timestamp(6) with time zone, c5 interval year(6), c6 interval month(6), c7 interval day(6), c8 interval hour(6), c9 interval minute(6), c10 interval second(6), c11 interval day to hour, c12 interval day to minute, c13 interval day to second(6), c14 interval hour to minute, c15 interval hour to second(6), c16 interval minute to second(6)); insert into t3_row values (date '2012-12-12', timestamp '2012-12-12 12:12:12.999999', timestamp '2012-12-12 12:12:12.999999 pst', interval '12' year, interval '12' month, interval '12' day, interval '12' hour, interval '12' minute, interval '12' second, interval '3 12' day to hour, interval '3 12:12' day to minute, interval '3 12:12:12.999999' day to second, interval '3:12' hour to minute, interval '3:12:12.999999' hour to second, interval '3:12.999999' minute to second); insert into t3_row select * from t3_row; insert into t3_row select * from t3_row; create table t3_col with(orientation=column) as select * from t3_row; -- grant select on table grant select on table t1_row to ploken; grant select on table t2_row to ploken; grant select on table t3_row to ploken; grant select on table t1_col to ploken; grant select on table t2_col to ploken; grant select on table t3_col to ploken; -- exec_on_extension select * from pgxc_wlm_ec_operator_statistics; select * from pgxc_wlm_ec_operator_history; select * from pgxc_wlm_ec_operator_info; SET resource_track_cost TO 1; SET resource_track_level TO 'operator'; SET resource_track_duration TO '0s'; select * from exec_on_extension('myself', 'select * from t1_row') as (c1 tinyint, c2 smallint, c3 integer, c4 bigint, c5 float4, c6 float8, c7 numeric(38,25), c8 numeric(38), c9 boolean); select plan_node_id,tuple_processed,ec_status,ec_dsn,ec_query,ec_libodbc_type from pgxc_wlm_ec_operator_history; SET resource_track_cost TO 100000; SET resource_track_level TO 'query'; SET resource_track_duration TO '1min'; select * from exec_on_extension('myself', 'select * from t2_row') as (c1 char, c2 char(20), c3 varchar, c4 varchar(20), c5 varchar2, c6 varchar2(20), c7 nchar, c8 nchar(20), c9 nvarchar2, c10 nvarchar2(20), c11 text); select * from exec_on_extension('myself', 'select * from t2_row') as (c1 text, c2 text, c3 text, c4 text, c5 text, c6 text, c7 text, c8 text, c9 text, c10 text, c11 text); select * from exec_on_extension('myself', 'select * from t3_row') as (c1 date, c2 timestamp(6), c3 timestamp(6) with time zone, c5 interval year(6), c6 interval month(6), c7 interval day(6), c8 interval hour(6), c9 interval minute(6), c10 interval second(6), c11 interval day to hour, c12 interval day to minute, c13 interval day to second(6), c14 interval hour to minute, c15 interval hour to second(6), c16 interval minute to second(6)); select * from exec_on_extension('myself', 'select * from t1_col') as (c1 tinyint, c2 smallint, c3 integer, c4 bigint, c5 float4, c6 float8, c7 numeric(38,25), c8 numeric(38), c9 boolean); select * from exec_on_extension('myself', 'select * from t2_col') as (c1 char, c2 char(20), c3 varchar, c4 varchar(20), c5 varchar2, c6 varchar2(20), c7 nchar, c8 nchar(20), c9 nvarchar2, c10 nvarchar2(20), c11 text); select * from exec_on_extension('myself', 'select * from t2_col') as (c1 text, c2 text, c3 text, c4 text, c5 text, c6 text, c7 text, c8 text, c9 text, c10 text, c11 text); select * from exec_on_extension('myself', 'select * from t3_col') as (c1 date, c2 timestamp(6), c3 timestamp(6) with time zone, c5 interval year(6), c6 interval month(6), c7 interval day(6), c8 interval hour(6), c9 interval minute(6), c10 interval second(6), c11 interval day to hour, c12 interval day to minute, c13 interval day to second(6), c14 interval hour to minute, c15 interval hour to second(6), c16 interval minute to second(6)); -- exec_hadoop_sql select * from exec_hadoop_sql('myself', 'select * from t1_row', '') as (c1 tinyint, c2 smallint, c3 integer, c4 bigint, c5 float4, c6 float8, c7 numeric(38,25), c8 numeric(38), c9 boolean); select * from exec_hadoop_sql('myself', 'select * from t2_row', '') as (c1 char, c2 char(20), c3 varchar, c4 varchar(20), c5 varchar2, c6 varchar2(20), c7 nchar, c8 nchar(20), c9 nvarchar2, c10 nvarchar2(20), c11 text); select * from exec_hadoop_sql('myself', 'select * from t2_row', '') as (c1 text, c2 text, c3 text, c4 text, c5 text, c6 text, c7 text, c8 text, c9 text, c10 text, c11 text); select * from exec_hadoop_sql('myself', 'select * from t3_row', '') as (c1 date, c2 timestamp(6), c3 timestamp(6) with time zone, c5 interval year(6), c6 interval month(6), c7 interval day(6), c8 interval hour(6), c9 interval minute(6), c10 interval second(6), c11 interval day to hour, c12 interval day to minute, c13 interval day to second(6), c14 interval hour to minute, c15 interval hour to second(6), c16 interval minute to second(6)); select * from exec_hadoop_sql('myself', 'select * from t1_col', '') as (c1 tinyint, c2 smallint, c3 integer, c4 bigint, c5 float4, c6 float8, c7 numeric(38,25), c8 numeric(38), c9 boolean); select * from exec_hadoop_sql('myself', 'select * from t2_col', '') as (c1 char, c2 char(20), c3 varchar, c4 varchar(20), c5 varchar2, c6 varchar2(20), c7 nchar, c8 nchar(20), c9 nvarchar2, c10 nvarchar2(20), c11 text); select * from exec_hadoop_sql('myself', 'select * from t2_col', '') as (c1 text, c2 text, c3 text, c4 text, c5 text, c6 text, c7 text, c8 text, c9 text, c10 text, c11 text); select * from exec_hadoop_sql('myself', 'select * from t3_col', '') as (c1 date, c2 timestamp(6), c3 timestamp(6) with time zone, c5 interval year(6), c6 interval month(6), c7 interval day(6), c8 interval hour(6), c9 interval minute(6), c10 interval second(6), c11 interval day to hour, c12 interval day to minute, c13 interval day to second(6), c14 interval hour to minute, c15 interval hour to second(6), c16 interval minute to second(6)); -- Done revoke select on table t1_row from ploken; revoke select on table t2_row from ploken; revoke select on table t3_row from ploken; revoke select on table t1_col from ploken; revoke select on table t2_col from ploken; revoke select on table t3_col from ploken; drop table t1_row; drop table t2_row; drop table t3_row; drop table t1_col; drop table t2_col; drop table t3_col; ---- --- Part-3: Test Plan ---- -- explain select explain (costs off) select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int); explain (costs off) select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int); -- explain create table explain (analyze, costs off, timing off) create table s3_tbl_001 as select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int); explain (analyze, costs off, timing off) create table s3_tbl_002 as select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int); explain (analyze, costs off, timing off) create table s3_tbl_003 with (orientation=column) as select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int); explain (analyze, costs off, timing off) create table s3_tbl_004 with (orientation=column) as select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int); -- explain insert into create table s3_tbl_005 (c1 int); explain (costs off) insert into s3_tbl_005 select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int); explain (costs off) insert into s3_tbl_005 select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int); -- explain local_row + remote explain (costs off) select * from test_tbl inner join (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) b on test_tbl.c1=b.c1; explain (costs off) select * from test_tbl inner join (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) b on test_tbl.c1=b.c1; -- explain local_col + remote create table test_tbl_col with (orientation=column) as select * from test_tbl; explain (costs off) select * from test_tbl_col inner join (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) b on test_tbl_col.c1=b.c1; explain (costs off) select * from test_tbl_col inner join (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) b on test_tbl_col.c1=b.c1; -- two exec_on_extension explain (costs off) select * from test_tbl, (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) b where test_tbl.c1 = b.c1 and b.c1 in (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)); -- two exec_hadoop_sql explain (costs off) select * from test_tbl, (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) b where test_tbl.c1 = b.c1 and b.c1 in (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)); -- exec_on_extension + exec_hadoop_sql explain (costs off) select * from test_tbl, (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) b where test_tbl.c1 = b.c1 and b.c1 in (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)); -- exec_hadoop_sql + exec_on_extension explain (costs off) select * from test_tbl, (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) b where test_tbl.c1 = b.c1 and b.c1 in (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)); -- Done drop table s3_tbl_001, s3_tbl_002, s3_tbl_003, s3_tbl_004, s3_tbl_005; ---- --- Part-4: Test Query with local and remote tables ---- -- local_row + remote select * from test_tbl inner join (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) b on test_tbl.c1=b.c1 order by 1,2; select * from test_tbl inner join (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) b on test_tbl.c1=b.c1 order by 1,2; -- local_col + remote create table s4_tbl_001 with (orientation=column) as select * from test_tbl; select * from s4_tbl_001 inner join (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) b on s4_tbl_001.c1=b.c1 order by 1,2; select * from s4_tbl_001 inner join (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) b on s4_tbl_001.c1=b.c1 order by 1,2; -- two exec_on_extension select * from test_tbl, (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) b where test_tbl.c1 = b.c1 and b.c1 in (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) order by 1,2; -- two exec_hadoop_sql select * from test_tbl, (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) b where test_tbl.c1 = b.c1 and b.c1 in (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) order by 1,2; -- exec_on_extension + exec_hadoop_sql select * from test_tbl, (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) b where test_tbl.c1 = b.c1 and b.c1 in (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) order by 1,2; -- exec_hadoop_sql + exec_on_extension select * from test_tbl, (select * from exec_hadoop_sql('myself', 'select * from test_tbl', '') as (c1 int)) b where test_tbl.c1 = b.c1 and b.c1 in (select * from exec_on_extension('myself', 'select * from test_tbl') as (c1 int)) order by 1,2; -- complex query create table s4_tbl_002 (c1 int, c2 text, c3 timestamp(6), c4 bool, c5 float8); insert into s4_tbl_002 values (1, 'ploken_line_1', '2012-12-10 12:12:11.123456', true, 1234561.1234561); insert into s4_tbl_002 values (2, 'ploken_line_1', '2012-12-11 12:12:12.123456', false, 1234562.1234562); insert into s4_tbl_002 values (3, 'ploken_line_2', '2012-12-12 12:12:13.123456', true, 1234563.1234563); insert into s4_tbl_002 values (4, 'ploken_line_2', '2012-12-14 12:12:14.123456', false, 1234564.1234564); insert into s4_tbl_002 values (5, 'ploken_line_3', '2012-12-15 12:12:15.123456', true, 1234565.1234565); insert into s4_tbl_002 values (6, 'ploken_line_3', '2012-12-16 12:12:16.123456', false, 1234566.1234566); insert into s4_tbl_002 values (1, 'ploken_line_1', '2012-12-10 12:12:11.123456', true, 1234561.1234561); insert into s4_tbl_002 values (2, 'ploken_line_1', '2012-12-11 12:12:12.123456', false, 1234562.1234562); insert into s4_tbl_002 values (3, 'ploken_line_2', '2012-12-12 12:12:13.123456', true, 1234563.1234563); insert into s4_tbl_002 values (4, 'ploken_line_2', '2012-12-14 12:12:14.123456', false, 1234564.1234564); insert into s4_tbl_002 values (5, 'ploken_line_3', '2012-12-15 12:12:15.123456', true, 1234565.1234565); insert into s4_tbl_002 values (6, 'ploken_line_3', '2012-12-16 12:12:16.123456', false, 1234566.1234566); grant select on table s4_tbl_002 to ploken; select a.c2, avg(b.c5) as avg5 from s4_tbl_002 a, (select * from exec_on_extension('myself', 'select * from s4_tbl_002') as (c1 int, c2 text, c3 timestamp(6), c4 bool, c5 float8)) b where a.c1 = b.c1 and b.c4 = true and exists ( select t.c3 from exec_on_extension('myself', 'select c3 from s4_tbl_002') as t(c3 timestamp(6)) where t.c3 > '2012-12-12 12:12:12.199999'::timestamp(6) and t.c3 > a.c3 ) group by a.c2 order by avg5 desc; -- Done revoke select on table s4_tbl_002 from ploken; drop table s4_tbl_001, s4_tbl_002; ---- --- Part-5: Test DDL/DML/DQL/TEXT ---- -- exec_on_extension select * from exec_on_extension('myself', 'create table ploken_new_tbl (c1 int, c2 text)') as (c1 text); select * from exec_on_extension('myself', 'select * from ploken_new_tbl') as (c1 int, c2 text); select * from exec_on_extension('myself', 'insert into ploken_new_tbl values (911, ''exec_on_extension_old'')') as (c1 text); select * from exec_on_extension('myself', 'select * from ploken_new_tbl') as (c1 int, c2 text); select * from exec_on_extension('myself', 'update ploken_new_tbl set c2=''exec_on_extension_new'' where c1>100') as (c1 text); select * from exec_on_extension('myself', 'select * from ploken_new_tbl') as (c1 int, c2 text); select * from exec_on_extension('myself', 'drop table ploken_new_tbl') as (c1 text); select * from exec_on_extension('myself', 'select * from ploken_new_tbl') as (c1 int, c2 text); select * from exec_on_extension('myself', 'show listen_addresses') as (c1 text); -- exec_hadoop_sql select * from exec_hadoop_sql('myself', 'create table ploken_new_tbl (c1 int, c2 text)', '') as (c1 text); select * from exec_hadoop_sql('myself', 'select * from ploken_new_tbl', '') as (c1 int, c2 text); select * from exec_hadoop_sql('myself', 'insert into ploken_new_tbl values (911, ''exec_hadoop_sql_old'')', '') as (c1 text); select * from exec_hadoop_sql('myself', 'select * from ploken_new_tbl', '') as (c1 int, c2 text); select * from exec_hadoop_sql('myself', 'update ploken_new_tbl set c2=''exec_hadoop_sql_new'' where c1>100', '') as (c1 text); select * from exec_hadoop_sql('myself', 'select * from ploken_new_tbl', '') as (c1 int, c2 text); select * from exec_hadoop_sql('myself', 'drop table ploken_new_tbl', '') as (c1 text); select * from exec_hadoop_sql('myself', 'select * from ploken_new_tbl', '') as (c1 int, c2 text); select * from exec_hadoop_sql('myself', 'show listen_addresses', '') as (c1 text); ---- --- End: Drop public objects ---- revoke select on table test_tbl from ploken; revoke usage on data source myself from ploken; drop table test_tbl;
the_stack
SET ANSI_PADDING ON GO if not exists (select 1 from [dbo].[BugNet_HostSettings] where SettingName = 'Pop3AllowReplyToEmail') INSERT INTO [dbo].[BugNet_HostSettings](SettingName, SettingValue) VALUES (N'Pop3AllowReplyToEmail', N'False') GO IF Not Exists(SELECT * FROM syscolumns c JOIN sysobjects o on o.id = c.id WHERE o.name = 'BugNet_ProjectMailBoxes' And c.Name = 'CategoryId') ALTER TABLE [dbo].[BugNet_ProjectMailBoxes] ADD CategoryId int GO IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_BugNet_ProjectMailBoxes_BugNet_ProjectCategories]') AND parent_object_id = OBJECT_ID(N'[dbo].[BugNet_ProjectMailBoxes]')) ALTER TABLE [dbo].[BugNet_ProjectMailBoxes] ADD CONSTRAINT [FK_BugNet_ProjectMailBoxes_BugNet_ProjectCategories] FOREIGN KEY([CategoryId]) REFERENCES [dbo].[BugNet_ProjectCategories] ([CategoryId]) GO ALTER PROCEDURE [dbo].[BugNet_Project_CloneProject] ( @ProjectId INT, @ProjectName NVarChar(256), @CloningUserName VARCHAR(75) = NULL ) AS DECLARE @CreatorUserId UNIQUEIDENTIFIER SET NOCOUNT OFF SET @CreatorUserId = (SELECT ProjectCreatorUserId FROM BugNet_Projects WHERE ProjectId = @ProjectId) IF(@CloningUserName IS NOT NULL OR LTRIM(RTRIM(@CloningUserName)) != '') EXEC dbo.BugNet_User_GetUserIdByUserName @UserName = @CloningUserName, @UserId = @CreatorUserId OUTPUT -- Copy Project INSERT BugNet_Projects ( ProjectName, ProjectCode, ProjectDescription, AttachmentUploadPath, DateCreated, ProjectDisabled, ProjectAccessType, ProjectManagerUserId, ProjectCreatorUserId, AllowAttachments, SvnRepositoryUrl ) SELECT @ProjectName, ProjectCode, ProjectDescription, AttachmentUploadPath, GetDate(), ProjectDisabled, ProjectAccessType, ProjectManagerUserId, @CreatorUserId, AllowAttachments, SvnRepositoryUrl FROM BugNet_Projects WHERE ProjectId = @ProjectId DECLARE @NewProjectId INT SET @NewProjectId = SCOPE_IDENTITY() -- Copy Milestones INSERT BugNet_ProjectMilestones ( ProjectId, MilestoneName, MilestoneImageUrl, SortOrder, DateCreated, MilestoneDueDate, MilestoneReleaseDate, MilestoneNotes, MilestoneCompleted ) SELECT @NewProjectId, MilestoneName, MilestoneImageUrl, SortOrder, GetDate(), MilestoneDueDate, MilestoneReleaseDate, MilestoneNotes, MilestoneCompleted FROM BugNet_ProjectMilestones WHERE ProjectId = @ProjectId -- Copy Project Members INSERT BugNet_UserProjects ( UserId, ProjectId, DateCreated ) SELECT UserId, @NewProjectId, GetDate() FROM BugNet_UserProjects WHERE ProjectId = @ProjectId -- Copy Project Roles INSERT BugNet_Roles ( ProjectId, RoleName, RoleDescription, AutoAssign ) SELECT @NewProjectId, RoleName, RoleDescription, AutoAssign FROM BugNet_Roles WHERE ProjectId = @ProjectId CREATE TABLE #OldRoles ( OldRowNumber INT IDENTITY, OldRoleId INT, ) INSERT #OldRoles ( OldRoleId ) SELECT RoleId FROM BugNet_Roles WHERE ProjectId = @ProjectId ORDER BY RoleId CREATE TABLE #NewRoles ( NewRowNumber INT IDENTITY, NewRoleId INT, ) INSERT #NewRoles ( NewRoleId ) SELECT RoleId FROM BugNet_Roles WHERE ProjectId = @NewProjectId ORDER BY RoleId INSERT BugNet_UserRoles ( UserId, RoleId ) SELECT UserId, RoleId = NewRoleId FROM #OldRoles INNER JOIN #NewRoles ON OldRowNumber = NewRowNumber INNER JOIN BugNet_UserRoles UR ON UR.RoleId = OldRoleId -- Copy Role Permissions INSERT BugNet_RolePermissions ( PermissionId, RoleId ) SELECT Perm.PermissionId, NewRoles.RoleId FROM BugNet_RolePermissions Perm INNER JOIN BugNet_Roles OldRoles ON Perm.RoleId = OldRoles.RoleID INNER JOIN BugNet_Roles NewRoles ON NewRoles.RoleName = OldRoles.RoleName WHERE OldRoles.ProjectId = @ProjectId and NewRoles.ProjectId = @NewProjectId -- Copy Custom Fields INSERT BugNet_ProjectCustomFields ( ProjectId, CustomFieldName, CustomFieldRequired, CustomFieldDataType, CustomFieldTypeId ) SELECT @NewProjectId, CustomFieldName, CustomFieldRequired, CustomFieldDataType, CustomFieldTypeId FROM BugNet_ProjectCustomFields WHERE ProjectId = @ProjectId -- Copy Custom Field Selections CREATE TABLE #OldCustomFields ( OldRowNumber INT IDENTITY, OldCustomFieldId INT, ) INSERT #OldCustomFields ( OldCustomFieldId ) SELECT CustomFieldId FROM BugNet_ProjectCustomFields WHERE ProjectId = @ProjectId ORDER BY CustomFieldId CREATE TABLE #NewCustomFields ( NewRowNumber INT IDENTITY, NewCustomFieldId INT, ) INSERT #NewCustomFields ( NewCustomFieldId ) SELECT CustomFieldId FROM BugNet_ProjectCustomFields WHERE ProjectId = @NewProjectId ORDER BY CustomFieldId INSERT BugNet_ProjectCustomFieldSelections ( CustomFieldId, CustomFieldSelectionValue, CustomFieldSelectionName, CustomFieldSelectionSortOrder ) SELECT CustomFieldId = NewCustomFieldId, CustomFieldSelectionValue, CustomFieldSelectionName, CustomFieldSelectionSortOrder FROM #OldCustomFields INNER JOIN #NewCustomFields ON OldRowNumber = NewRowNumber INNER JOIN BugNet_ProjectCustomFieldSelections CFS ON CFS.CustomFieldId = OldCustomFieldId -- Copy Project Mailboxes INSERT BugNet_ProjectMailBoxes ( MailBox, ProjectId, AssignToUserId, IssueTypeId, CategoryId ) SELECT Mailbox, @NewProjectId, AssignToUserId, IssueTypeId, CategoryId FROM BugNet_ProjectMailBoxes WHERE ProjectId = @ProjectId -- Copy Categories INSERT BugNet_ProjectCategories ( ProjectId, CategoryName, ParentCategoryId ) SELECT @NewProjectId, CategoryName, ParentCategoryId FROM BugNet_ProjectCategories WHERE ProjectId = @ProjectId AND Disabled = 0 CREATE TABLE #OldCategories ( OldRowNumber INT IDENTITY, OldCategoryId INT, ) INSERT #OldCategories ( OldCategoryId ) SELECT CategoryId FROM BugNet_ProjectCategories WHERE ProjectId = @ProjectId AND Disabled = 0 ORDER BY CategoryId CREATE TABLE #NewCategories ( NewRowNumber INT IDENTITY, NewCategoryId INT, ) INSERT #NewCategories ( NewCategoryId ) SELECT CategoryId FROM BugNet_ProjectCategories WHERE ProjectId = @NewProjectId AND Disabled = 0 ORDER BY CategoryId UPDATE BugNet_ProjectCategories SET ParentCategoryId = NewCategoryId FROM #OldCategories INNER JOIN #NewCategories ON OldRowNumber = NewRowNumber WHERE ProjectId = @NewProjectId And ParentCategoryId = OldCategoryId -- Copy Status's INSERT BugNet_ProjectStatus ( ProjectId, StatusName, StatusImageUrl, SortOrder, IsClosedState ) SELECT @NewProjectId, StatusName, StatusImageUrl, SortOrder, IsClosedState FROM BugNet_ProjectStatus WHERE ProjectId = @ProjectId -- Copy Priorities INSERT BugNet_ProjectPriorities ( ProjectId, PriorityName, PriorityImageUrl, SortOrder ) SELECT @NewProjectId, PriorityName, PriorityImageUrl, SortOrder FROM BugNet_ProjectPriorities WHERE ProjectId = @ProjectId -- Copy Resolutions INSERT BugNet_ProjectResolutions ( ProjectId, ResolutionName, ResolutionImageUrl, SortOrder ) SELECT @NewProjectId, ResolutionName, ResolutionImageUrl, SortOrder FROM BugNet_ProjectResolutions WHERE ProjectId = @ProjectId -- Copy Issue Types INSERT BugNet_ProjectIssueTypes ( ProjectId, IssueTypeName, IssueTypeImageUrl, SortOrder ) SELECT @NewProjectId, IssueTypeName, IssueTypeImageUrl, SortOrder FROM BugNet_ProjectIssueTypes WHERE ProjectId = @ProjectId -- Copy Project Notifications INSERT BugNet_ProjectNotifications ( ProjectId, UserId ) SELECT @NewProjectId, UserId FROM BugNet_ProjectNotifications WHERE ProjectId = @ProjectId -- Copy Project Defaults INSERT INTO BugNet_DefaultValues ([ProjectId] ,[DefaultType] ,[StatusId] ,[IssueOwnerUserId] ,[IssuePriorityId] ,[IssueAffectedMilestoneId] ,[IssueAssignedUserId] ,[IssueVisibility] ,[IssueCategoryId] ,[IssueDueDate] ,[IssueProgress] ,[IssueMilestoneId] ,[IssueEstimation] ,[IssueResolutionId] ,[OwnedByNotify] ,[AssignedToNotify]) SELECT @NewProjectId, DefaultType, StatusId, IssueOwnerUserId, IssuePriorityId, IssueAffectedMilestoneId, IssueAssignedUserId, IssueVisibility, IssueCategoryId, IssueDueDate, IssueProgress, IssueMilestoneId, IssueEstimation, IssueResolutionId, OwnedByNotify, AssignedToNotify FROM BugNet_DefaultValues WHERE ProjectId = @ProjectId -- Update Default Values with new value keys UPDATE BugNet_DefaultValues SET DefaultType = (SELECT IssueTypeId FROM BugNet_ProjectIssueTypes WHERE ProjectId = @NewProjectId AND IssueTypeName = (SELECT IssueTypeName FROM BugNet_ProjectIssueTypes WHERE IssueTypeId = BugNet_DefaultValues.DefaultType)), StatusId = (SELECT StatusId FROM BugNet_ProjectStatus WHERE ProjectId = @NewProjectId AND StatusName = (SELECT StatusName FROM BugNet_ProjectStatus WHERE StatusId = BugNet_DefaultValues.StatusId)), IssuePriorityId = (SELECT PriorityId FROM BugNet_ProjectPriorities WHERE ProjectId = @NewProjectId AND PriorityName = (SELECT PriorityName FROM BugNet_ProjectPriorities WHERE PriorityId = BugNet_DefaultValues.IssuePriorityId)), IssueAffectedMilestoneId = (SELECT MilestoneId FROM BugNet_ProjectMilestones WHERE ProjectId = @NewProjectId AND MilestoneName = (SELECT MilestoneName FROM BugNet_ProjectMilestones WHERE MilestoneId = BugNet_DefaultValues.IssueAffectedMilestoneId)), IssueCategoryId = (SELECT CategoryId FROM BugNet_ProjectCategories WHERE ProjectId = @NewProjectId AND CategoryName = (SELECT CategoryName FROM BugNet_ProjectCategories WHERE CategoryId = BugNet_DefaultValues.IssueCategoryId)), IssueMilestoneId = (SELECT MilestoneId FROM BugNet_ProjectMilestones WHERE ProjectId = @NewProjectId AND MilestoneName = (SELECT MilestoneName FROM BugNet_ProjectMilestones WHERE MilestoneId = BugNet_DefaultValues.IssueMilestoneId)), IssueResolutionId =(SELECT ResolutionId FROM BugNet_ProjectResolutions WHERE ProjectId = @NewProjectId AND ResolutionName = (SELECT ResolutionName FROM BugNet_ProjectResolutions WHERE ResolutionId = BugNet_DefaultValues.IssueResolutionId)) WHERE ProjectId = @NewProjectId -- Copy default visiblity INSERT INTO BugNet_DefaultValuesVisibility ([ProjectId] ,[StatusVisibility] ,[OwnedByVisibility] ,[PriorityVisibility] ,[AssignedToVisibility] ,[PrivateVisibility] ,[CategoryVisibility] ,[DueDateVisibility] ,[TypeVisibility] ,[PercentCompleteVisibility] ,[MilestoneVisibility] ,[EstimationVisibility] ,[ResolutionVisibility] ,[AffectedMilestoneVisibility] ,[StatusEditVisibility] ,[OwnedByEditVisibility] ,[PriorityEditVisibility] ,[AssignedToEditVisibility] ,[PrivateEditVisibility] ,[CategoryEditVisibility] ,[DueDateEditVisibility] ,[TypeEditVisibility] ,[PercentCompleteEditVisibility] ,[MilestoneEditVisibility] ,[EstimationEditVisibility] ,[ResolutionEditVisibility] ,[AffectedMilestoneEditVisibility]) SELECT @NewProjectId, StatusVisibility, OwnedByVisibility, PriorityVisibility, AssignedToVisibility, PrivateVisibility, CategoryVisibility, DueDateVisibility, TypeVisibility, PercentCompleteVisibility, MilestoneVisibility, EstimationVisibility, ResolutionVisibility, AffectedMilestoneVisibility, StatusEditVisibility, OwnedByEditVisibility, PriorityEditVisibility, AssignedToEditVisibility, PrivateEditVisibility, CategoryEditVisibility, DueDateEditVisibility, TypeEditVisibility, PercentCompleteEditVisibility, MilestoneEditVisibility, EstimationEditVisibility, ResolutionEditVisibility, AffectedMilestoneEditVisibility FROM BugNet_DefaultValuesVisibility WHERE ProjectId = @ProjectId RETURN @NewProjectId GO ALTER PROCEDURE [dbo].[BugNet_ProjectMailbox_CreateProjectMailbox] @MailBox nvarchar (100), @ProjectId int, @AssignToUserName nvarchar(255), @IssueTypeId int, @CategoryId int AS DECLARE @AssignToUserId UNIQUEIDENTIFIER SELECT @AssignToUserId = UserId FROM Users WHERE UserName = @AssignToUserName INSERT BugNet_ProjectMailBoxes ( MailBox, ProjectId, AssignToUserId, IssueTypeId, CategoryId ) VALUES ( @MailBox, @ProjectId, @AssignToUserId, @IssueTypeId, @CategoryId ) RETURN scope_identity() GO ALTER PROCEDURE [dbo].[BugNet_ProjectMailbox_GetMailboxById] @ProjectMailboxId int AS SET NOCOUNT ON SELECT BugNet_ProjectMailboxes.*, u.UserName AssignToUserName, p.DisplayName AssignToDisplayName, BugNet_ProjectIssueTypes.IssueTypeName, BugNet_ProjectCategories.CategoryName FROM BugNet_ProjectMailBoxes INNER JOIN Users u ON u.UserId = AssignToUserId INNER JOIN BugNet_UserProfiles p ON u.UserName = p.UserName INNER JOIN BugNet_ProjectIssueTypes ON BugNet_ProjectIssueTypes.IssueTypeId = BugNet_ProjectMailboxes.IssueTypeId LEFT JOIN BugNet_ProjectCategories ON BugNet_ProjectCategories.CategoryId = BugNet_ProjectMailboxes.CategoryId WHERE BugNet_ProjectMailBoxes.ProjectMailboxId = @ProjectMailboxId GO ALTER PROCEDURE [dbo].[BugNet_ProjectMailbox_GetMailboxByProjectId] @ProjectId int AS SET NOCOUNT ON SELECT BugNet_ProjectMailboxes.*, u.UserName AssignToUserName, p.DisplayName AssignToDisplayName, pit.IssueTypeName, pct.CategoryName FROM BugNet_ProjectMailBoxes INNER JOIN Users u ON u.UserId = AssignToUserId INNER JOIN BugNet_UserProfiles p ON u.UserName = p.UserName INNER JOIN BugNet_ProjectIssueTypes pit ON pit.IssueTypeId = BugNet_ProjectMailboxes.IssueTypeId LEFT JOIN BugNet_ProjectCategories pct ON pct.CategoryId = BugNet_ProjectMailboxes.CategoryId WHERE BugNet_ProjectMailBoxes.ProjectId = @ProjectId GO ALTER PROCEDURE [dbo].[BugNet_ProjectMailbox_GetProjectByMailbox] @mailbox nvarchar(100) AS SET NOCOUNT ON SELECT BugNet_ProjectMailboxes.*, u.UserName AssignToUserName, p.DisplayName AssignToDisplayName, pit.IssueTypeName, pct.CategoryName FROM BugNet_ProjectMailBoxes INNER JOIN Users u ON u.UserId = AssignToUserId INNER JOIN BugNet_UserProfiles p ON u.UserName = p.UserName INNER JOIN BugNet_ProjectIssueTypes pit ON pit.IssueTypeId = BugNet_ProjectMailboxes.IssueTypeId LEFT JOIN BugNet_ProjectCategories pct ON pct.CategoryId = BugNet_ProjectMailboxes.CategoryId WHERE BugNet_ProjectMailBoxes.MailBox = @mailbox GO ALTER PROCEDURE [dbo].[BugNet_ProjectMailbox_UpdateProjectMailbox] @ProjectMailboxId int, @MailBoxEmailAddress nvarchar (100), @ProjectId int, @AssignToUserName nvarchar(255), @IssueTypeId int, @CategoryId int AS DECLARE @AssignToUserId UNIQUEIDENTIFIER SELECT @AssignToUserId = UserId FROM Users WHERE UserName = @AssignToUserName UPDATE BugNet_ProjectMailBoxes SET MailBox = @MailBoxEmailAddress, ProjectId = @ProjectId, AssignToUserId = @AssignToUserId, IssueTypeId = @IssueTypeId, CategoryId = @CategoryId WHERE ProjectMailboxId = @ProjectMailboxId GO ALTER PROCEDURE [dbo].[BugNet_User_GetUsersByProjectId] @ProjectId Int, @ExcludeReadonlyUsers bit AS SELECT DISTINCT U.UserId, U.UserName, FirstName, LastName, DisplayName, Email FROM Users U JOIN BugNet_UserProjects ON U.UserId = BugNet_UserProjects.UserId JOIN BugNet_UserProfiles ON U.UserName = BugNet_UserProfiles.UserName JOIN Memberships M ON U.UserId = M.UserId LEFT JOIN BugNet_UserRoles UR ON U.UserId = UR.UserId LEFT JOIN BugNet_Roles R ON UR.RoleId = R.RoleId AND R.ProjectId = @ProjectId WHERE BugNet_UserProjects.ProjectId = @ProjectId AND M.IsApproved = 1 AND (@ExcludeReadonlyUsers = 0 OR @ExcludeReadonlyUsers = 1 AND R.RoleName != 'Read Only') ORDER BY DisplayName ASC GO
the_stack
CREATE OR REPLACE PACKAGE json_ac AS /* Copyright (c) 2010 Jonas Krogsboell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ --json type methods PROCEDURE object_remove (p_self IN OUT NOCOPY json, pair_name VARCHAR2); PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value json_value, position PLS_INTEGER DEFAULT NULL); PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value VARCHAR2, position PLS_INTEGER DEFAULT NULL); PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value NUMBER, position PLS_INTEGER DEFAULT NULL); PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value BOOLEAN, position PLS_INTEGER DEFAULT NULL); PROCEDURE object_check_duplicate (p_self IN OUT NOCOPY json, v_set BOOLEAN); PROCEDURE object_remove_duplicates (p_self IN OUT NOCOPY json); PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value json, position PLS_INTEGER DEFAULT NULL); PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value json_list, position PLS_INTEGER DEFAULT NULL); FUNCTION object_count (p_self IN json) RETURN NUMBER; FUNCTION object_get (p_self IN json, pair_name VARCHAR2) RETURN json_value; FUNCTION object_get (p_self IN json, position PLS_INTEGER) RETURN json_value; FUNCTION object_index_of (p_self IN json, pair_name VARCHAR2) RETURN NUMBER; FUNCTION object_exist (p_self IN json, pair_name VARCHAR2) RETURN BOOLEAN; FUNCTION object_to_char (p_self IN json, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 0) RETURN VARCHAR2; PROCEDURE object_to_clob ( p_self IN json, buf IN OUT NOCOPY CLOB, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, erase_clob BOOLEAN DEFAULT TRUE); PROCEDURE object_print (p_self IN json, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 8192, jsonp VARCHAR2 DEFAULT NULL); PROCEDURE object_htp (p_self IN json, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, jsonp VARCHAR2 DEFAULT NULL); FUNCTION object_to_json_value (p_self IN json) RETURN json_value; FUNCTION object_path (p_self IN json, json_path VARCHAR2, base NUMBER DEFAULT 1) RETURN json_value; PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem json_value, base NUMBER DEFAULT 1); PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem VARCHAR2, base NUMBER DEFAULT 1); PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem NUMBER, base NUMBER DEFAULT 1); PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem BOOLEAN, base NUMBER DEFAULT 1); PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem json_list, base NUMBER DEFAULT 1); PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem json, base NUMBER DEFAULT 1); PROCEDURE object_path_remove (p_self IN OUT NOCOPY json, json_path VARCHAR2, base NUMBER DEFAULT 1); FUNCTION object_get_values (p_self IN json) RETURN json_list; FUNCTION object_get_keys (p_self IN json) RETURN json_list; --json_list type methods PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem json_value, position PLS_INTEGER DEFAULT NULL); PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem VARCHAR2, position PLS_INTEGER DEFAULT NULL); PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem NUMBER, position PLS_INTEGER DEFAULT NULL); PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem BOOLEAN, position PLS_INTEGER DEFAULT NULL); PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem json_list, position PLS_INTEGER DEFAULT NULL); PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem json_value); PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem VARCHAR2); PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem NUMBER); PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem BOOLEAN); PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem json_list); FUNCTION array_count (p_self IN json_list) RETURN NUMBER; PROCEDURE array_remove (p_self IN OUT NOCOPY json_list, position PLS_INTEGER); PROCEDURE array_remove_first (p_self IN OUT NOCOPY json_list); PROCEDURE array_remove_last (p_self IN OUT NOCOPY json_list); FUNCTION array_get (p_self IN json_list, position PLS_INTEGER) RETURN json_value; FUNCTION array_head (p_self IN json_list) RETURN json_value; FUNCTION array_last (p_self IN json_list) RETURN json_value; FUNCTION array_tail (p_self IN json_list) RETURN json_list; FUNCTION array_to_char (p_self IN json_list, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 0) RETURN VARCHAR2; PROCEDURE array_to_clob ( p_self IN json_list, buf IN OUT NOCOPY CLOB, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, erase_clob BOOLEAN DEFAULT TRUE); PROCEDURE array_print (p_self IN json_list, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 8192, jsonp VARCHAR2 DEFAULT NULL); PROCEDURE array_htp (p_self IN json_list, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, jsonp VARCHAR2 DEFAULT NULL); FUNCTION array_path (p_self IN json_list, json_path VARCHAR2, base NUMBER DEFAULT 1) RETURN json_value; PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem json_value, base NUMBER DEFAULT 1); PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem VARCHAR2, base NUMBER DEFAULT 1); PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem NUMBER, base NUMBER DEFAULT 1); PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem BOOLEAN, base NUMBER DEFAULT 1); PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem json_list, base NUMBER DEFAULT 1); PROCEDURE array_path_remove (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, base NUMBER DEFAULT 1); FUNCTION array_to_json_value (p_self IN json_list) RETURN json_value; --json_value FUNCTION jv_get_type (p_self IN json_value) RETURN VARCHAR2; FUNCTION jv_get_string (p_self IN json_value, max_byte_size NUMBER DEFAULT NULL, max_char_size NUMBER DEFAULT NULL) RETURN VARCHAR2; PROCEDURE jv_get_string (p_self IN json_value, buf IN OUT NOCOPY CLOB); FUNCTION jv_get_number (p_self IN json_value) RETURN NUMBER; FUNCTION jv_get_bool (p_self IN json_value) RETURN BOOLEAN; FUNCTION jv_get_null (p_self IN json_value) RETURN VARCHAR2; FUNCTION jv_is_object (p_self IN json_value) RETURN BOOLEAN; FUNCTION jv_is_array (p_self IN json_value) RETURN BOOLEAN; FUNCTION jv_is_string (p_self IN json_value) RETURN BOOLEAN; FUNCTION jv_is_number (p_self IN json_value) RETURN BOOLEAN; FUNCTION jv_is_bool (p_self IN json_value) RETURN BOOLEAN; FUNCTION jv_is_null (p_self IN json_value) RETURN BOOLEAN; FUNCTION jv_to_char (p_self IN json_value, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 0) RETURN VARCHAR2; PROCEDURE jv_to_clob (p_self IN json_value, buf IN OUT NOCOPY CLOB, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, erase_clob BOOLEAN DEFAULT TRUE); PROCEDURE jv_print (p_self IN json_value, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 8192, jsonp VARCHAR2 DEFAULT NULL); PROCEDURE jv_htp (p_self IN json_value, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, jsonp VARCHAR2 DEFAULT NULL); FUNCTION jv_value_of (p_self IN json_value, max_byte_size NUMBER DEFAULT NULL, max_char_size NUMBER DEFAULT NULL) RETURN VARCHAR2; END json_ac; / CREATE OR REPLACE PACKAGE BODY json_ac AS /* Copyright (c) 2010 Jonas Krogsboell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ PROCEDURE object_remove (p_self IN OUT NOCOPY json, pair_name VARCHAR2) AS BEGIN p_self.remove (pair_name); END; PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value json_value, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.put (pair_name, pair_value, position); END; PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value VARCHAR2, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.put (pair_name, pair_value, position); END; PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value NUMBER, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.put (pair_name, pair_value, position); END; PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value BOOLEAN, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.put (pair_name, pair_value, position); END; PROCEDURE object_check_duplicate (p_self IN OUT NOCOPY json, v_set BOOLEAN) AS BEGIN p_self.check_duplicate (v_set); END; PROCEDURE object_remove_duplicates (p_self IN OUT NOCOPY json) AS BEGIN p_self.remove_duplicates; END; PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value json, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.put (pair_name, pair_value, position); END; PROCEDURE object_put (p_self IN OUT NOCOPY json, pair_name VARCHAR2, pair_value json_list, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.put (pair_name, pair_value, position); END; FUNCTION object_count (p_self IN json) RETURN NUMBER AS BEGIN RETURN p_self.COUNT; END; FUNCTION object_get (p_self IN json, pair_name VARCHAR2) RETURN json_value AS BEGIN RETURN p_self.get (pair_name); END; FUNCTION object_get (p_self IN json, position PLS_INTEGER) RETURN json_value AS BEGIN RETURN p_self.get (position); END; FUNCTION object_index_of (p_self IN json, pair_name VARCHAR2) RETURN NUMBER AS BEGIN RETURN p_self.index_of (pair_name); END; FUNCTION object_exist (p_self IN json, pair_name VARCHAR2) RETURN BOOLEAN AS BEGIN RETURN p_self.exist (pair_name); END; FUNCTION object_to_char (p_self IN json, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 0) RETURN VARCHAR2 AS BEGIN RETURN p_self.TO_CHAR (spaces, chars_per_line); END; PROCEDURE object_to_clob ( p_self IN json, buf IN OUT NOCOPY CLOB, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, erase_clob BOOLEAN DEFAULT TRUE) AS BEGIN p_self.TO_CLOB (buf, spaces, chars_per_line, erase_clob); END; PROCEDURE object_print (p_self IN json, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 8192, jsonp VARCHAR2 DEFAULT NULL) AS BEGIN p_self.PRINT (spaces, chars_per_line, jsonp); END; PROCEDURE object_htp (p_self IN json, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, jsonp VARCHAR2 DEFAULT NULL) AS BEGIN p_self.HTP (spaces, chars_per_line, jsonp); END; FUNCTION object_to_json_value (p_self IN json) RETURN json_value AS BEGIN RETURN p_self.to_json_value; END; FUNCTION object_path (p_self IN json, json_path VARCHAR2, base NUMBER DEFAULT 1) RETURN json_value AS BEGIN RETURN p_self.PATH (json_path, base); END; PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem json_value, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem VARCHAR2, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem NUMBER, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem BOOLEAN, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem json_list, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE object_path_put (p_self IN OUT NOCOPY json, json_path VARCHAR2, elem json, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE object_path_remove (p_self IN OUT NOCOPY json, json_path VARCHAR2, base NUMBER DEFAULT 1) AS BEGIN p_self.path_remove (json_path, base); END; FUNCTION object_get_values (p_self IN json) RETURN json_list AS BEGIN RETURN p_self.get_values; END; FUNCTION object_get_keys (p_self IN json) RETURN json_list AS BEGIN RETURN p_self.get_keys; END; --json_list type PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem json_value, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.append (elem, position); END; PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem VARCHAR2, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.append (elem, position); END; PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem NUMBER, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.append (elem, position); END; PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem BOOLEAN, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.append (elem, position); END; PROCEDURE array_append (p_self IN OUT NOCOPY json_list, elem json_list, position PLS_INTEGER DEFAULT NULL) AS BEGIN p_self.append (elem, position); END; PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem json_value) AS BEGIN p_self.REPLACE (position, elem); END; PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem VARCHAR2) AS BEGIN p_self.REPLACE (position, elem); END; PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem NUMBER) AS BEGIN p_self.REPLACE (position, elem); END; PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem BOOLEAN) AS BEGIN p_self.REPLACE (position, elem); END; PROCEDURE array_replace (p_self IN OUT NOCOPY json_list, position PLS_INTEGER, elem json_list) AS BEGIN p_self.REPLACE (position, elem); END; FUNCTION array_count (p_self IN json_list) RETURN NUMBER AS BEGIN RETURN p_self.COUNT; END; PROCEDURE array_remove (p_self IN OUT NOCOPY json_list, position PLS_INTEGER) AS BEGIN p_self.remove (position); END; PROCEDURE array_remove_first (p_self IN OUT NOCOPY json_list) AS BEGIN p_self.remove_first; END; PROCEDURE array_remove_last (p_self IN OUT NOCOPY json_list) AS BEGIN p_self.remove_last; END; FUNCTION array_get (p_self IN json_list, position PLS_INTEGER) RETURN json_value AS BEGIN RETURN p_self.get (position); END; FUNCTION array_head (p_self IN json_list) RETURN json_value AS BEGIN RETURN p_self.head; END; FUNCTION array_last (p_self IN json_list) RETURN json_value AS BEGIN RETURN p_self.LAST; END; FUNCTION array_tail (p_self IN json_list) RETURN json_list AS BEGIN RETURN p_self.tail; END; FUNCTION array_to_char (p_self IN json_list, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 0) RETURN VARCHAR2 AS BEGIN RETURN p_self.TO_CHAR (spaces, chars_per_line); END; PROCEDURE array_to_clob ( p_self IN json_list, buf IN OUT NOCOPY CLOB, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, erase_clob BOOLEAN DEFAULT TRUE) AS BEGIN p_self.TO_CLOB (buf, spaces, chars_per_line, erase_clob); END; PROCEDURE array_print (p_self IN json_list, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 8192, jsonp VARCHAR2 DEFAULT NULL) AS BEGIN p_self.PRINT (spaces, chars_per_line, jsonp); END; PROCEDURE array_htp (p_self IN json_list, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, jsonp VARCHAR2 DEFAULT NULL) AS BEGIN p_self.HTP (spaces, chars_per_line, jsonp); END; FUNCTION array_path (p_self IN json_list, json_path VARCHAR2, base NUMBER DEFAULT 1) RETURN json_value AS BEGIN RETURN p_self.PATH (json_path, base); END; PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem json_value, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem VARCHAR2, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem NUMBER, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem BOOLEAN, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE array_path_put (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, elem json_list, base NUMBER DEFAULT 1) AS BEGIN p_self.path_put (json_path, elem, base); END; PROCEDURE array_path_remove (p_self IN OUT NOCOPY json_list, json_path VARCHAR2, base NUMBER DEFAULT 1) AS BEGIN p_self.path_remove (json_path, base); END; FUNCTION array_to_json_value (p_self IN json_list) RETURN json_value AS BEGIN RETURN p_self.to_json_value; END; --json_value FUNCTION jv_get_type (p_self IN json_value) RETURN VARCHAR2 AS BEGIN RETURN p_self.get_type; END; FUNCTION jv_get_string (p_self IN json_value, max_byte_size NUMBER DEFAULT NULL, max_char_size NUMBER DEFAULT NULL) RETURN VARCHAR2 AS BEGIN RETURN p_self.get_string (max_byte_size, max_char_size); END; PROCEDURE jv_get_string (p_self IN json_value, buf IN OUT NOCOPY CLOB) AS BEGIN p_self.get_string (buf); END; FUNCTION jv_get_number (p_self IN json_value) RETURN NUMBER AS BEGIN RETURN p_self.get_number; END; FUNCTION jv_get_bool (p_self IN json_value) RETURN BOOLEAN AS BEGIN RETURN p_self.get_bool; END; FUNCTION jv_get_null (p_self IN json_value) RETURN VARCHAR2 AS BEGIN RETURN p_self.get_null; END; FUNCTION jv_is_object (p_self IN json_value) RETURN BOOLEAN AS BEGIN RETURN p_self.is_object; END; FUNCTION jv_is_array (p_self IN json_value) RETURN BOOLEAN AS BEGIN RETURN p_self.is_array; END; FUNCTION jv_is_string (p_self IN json_value) RETURN BOOLEAN AS BEGIN RETURN p_self.is_string; END; FUNCTION jv_is_number (p_self IN json_value) RETURN BOOLEAN AS BEGIN RETURN p_self.is_number; END; FUNCTION jv_is_bool (p_self IN json_value) RETURN BOOLEAN AS BEGIN RETURN p_self.is_bool; END; FUNCTION jv_is_null (p_self IN json_value) RETURN BOOLEAN AS BEGIN RETURN p_self.is_null; END; FUNCTION jv_to_char (p_self IN json_value, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 0) RETURN VARCHAR2 AS BEGIN RETURN p_self.TO_CHAR (spaces, chars_per_line); END; PROCEDURE jv_to_clob (p_self IN json_value, buf IN OUT NOCOPY CLOB, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, erase_clob BOOLEAN DEFAULT TRUE) AS BEGIN p_self.TO_CLOB (buf, spaces, chars_per_line, erase_clob); END; PROCEDURE jv_print (p_self IN json_value, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 8192, jsonp VARCHAR2 DEFAULT NULL) AS BEGIN p_self.PRINT (spaces, chars_per_line, jsonp); END; PROCEDURE jv_htp (p_self IN json_value, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, jsonp VARCHAR2 DEFAULT NULL) AS BEGIN p_self.HTP (spaces, chars_per_line, jsonp); END; FUNCTION jv_value_of (p_self IN json_value, max_byte_size NUMBER DEFAULT NULL, max_char_size NUMBER DEFAULT NULL) RETURN VARCHAR2 AS BEGIN RETURN p_self.value_of (max_byte_size, max_char_size); END; END json_ac; /
the_stack
-- 2021-01-21T18:45:28.321Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2021-01-21 20:45:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628602 ; -- 2021-01-21T18:45:28.370Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2021-01-21 20:45:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628598 ; -- 2021-01-21T18:45:28.371Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2021-01-21 20:45:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628599 ; -- 2021-01-21T18:45:28.373Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2021-01-21 20:45:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628600 ; -- 2021-01-21T18:45:28.374Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2021-01-21 20:45:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628601 ; -- 2021-01-21T18:45:32.457Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2021-01-21 20:45:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628602 ; -- 2021-01-21T18:45:32.459Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=10,Updated=TO_TIMESTAMP('2021-01-21 20:45:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628598 ; -- 2021-01-21T18:45:32.460Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20,Updated=TO_TIMESTAMP('2021-01-21 20:45:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628599 ; -- 2021-01-21T18:45:32.461Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30,Updated=TO_TIMESTAMP('2021-01-21 20:45:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628600 ; -- 2021-01-21T18:45:32.462Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40,Updated=TO_TIMESTAMP('2021-01-21 20:45:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=628601 ; -- 2021-01-21T18:48:21.639Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,543309,542511,TO_TIMESTAMP('2021-01-21 20:48:21','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2021-01-21 20:48:21','YYYY-MM-DD HH24:MI:SS'),100,'main') ; -- 2021-01-21T18:48:21.642Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_UI_Section_ID=542511 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2021-01-21T18:48:25.945Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,543189,542511,TO_TIMESTAMP('2021-01-21 20:48:25','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2021-01-21 20:48:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T18:48:27.592Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,543190,542511,TO_TIMESTAMP('2021-01-21 20:48:27','YYYY-MM-DD HH24:MI:SS'),100,'Y',20,TO_TIMESTAMP('2021-01-21 20:48:27','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T18:48:43.005Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,543189,544760,TO_TIMESTAMP('2021-01-21 20:48:42','YYYY-MM-DD HH24:MI:SS'),100,'Y','grouping key',10,TO_TIMESTAMP('2021-01-21 20:48:42','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T18:49:08.472Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,AD_UI_ElementType,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,628598,0,543309,576316,544760,'F',TO_TIMESTAMP('2021-01-21 20:49:08','YYYY-MM-DD HH24:MI:SS'),100,'Produkt, Leistung, Artikel','Bezeichnet eine Einheit, die in dieser Organisation gekauft oder verkauft wird.','Y','N','Y','N','N','Produkt',10,0,0,TO_TIMESTAMP('2021-01-21 20:49:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T18:49:16.506Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,AD_UI_ElementType,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,628599,0,543309,576317,544760,'F',TO_TIMESTAMP('2021-01-21 20:49:16','YYYY-MM-DD HH24:MI:SS'),100,'Maßeinheit','Eine eindeutige (nicht monetäre) Maßeinheit','Y','N','Y','N','N','Maßeinheit',20,0,0,TO_TIMESTAMP('2021-01-21 20:49:16','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T18:49:29.824Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,543190,544761,TO_TIMESTAMP('2021-01-21 20:49:29','YYYY-MM-DD HH24:MI:SS'),100,'Y','qtys',10,TO_TIMESTAMP('2021-01-21 20:49:29','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T18:49:42.415Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,AD_UI_ElementType,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,628600,0,543309,576318,544761,'F',TO_TIMESTAMP('2021-01-21 20:49:42','YYYY-MM-DD HH24:MI:SS'),100,'Reservierte Menge','Die "Reservierte Menge" bezeichnet die Menge einer Ware, die zur Zeit reserviert ist.','Y','N','Y','N','N','Reservierte Menge',10,0,0,TO_TIMESTAMP('2021-01-21 20:49:42','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T18:50:30.646Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,628601,0,543309,576319,544761,'F',TO_TIMESTAMP('2021-01-21 20:50:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Consumed Qty',20,0,0,TO_TIMESTAMP('2021-01-21 20:50:30','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T18:50:53.411Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2021-01-21 20:50:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=576316 ; -- 2021-01-21T18:50:53.412Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2021-01-21 20:50:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=576317 ; -- 2021-01-21T18:50:53.414Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2021-01-21 20:50:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=576318 ; -- 2021-01-21T18:50:53.416Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2021-01-21 20:50:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=576319 ; -- 2021-01-21T18:51:38.151Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='S',Updated=TO_TIMESTAMP('2021-01-21 20:51:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=576317 ; -- 2021-01-21T18:52:26.261Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='S',Updated=TO_TIMESTAMP('2021-01-21 20:52:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=576318 ; -- 2021-01-21T18:52:29.279Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='S',Updated=TO_TIMESTAMP('2021-01-21 20:52:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=576319 ; -- 2021-01-21T20:23:32.903Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,543164,544762,TO_TIMESTAMP('2021-01-21 22:23:32','YYYY-MM-DD HH24:MI:SS'),100,'Y','status',20,TO_TIMESTAMP('2021-01-21 22:23:32','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T20:24:03.233Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,AD_UI_ElementType,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,627751,0,543279,576320,544762,'F',TO_TIMESTAMP('2021-01-21 22:24:03','YYYY-MM-DD HH24:MI:SS'),100,'Checkbox sagt aus, ob der Datensatz verarbeitet wurde. ','Verarbeitete Datensatz dürfen in der Regel nich mehr geändert werden.','Y','N','Y','N','N','Verarbeitet',10,0,0,TO_TIMESTAMP('2021-01-21 22:24:03','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-01-21T20:24:12.902Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2021-01-21 22:24:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=627751 ; -- 2021-01-21T20:24:59.649Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET IsInsertRecord='N',Updated=TO_TIMESTAMP('2021-01-21 22:24:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=543279 ;
the_stack
-- 2019-02-15T18:38:10.967 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Table SET TableName='C_Phonecall_Schedule',Updated=TO_TIMESTAMP('2019-02-15 18:38:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=541176 ; -- 2019-02-15T18:38:10.997 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Sequence SET Name='C_Phonecall_Schedule',Updated=TO_TIMESTAMP('2019-02-15 18:38:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Sequence_ID=554793 ; -- 2019-02-15T18:38:25.624 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column_Trl WHERE AD_Column_ID=564129 ; -- 2019-02-15T18:38:25.644 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column WHERE AD_Column_ID=564129 ; -- 2019-02-15T18:38:39.162 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,576121,0,'C_Phonecall_Schedule_ID',TO_TIMESTAMP('2019-02-15 18:38:39','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Anruf','Anruf',TO_TIMESTAMP('2019-02-15 18:38:39','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-02-15T18:38:39.172 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=576121 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2019-02-15T18:38:39.272 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,564182,576121,0,13,541176,'C_Phonecall_Schedule_ID',TO_TIMESTAMP('2019-02-15 18:38:39','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','Y','Y','N','N','Y','N','N','Anruf',0,TO_TIMESTAMP('2019-02-15 18:38:39','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2019-02-15T18:38:39.282 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=564182 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2019-02-15T18:39:14.339 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2019-02-15 18:39:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=564143 ; -- 2019-02-15T18:39:29.414 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutoApplyValidationRule,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsForceIncludeInGeneratedModel,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,564183,576098,0,30,541176,'C_Phonecall_Schema_ID',TO_TIMESTAMP('2019-02-15 18:39:29','YYYY-MM-DD HH24:MI:SS'),100,'N','D',10,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','N','N','Y','N','Anrufliste',0,0,TO_TIMESTAMP('2019-02-15 18:39:29','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2019-02-15T18:39:29.424 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=564183 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2019-02-15T18:41:20.032 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,540418,'C_Phonecall_Schema_Version.C_PhonecallSchema_ID = @C_Phonecall_Schema_ID@',TO_TIMESTAMP('2019-02-15 18:41:19','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','C_Phonecall_Schema_Version','S',TO_TIMESTAMP('2019-02-15 18:41:19','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-02-15T18:41:50.309 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Val_Rule_ID=540418,Updated=TO_TIMESTAMP('2019-02-15 18:41:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=564143 ; -- 2019-02-15T18:42:35.152 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutoApplyValidationRule,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsForceIncludeInGeneratedModel,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,564184,576119,0,30,541176,'C_Phonecall_Schema_Version_Line_ID',TO_TIMESTAMP('2019-02-15 18:42:35','YYYY-MM-DD HH24:MI:SS'),100,'N','D',10,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Anrufliste Position',0,0,TO_TIMESTAMP('2019-02-15 18:42:35','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2019-02-15T18:42:35.162 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=564184 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2019-02-15T18:43:16.489 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Val_Rule SET Code='C_Phonecall_Schema_Version.C_Phonecall_Schema_ID = @C_Phonecall_Schema_ID@',Updated=TO_TIMESTAMP('2019-02-15 18:43:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=540418 ; -- 2019-02-15T18:43:44.736 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,540419,'C_Phonecall_Schema_Version_Line.C_Phonecall_Schema_Version_ID = @C_Phonecall_Schema_Version_ID@',TO_TIMESTAMP('2019-02-15 18:43:44','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','C_Phonecall_Schema_Version_Line','S',TO_TIMESTAMP('2019-02-15 18:43:44','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-02-15T18:43:58.536 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Val_Rule_ID=540419,Updated=TO_TIMESTAMP('2019-02-15 18:43:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=564184 ; -- 2019-02-15T18:44:15.297 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column_Trl WHERE AD_Column_ID=564145 ; -- 2019-02-15T18:44:15.317 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column WHERE AD_Column_ID=564145 ; -- 2019-02-15T18:44:17.969 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column_Trl WHERE AD_Column_ID=564163 ; -- 2019-02-15T18:44:17.979 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Column WHERE AD_Column_ID=564163 ; -- 2019-02-15T18:44:47.391 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='PhonecallDate',Updated=TO_TIMESTAMP('2019-02-15 18:44:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576112 ; -- 2019-02-15T18:44:47.401 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='PhonecallDate', Name='Anrufdatum', Description=NULL, Help=NULL WHERE AD_Element_ID=576112 ; -- 2019-02-15T18:44:47.401 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='PhonecallDate', Name='Anrufdatum', Description=NULL, Help=NULL, AD_Element_ID=576112 WHERE UPPER(ColumnName)='PHONECALLDATE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2019-02-15T18:44:47.411 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='PhonecallDate', Name='Anrufdatum', Description=NULL, Help=NULL WHERE AD_Element_ID=576112 AND IsCentrallyMaintained='Y' ; -- 2019-02-15T18:44:57.435 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2019-02-15 18:44:57','YYYY-MM-DD HH24:MI:SS'),Name='Phonecall Date',PrintName='Phonecall Date' WHERE AD_Element_ID=576112 AND AD_Language='en_US' ; -- 2019-02-15T18:44:57.759 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576112,'en_US') ; -- 2019-02-15T18:45:03.737 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutoApplyValidationRule,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsForceIncludeInGeneratedModel,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,564185,576112,0,15,541176,'PhonecallDate',TO_TIMESTAMP('2019-02-15 18:45:03','YYYY-MM-DD HH24:MI:SS'),100,'N','D',7,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Anrufdatum',0,0,TO_TIMESTAMP('2019-02-15 18:45:03','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2019-02-15T18:45:03.747 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=564185 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2019-02-15T18:45:23.043 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2019-02-15 18:45:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=564185 ; -- 2019-02-15T18:45:36.281 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2019-02-15 18:45:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=564184 ; -- 2019-02-15T18:46:43.680 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,576122,0,'PhonecallTimeMin',TO_TIMESTAMP('2019-02-15 18:46:43','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','PhonecallTimeMin','PhonecallTimeMin',TO_TIMESTAMP('2019-02-15 18:46:43','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-02-15T18:46:43.680 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=576122 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2019-02-15T18:47:01.551 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutoApplyValidationRule,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsForceIncludeInGeneratedModel,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,564186,576122,0,24,541176,'PhonecallTimeMin',TO_TIMESTAMP('2019-02-15 18:47:01','YYYY-MM-DD HH24:MI:SS'),100,'N','D',25,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','PhonecallTimeMin',0,0,TO_TIMESTAMP('2019-02-15 18:47:01','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2019-02-15T18:47:01.561 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=564186 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2019-02-15T18:47:16.719 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,576123,0,'PhonecallTimeMax',TO_TIMESTAMP('2019-02-15 18:47:16','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','PhonecallTimeMax','PhonecallTimeMax',TO_TIMESTAMP('2019-02-15 18:47:16','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-02-15T18:47:16.719 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=576123 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2019-02-15T18:47:30.374 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutoApplyValidationRule,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsForceIncludeInGeneratedModel,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,564187,576123,0,24,541176,'PhonecallTimeMax',TO_TIMESTAMP('2019-02-15 18:47:30','YYYY-MM-DD HH24:MI:SS'),100,'N','D',25,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','PhonecallTimeMax',0,0,TO_TIMESTAMP('2019-02-15 18:47:30','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2019-02-15T18:47:30.374 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=564187 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2019-02-15T18:47:32.194 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2019-02-15 18:47:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=564187 ; -- 2019-02-15T18:47:39.498 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2019-02-15 18:47:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=564186 ;
the_stack
-- 2017-08-30T19:00:57.786 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Window_Trl WHERE AD_Window_ID=540357 ; -- 2017-08-30T19:00:57.796 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Window WHERE AD_Window_ID=540357 ; -- 2017-08-30T19:07:07.833 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,Description,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,WEBUI_NameBrowse) VALUES ('W',0,540917,0,332,TO_TIMESTAMP('2017-08-30 19:07:07','YYYY-MM-DD HH24:MI:SS'),100,'Revision der Prozesse','D','_Prozess_Revision','Y','N','N','N','N','Prozess Revision',TO_TIMESTAMP('2017-08-30 19:07:07','YYYY-MM-DD HH24:MI:SS'),100,'Prozess Revision') ; -- 2017-08-30T19:07:07.836 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=540917 AND NOT EXISTS (SELECT 1 FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) ; -- 2017-08-30T19:07:07.838 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', now(), 100, now(), 100,t.AD_Tree_ID, 540917, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.AD_Table_ID=116 AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=540917) ; -- 2017-08-30T19:07:08.406 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=540892 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.407 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=540914 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.408 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=540915 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.409 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=150 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.411 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=147 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.411 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=145 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.412 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=144 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.412 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=540743 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.413 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=540784 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.414 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=540826 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.414 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=540898 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.415 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=540895 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.415 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=540827 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.416 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=540828 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.416 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=540849 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.417 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=540911 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.417 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=540912 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.417 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=540913 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.418 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=540894 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.418 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000099 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.419 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=20, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000100 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.420 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=21, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000101 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.420 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=22, Updated=now(), UpdatedBy=100 WHERE Node_ID=540901 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:08.420 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=23, Updated=now(), UpdatedBy=100 WHERE Node_ID=540917 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.451 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=540892 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.453 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=540914 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.455 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=540915 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.456 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=150 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.456 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=147 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.457 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=145 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.458 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=144 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.459 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=540743 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.459 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=540784 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.460 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=540826 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.460 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=540898 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.461 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=540895 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.462 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=540827 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.463 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=540828 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.463 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=540849 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.464 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=540911 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.465 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=540912 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.466 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=540913 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.466 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=540894 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.467 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=540917 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.468 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=20, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000099 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.468 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=21, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000100 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.469 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=22, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000101 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:11.470 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=23, Updated=now(), UpdatedBy=100 WHERE Node_ID=540901 AND AD_Tree_ID=10 ; -- 2017-08-30T19:07:24.459 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,663,540451,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'main') ; -- 2017-08-30T19:07:24.461 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_UI_Section_ID=540451 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2017-08-30T19:07:24.503 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540604,540451,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.538 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540605,540451,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',20,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.574 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540604,541063,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','default',10,'primary',TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.625 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10496,0,663,541063,547956,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Mandant für diese Installation.','Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .','Y','N','Y','Y','N','Mandant',10,10,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.660 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10499,0,663,541063,547957,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Organisatorische Einheit des Mandanten','Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.','Y','N','Y','Y','N','Sektion',20,20,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.692 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10524,0,663,541063,547958,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Datum, an dem dieser Eintrag erstellt wurde','Das Feld "Erstellt" zeigt an, zu welchem Datum dieser Eintrag erstellt wurde.','Y','N','Y','Y','N','Erstellt',30,30,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.719 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10526,0,663,541063,547959,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Datum, an dem dieser Eintrag aktualisiert wurde','"Aktualisiert" zeigt an, wann dieser Eintrag aktualisiert wurde.','Y','N','Y','Y','N','Aktualisiert',40,40,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.749 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10502,0,663,541063,547960,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Prozess oder Bericht','das Feld "Prozess" bezeichnet einen einzelnen Prozess oder Bericht im System.','Y','N','Y','Y','N','Prozess',50,50,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.784 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,555710,0,663,541063,547961,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','The Database Table provides the information of the table definition','Y','N','Y','Y','N','DB-Tabelle',60,60,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.812 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10494,0,663,541063,547962,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Direct internal record ID','The Record ID is the internal unique identifier of a record. Please note that zooming to the record may not be successful for Orders, Invoices and Shipment/Receipts as sometimes the Sales Order type is not known.','Y','N','Y','Y','N','Datensatz-ID',70,70,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.844 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,555711,0,663,541063,547963,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Fully qualified SQL WHERE clause','The Where Clause indicates the SQL WHERE clause to use for record selection. The WHERE clause is added to the query. Fully qualified means "tablename.columnname".','Y','N','Y','Y','N','Sql WHERE',80,80,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.878 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10497,0,663,541063,547964,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','Y','N','Y','Y','N','Lieferkontakt',90,90,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.912 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,557445,0,663,541063,547965,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role','The Role determines security and access a user who has this Role will have in the System.','Y','N','Y','Y','N','Rolle',100,100,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.946 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,557446,0,663,541063,547966,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Sprache für diesen Eintrag','Definiert die Sprache für Anzeige und Aufbereitung','Y','N','Y','Y','N','Sprache',110,110,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:24.974 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10500,0,663,541063,547967,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','Y','N','Fehlermeldung',120,120,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.020 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10501,0,663,541063,547968,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100,'Result of the action taken','The Result indicates the result of any action taken on this request.','Y','N','Y','Y','N','Ergebnis',130,130,0,TO_TIMESTAMP('2017-08-30 19:07:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.051 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10495,0,663,541063,547969,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','Y','N','Processing',140,140,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.079 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,664,540452,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'main') ; -- 2017-08-30T19:07:25.080 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_UI_Section_ID=540452 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2017-08-30T19:07:25.116 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540606,540452,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.146 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540606,541064,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','default',10,'primary',TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.179 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10512,0,664,541064,547970,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Mandant für diese Installation.','Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .','Y','N','N','Y','N','Mandant',0,10,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.211 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10511,0,664,541064,547971,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Organisatorische Einheit des Mandanten','Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.','Y','N','N','Y','N','Sektion',0,20,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.241 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10513,0,664,541064,547972,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Instanz eines Prozesses','Y','N','N','Y','N','Prozess-Instanz',0,30,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.267 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10508,0,664,541064,547973,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst','"Reihenfolge" bestimmt die Reihenfolge der Einträge','Y','N','N','Y','N','Reihenfolge',0,40,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.296 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10506,0,664,541064,547974,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','Parameter Name',0,50,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.328 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10505,0,664,541064,547975,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Information','The Information displays data from the source document line.','Y','N','N','Y','N','Info',0,60,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.354 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10507,0,664,541064,547976,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','Info To',0,70,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.386 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10516,0,664,541064,547977,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Prozess-Parameter','Y','N','N','Y','N','Process String',0,80,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.417 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10517,0,664,541064,547978,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Prozess-Parameter','Y','N','N','Y','N','Process String To',0,90,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.447 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10514,0,664,541064,547979,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Prozess-Parameter','Y','N','N','Y','N','Process Date',0,100,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.478 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10515,0,664,541064,547980,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Prozess-Parameter','Y','N','N','Y','N','Process Date To',0,110,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.512 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10509,0,664,541064,547981,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Prozess-Parameter','Y','N','N','Y','N','Process Number',0,120,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.545 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10504,0,664,541064,547982,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Prozess-Parameter','Y','N','N','Y','N','Process Number To',0,130,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.583 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,665,540453,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'main') ; -- 2017-08-30T19:07:25.585 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_UI_Section_ID=540453 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2017-08-30T19:07:25.620 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540607,540453,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.655 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540607,541065,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','default',10,'primary',TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.689 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10520,0,665,541065,547983,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Instanz eines Prozesses','Y','N','N','Y','N','Prozess-Instanz',0,10,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.722 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10519,0,665,541065,547984,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','Eintrag-Nr',0,20,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.754 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10522,0,665,541065,547985,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Prozess-Parameter','Y','N','N','Y','N','Process Date',0,30,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.787 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10518,0,665,541065,547986,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Prozess-Parameter','Y','N','N','Y','N','Process Number',0,40,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:07:25.818 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10521,0,665,541065,547987,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','Process Message',0,50,0,TO_TIMESTAMP('2017-08-30 19:07:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:16:13.978 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540604,541066,TO_TIMESTAMP('2017-08-30 19:16:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','default',10,'primary',TO_TIMESTAMP('2017-08-30 19:16:13','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:16:30.588 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_ElementGroup SET Name='advanced edit', SeqNo=90,Updated=TO_TIMESTAMP('2017-08-30 19:16:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=541063 ; -- 2017-08-30T19:16:53.216 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10502,0,663,541066,547988,TO_TIMESTAMP('2017-08-30 19:16:53','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Prozess',10,0,0,TO_TIMESTAMP('2017-08-30 19:16:53','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:16:59.292 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='L',Updated=TO_TIMESTAMP('2017-08-30 19:16:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547988 ; -- 2017-08-30T19:17:25.726 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10524,0,663,541066,547989,TO_TIMESTAMP('2017-08-30 19:17:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Erstellt',20,0,0,TO_TIMESTAMP('2017-08-30 19:17:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:17:46.288 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10526,0,663,541066,547990,TO_TIMESTAMP('2017-08-30 19:17:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Aktualisiert',30,0,0,TO_TIMESTAMP('2017-08-30 19:17:46','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:18:36.972 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540604,541067,TO_TIMESTAMP('2017-08-30 19:18:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','details',20,TO_TIMESTAMP('2017-08-30 19:18:36','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:18:47.246 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,557446,0,663,541067,547991,TO_TIMESTAMP('2017-08-30 19:18:47','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Sprache',10,0,0,TO_TIMESTAMP('2017-08-30 19:18:47','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:19:00.810 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10497,0,663,541067,547992,TO_TIMESTAMP('2017-08-30 19:19:00','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Benutzer',20,0,0,TO_TIMESTAMP('2017-08-30 19:19:00','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:19:04.094 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=10,Updated=TO_TIMESTAMP('2017-08-30 19:19:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547992 ; -- 2017-08-30T19:19:06.479 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=20,Updated=TO_TIMESTAMP('2017-08-30 19:19:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547991 ; -- 2017-08-30T19:19:17.870 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,557445,0,663,541067,547993,TO_TIMESTAMP('2017-08-30 19:19:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Rolle',30,0,0,TO_TIMESTAMP('2017-08-30 19:19:17','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:19:33.275 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10500,0,663,541067,547994,TO_TIMESTAMP('2017-08-30 19:19:33','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Fehlermeldung',40,0,0,TO_TIMESTAMP('2017-08-30 19:19:33','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:19:43.597 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10501,0,663,541067,547995,TO_TIMESTAMP('2017-08-30 19:19:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Ergebnis',50,0,0,TO_TIMESTAMP('2017-08-30 19:19:43','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:19:53.739 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540605,541068,TO_TIMESTAMP('2017-08-30 19:19:53','YYYY-MM-DD HH24:MI:SS'),100,'Y','flags',10,TO_TIMESTAMP('2017-08-30 19:19:53','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:20:06.122 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10495,0,663,541068,547996,TO_TIMESTAMP('2017-08-30 19:20:06','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','In Verarbeitung',10,0,0,TO_TIMESTAMP('2017-08-30 19:20:06','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:20:17.950 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,555710,0,663,541068,547997,TO_TIMESTAMP('2017-08-30 19:20:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','DB Tabelle',20,0,0,TO_TIMESTAMP('2017-08-30 19:20:17','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:20:26.744 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10494,0,663,541068,547998,TO_TIMESTAMP('2017-08-30 19:20:26','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Datensatz',30,0,0,TO_TIMESTAMP('2017-08-30 19:20:26','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:20:43.852 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540605,541069,TO_TIMESTAMP('2017-08-30 19:20:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','org',20,TO_TIMESTAMP('2017-08-30 19:20:43','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:20:52.855 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10499,0,663,541069,547999,TO_TIMESTAMP('2017-08-30 19:20:52','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Sektion',10,0,0,TO_TIMESTAMP('2017-08-30 19:20:52','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:21:01.309 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10496,0,663,541069,548000,TO_TIMESTAMP('2017-08-30 19:21:01','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Mandant',20,0,0,TO_TIMESTAMP('2017-08-30 19:21:01','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:21:55.862 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10500,0,663,541068,548001,TO_TIMESTAMP('2017-08-30 19:21:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Fehlermeldung',40,0,0,TO_TIMESTAMP('2017-08-30 19:21:55','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:22:03.002 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10501,0,663,541068,548002,TO_TIMESTAMP('2017-08-30 19:22:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Ergebnis',50,0,0,TO_TIMESTAMP('2017-08-30 19:22:02','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:22:13.318 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547994 ; -- 2017-08-30T19:22:13.330 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547995 ; -- 2017-08-30T19:22:32.085 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547956 ; -- 2017-08-30T19:22:32.103 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547957 ; -- 2017-08-30T19:22:32.114 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547958 ; -- 2017-08-30T19:22:32.129 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547959 ; -- 2017-08-30T19:22:32.139 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547960 ; -- 2017-08-30T19:22:32.150 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547961 ; -- 2017-08-30T19:22:32.162 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547962 ; -- 2017-08-30T19:22:40.959 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547964 ; -- 2017-08-30T19:22:40.972 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547965 ; -- 2017-08-30T19:22:40.983 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547966 ; -- 2017-08-30T19:22:40.992 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547967 ; -- 2017-08-30T19:22:41.001 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547968 ; -- 2017-08-30T19:22:41.008 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=547969 ; -- 2017-08-30T19:22:53.222 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsAdvancedField='Y', SeqNo=10,Updated=TO_TIMESTAMP('2017-08-30 19:22:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547963 ; -- 2017-08-30T19:23:03.437 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,663,540454,TO_TIMESTAMP('2017-08-30 19:23:03','YYYY-MM-DD HH24:MI:SS'),100,'Y',20,TO_TIMESTAMP('2017-08-30 19:23:03','YYYY-MM-DD HH24:MI:SS'),100,'advanced edit') ; -- 2017-08-30T19:23:03.440 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_UI_Section_ID=540454 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2017-08-30T19:23:06.345 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540608,540454,TO_TIMESTAMP('2017-08-30 19:23:06','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-08-30 19:23:06','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-08-30T19:23:20.753 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_ElementGroup SET AD_UI_Column_ID=540608, SeqNo=10,Updated=TO_TIMESTAMP('2017-08-30 19:23:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=541063 ; -- 2017-08-30T19:24:16.603 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547963 ; -- 2017-08-30T19:24:16.608 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547988 ; -- 2017-08-30T19:24:16.613 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547989 ; -- 2017-08-30T19:24:16.618 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547990 ; -- 2017-08-30T19:24:16.623 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547992 ; -- 2017-08-30T19:24:16.627 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547991 ; -- 2017-08-30T19:24:16.631 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547993 ; -- 2017-08-30T19:24:16.635 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547996 ; -- 2017-08-30T19:24:16.639 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547997 ; -- 2017-08-30T19:24:16.642 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547998 ; -- 2017-08-30T19:24:16.647 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=100,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=548001 ; -- 2017-08-30T19:24:16.651 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=548002 ; -- 2017-08-30T19:24:16.655 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=120,Updated=TO_TIMESTAMP('2017-08-30 19:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547999 ; -- 2017-08-30T19:24:34.281 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=10,Updated=TO_TIMESTAMP('2017-08-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547988 ; -- 2017-08-30T19:24:34.286 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=20,Updated=TO_TIMESTAMP('2017-08-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547989 ; -- 2017-08-30T19:24:34.290 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=30,Updated=TO_TIMESTAMP('2017-08-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547992 ; -- 2017-08-30T19:24:34.295 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=40,Updated=TO_TIMESTAMP('2017-08-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547999 ; -- 2017-08-30T19:25:12.290 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Benutzer',Updated=TO_TIMESTAMP('2017-08-30 19:25:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10497 ; -- 2017-08-30T19:25:18.414 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='In Verarbeitung',Updated=TO_TIMESTAMP('2017-08-30 19:25:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10495 ; -- 2017-08-30T19:25:21.334 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Instanz',Updated=TO_TIMESTAMP('2017-08-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10503 ; -- 2017-08-30T19:25:28.192 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='DB Tabelle',Updated=TO_TIMESTAMP('2017-08-30 19:25:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=555710 ; -- 2017-08-30T19:29:14.130 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547970 ; -- 2017-08-30T19:29:14.134 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547972 ; -- 2017-08-30T19:29:14.136 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547973 ; -- 2017-08-30T19:29:14.138 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547974 ; -- 2017-08-30T19:29:14.141 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547975 ; -- 2017-08-30T19:29:14.143 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547976 ; -- 2017-08-30T19:29:14.145 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547977 ; -- 2017-08-30T19:29:14.146 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547978 ; -- 2017-08-30T19:29:14.147 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547979 ; -- 2017-08-30T19:29:14.149 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547980 ; -- 2017-08-30T19:29:14.151 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547981 ; -- 2017-08-30T19:29:14.153 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=100,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547982 ; -- 2017-08-30T19:29:14.154 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2017-08-30 19:29:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547971 ; -- 2017-08-30T19:29:24.850 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Instanz',Updated=TO_TIMESTAMP('2017-08-30 19:29:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10513 ; -- 2017-08-30T19:29:32.947 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Info nach',Updated=TO_TIMESTAMP('2017-08-30 19:29:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10507 ; -- 2017-08-30T19:29:45.508 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Zeichenkette',Updated=TO_TIMESTAMP('2017-08-30 19:29:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10516 ; -- 2017-08-30T19:29:50.183 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Zeichenkette nach',Updated=TO_TIMESTAMP('2017-08-30 19:29:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10517 ; -- 2017-08-30T19:29:56.418 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Datum',Updated=TO_TIMESTAMP('2017-08-30 19:29:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10514 ; -- 2017-08-30T19:30:03.507 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Datum nach',Updated=TO_TIMESTAMP('2017-08-30 19:30:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10515 ; -- 2017-08-30T19:30:12.106 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Nummer',Updated=TO_TIMESTAMP('2017-08-30 19:30:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10509 ; -- 2017-08-30T19:30:20.635 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Zahl',Updated=TO_TIMESTAMP('2017-08-30 19:30:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10509 ; -- 2017-08-30T19:30:28.971 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Zahl nach',Updated=TO_TIMESTAMP('2017-08-30 19:30:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10504 ; -- 2017-08-30T19:31:17.298 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Instanz',Updated=TO_TIMESTAMP('2017-08-30 19:31:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10520 ; -- 2017-08-30T19:31:37.853 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Eintrag Nr.',Updated=TO_TIMESTAMP('2017-08-30 19:31:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10519 ; -- 2017-08-30T19:31:44.865 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Datum',Updated=TO_TIMESTAMP('2017-08-30 19:31:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10522 ; -- 2017-08-30T19:31:51.349 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Zahl',Updated=TO_TIMESTAMP('2017-08-30 19:31:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10518 ; -- 2017-08-30T19:31:59.933 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Prozess Nachricht',Updated=TO_TIMESTAMP('2017-08-30 19:31:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10521 ; -- 2017-08-30T19:32:23.806 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-08-30 19:32:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547983 ; -- 2017-08-30T19:32:23.811 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-08-30 19:32:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547984 ; -- 2017-08-30T19:32:23.812 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-08-30 19:32:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547985 ; -- 2017-08-30T19:32:23.813 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-08-30 19:32:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547986 ; -- 2017-08-30T19:32:23.814 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-08-30 19:32:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547987 ; -- 2017-08-30T19:33:19.500 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=10,Updated=TO_TIMESTAMP('2017-08-30 19:33:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547973 ; -- 2017-08-30T19:33:22.510 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=20,Updated=TO_TIMESTAMP('2017-08-30 19:33:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547974 ; -- 2017-08-30T19:33:24.460 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=30,Updated=TO_TIMESTAMP('2017-08-30 19:33:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547975 ; -- 2017-08-30T19:33:28.046 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=40,Updated=TO_TIMESTAMP('2017-08-30 19:33:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547976 ; -- 2017-08-30T19:33:30.118 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=50,Updated=TO_TIMESTAMP('2017-08-30 19:33:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547977 ; -- 2017-08-30T19:33:32.132 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=60,Updated=TO_TIMESTAMP('2017-08-30 19:33:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547978 ; -- 2017-08-30T19:33:34.108 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=70,Updated=TO_TIMESTAMP('2017-08-30 19:33:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547979 ; -- 2017-08-30T19:33:36.367 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=80,Updated=TO_TIMESTAMP('2017-08-30 19:33:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547980 ; -- 2017-08-30T19:33:38.352 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=90,Updated=TO_TIMESTAMP('2017-08-30 19:33:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547981 ; -- 2017-08-30T19:33:40.221 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=100,Updated=TO_TIMESTAMP('2017-08-30 19:33:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547982 ; -- 2017-08-30T19:33:43.198 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=110,Updated=TO_TIMESTAMP('2017-08-30 19:33:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547971 ; -- 2017-08-30T19:33:47.595 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y', SeqNo=120,Updated=TO_TIMESTAMP('2017-08-30 19:33:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547970 ; -- 2017-08-30T19:33:48.036 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547973 ; -- 2017-08-30T19:33:48.397 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547974 ; -- 2017-08-30T19:33:48.772 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547975 ; -- 2017-08-30T19:33:49.110 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547976 ; -- 2017-08-30T19:33:49.540 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547977 ; -- 2017-08-30T19:33:49.876 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547978 ; -- 2017-08-30T19:33:50.211 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547979 ; -- 2017-08-30T19:33:50.636 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547980 ; -- 2017-08-30T19:33:51.059 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547981 ; -- 2017-08-30T19:33:51.366 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547982 ; -- 2017-08-30T19:33:52.571 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-08-30 19:33:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547971 ; -- 2017-08-30T19:36:41.490 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-08-30 19:36:41','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Language',Description='Language',Help='' WHERE AD_Field_ID=557446 AND AD_Language='en_US' ; -- 2017-08-30T19:36:55.498 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-08-30 19:36:55','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Role' WHERE AD_Field_ID=557445 AND AD_Language='en_US' ;
the_stack
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 15, 2020 at 10:50 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `dbs_nadha_laundry` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_arus_kas` -- CREATE TABLE `tbl_arus_kas` ( `id` int(5) NOT NULL, `kd_kas` varchar(50) NOT NULL, `kd_tracking` varchar(50) NOT NULL, `asal` varchar(50) NOT NULL, `arus` varchar(50) NOT NULL, `jumlah` int(20) NOT NULL, `waktu` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `operator` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `tbl_bantuan` -- CREATE TABLE `tbl_bantuan` ( `id` int(3) NOT NULL, `judul` varchar(255) NOT NULL, `deks` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `tbl_bantuan` -- INSERT INTO `tbl_bantuan` (`id`, `judul`, `deks`) VALUES (1, 'Cara mendaftarkan cucian', 'Proses mendaftrkan cucian yaitu dengan cara melakukan registrasi melalui menu \"Kartu Laundry\" kemudian tambahkan'), (2, 'Email notifikasi tidak terkirim', 'Pastikan email_host yang digunakan telah diaktifkan untuk menerima pengiriman melalui pihak ketiga'), (3, 'Notifikasi ke whatsapp pelanggan tidak terkirim', 'Pastikan Api_Key yang anda masukkan valid, silahkan kunjungi <a href=\'https://waresponder.co.id/\'>waresponder.co.id</a> untuk mendapatkan Api_Key yang valid. Pastikan juga nomor handphone pelanggan valid'), (4, 'Bagaimana melakukan proses pembayaran laundry?', 'Untuk melakukan proses pembayaran, silahkan masuk ke menu laundry room(apabila cucian belum selesai), klik cucian, kemudian klik tombol \"Bayar\"'), (5, 'Bagaimana alur lengkap operasional laundry dari awal hingga akhir?', 'Pertama, lakukan registrasi cucian melalui menu <b>Kartu Laundry</b>, kemudian masuk ke menu laundry room dan pilih cucian untuk menambahkan item cucian. Setelah menambahkan item cucian, pelanggan dapat memilih apakah pembayaran langsung atau pada saat mengambil cucian yang sudah selesai. Setelah cucian selesai, set status cucian ke \'selesai\' di laundry room, cucian yang sudah di set ke selesai tidak akan ditampilkan di laundry room. Apabila pelanggan sudah mengambil cucian, pembayaran dapat dilakukan melalui menu <b>Kartu Laundry</b>, silahkan lakukan pembayaran, dan update status cucian ke \'sudah di ambil\''); -- -------------------------------------------------------- -- -- Table structure for table `tbl_broadcast_pesan` -- CREATE TABLE `tbl_broadcast_pesan` ( `id` int(5) NOT NULL, `id_pesan` varchar(50) NOT NULL, `judul` varchar(200) NOT NULL, `isi` text NOT NULL, `sistem` varchar(50) NOT NULL, `waktu` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `status` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `tbl_broadcast_pesan` -- INSERT INTO `tbl_broadcast_pesan` (`id`, `id_pesan`, `judul`, `isi`, `sistem`, `waktu`, `status`) VALUES (6, 'qLikTvjJKr', 'Promo mahasiswa', 'Halo {pelanggan}, kita lagi ada promo buat mahasiswa nih, silahkan masukkan kode promo PROMOMHS untuk mendapatkan diskon 5%, ditunggu ya..', 'terjadwal', '2020-06-17 17:00:00', 'pending'), (7, 'azSnPsVyCF', 'Promo mahasiswa', 'Halo {pelanggan}, kita lagi ada promo buat mahasiswa nih, silahkan masukkan kode promo PROMOMHS untuk mendapatkan diskon 5%, ditunggu ya..', 'langsung', '2020-06-15 20:38:33', 'sukses'); -- -------------------------------------------------------- -- -- Table structure for table `tbl_kartu_laundry` -- CREATE TABLE `tbl_kartu_laundry` ( `id` int(10) NOT NULL, `kode_service` varchar(50) NOT NULL, `pelanggan` varchar(111) NOT NULL, `waktu_masuk` timestamp NOT NULL DEFAULT current_timestamp(), `waktu_selesai` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `waktu_diambil` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `pembayaran` varchar(10) NOT NULL, `operator` varchar(55) NOT NULL, `status` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tbl_laundry_room` -- CREATE TABLE `tbl_laundry_room` ( `id` int(8) NOT NULL, `kd_room` varchar(50) NOT NULL, `kd_kartu` varchar(50) NOT NULL, `total_harga` int(11) NOT NULL, `operator` varchar(100) NOT NULL, `status` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `tbl_level_user` -- CREATE TABLE `tbl_level_user` ( `id` int(5) NOT NULL, `kd_level` varchar(12) NOT NULL, `level` varchar(111) NOT NULL, `keterangan` text NOT NULL, `bonus_point_cuci` int(5) NOT NULL, `diskon_cuci` int(3) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_level_user` -- INSERT INTO `tbl_level_user` (`id`, `kd_level`, `level`, `keterangan`, `bonus_point_cuci`, `diskon_cuci`) VALUES (1, 'Basic', 'Basic', 'Level user biasa', 5, 0), (2, 'Gold', 'Gold', 'User level gold', 10, 5), (3, 'Platinum', 'Platinum', 'Level user platinum', 15, 10); -- -------------------------------------------------------- -- -- Table structure for table `tbl_pelanggan` -- CREATE TABLE `tbl_pelanggan` ( `id` int(5) NOT NULL, `username` varchar(111) NOT NULL, `nama_lengkap` varchar(200) NOT NULL, `alamat` text NOT NULL, `hp` varchar(20) NOT NULL, `email` varchar(55) NOT NULL, `level` varchar(20) NOT NULL, `poin_commit` int(50) NOT NULL, `poin_real` int(10) NOT NULL, `aktif` varchar(1) NOT NULL, `waktu_join` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_pelanggan` -- INSERT INTO `tbl_pelanggan` (`id`, `username`, `nama_lengkap`, `alamat`, `hp`, `email`, `level`, `poin_commit`, `poin_real`, `aktif`, `waktu_join`) VALUES (6, 'adityadarmanst', 'Aditia Darma Nst', 'Perbaungan', '082272177022', 'alditha.forum@gmail.com', 'Basic', 0, 0, '1', '2020-06-15 20:32:04'); -- -------------------------------------------------------- -- -- Table structure for table `tbl_pembayaran` -- CREATE TABLE `tbl_pembayaran` ( `id` int(10) NOT NULL, `kd_pembayaran` varchar(50) NOT NULL, `kd_kartu` varchar(50) NOT NULL, `waktu` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `total_cuci` int(20) NOT NULL, `diskon` int(20) NOT NULL, `kode_promo` varchar(50) NOT NULL, `total_final` int(20) NOT NULL, `tunai` int(50) NOT NULL, `operator` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `tbl_pengeluaran` -- CREATE TABLE `tbl_pengeluaran` ( `id` int(5) NOT NULL, `kd_pengeluaran` varchar(20) NOT NULL, `pengeluaran` varchar(200) NOT NULL, `keterangan` text NOT NULL, `waktu` datetime NOT NULL, `jumlah` int(20) NOT NULL, `operator` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tbl_promo_code` -- CREATE TABLE `tbl_promo_code` ( `id` int(10) NOT NULL, `kd_promo` varchar(50) NOT NULL, `deks` varchar(255) NOT NULL, `disc` int(10) NOT NULL, `tgl_mulai` date NOT NULL, `tgl_habis` date NOT NULL, `kuota` int(8) NOT NULL, `aktif` varchar(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `tbl_promo_code` -- INSERT INTO `tbl_promo_code` (`id`, `kd_promo`, `deks`, `disc`, `tgl_mulai`, `tgl_habis`, `kuota`, `aktif`) VALUES (1, 'PROMO30', 'Promo pembukaan laundry', 5, '2020-04-03', '2020-04-08', 100, 'y'), (2, 'PROMOLEBARAN', 'Promo hari raya idul fitri', 15, '2020-04-01', '2020-04-03', 100, 'y'), (3, 'PROMOMHS', 'Promo mahasiswa', 10, '2020-04-03', '2020-04-13', 100, 'y'), (6, 'TAHUNBARU10', 'Promo tahun baru', 10, '2020-05-22', '2020-05-22', 100, 'y'), (7, 'TAHUNBARU5', 'Promo tahun baru ', 5, '2020-05-22', '2020-05-22', 100, 'n'), (8, 'PROMOADH', 'Promo suka suka kita', 20, '2020-05-22', '2020-05-22', 100, 'n'); -- -------------------------------------------------------- -- -- Table structure for table `tbl_remote_service` -- CREATE TABLE `tbl_remote_service` ( `id` int(3) NOT NULL, `token` varchar(50) NOT NULL, `action` varchar(50) NOT NULL, `time` datetime NOT NULL, `status` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `tbl_service` -- CREATE TABLE `tbl_service` ( `id` int(5) NOT NULL, `kd_service` varchar(100) NOT NULL, `nama` varchar(200) NOT NULL, `deks` text NOT NULL, `satuan` varchar(112) NOT NULL, `harga` int(20) NOT NULL, `aktif` varchar(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_service` -- INSERT INTO `tbl_service` (`id`, `kd_service`, `nama`, `deks`, `satuan`, `harga`, `aktif`) VALUES (7, 'TXP28695AC', 'Cuci Biasa', 'Service cuci biasa tanpa setrika', 'Kg', 4000, 'y'), (8, 'ZVL17359WK', 'Cuci Bersih & Rapi ', 'Cuci biasa + setrika', 'Kg', 5000, 'y'), (9, 'LCD87416QB', 'Cuci Kebaya', 'Service cuci kebaya', 'Pcs', 30000, 'y'), (10, 'ISG53972GH', 'Cuci Ambal', 'Service cuci ambal', 'Pcs', 25000, 'y'), (11, 'NTH65307BJ', 'Cuci Karpet', 'Service cuci karpet', 'Pcs', 30000, 'y'), (12, 'OUA28594JH', 'Cuci Jas', 'Cuci jas standar', 'Pcs', 50000, 'y'), (13, 'jeU40701jp', 'Cuci Sepatu', 'Cuci sepatu', 'Pcs', 35000, 'y'); -- -------------------------------------------------------- -- -- Table structure for table `tbl_setting_laundry` -- CREATE TABLE `tbl_setting_laundry` ( `id` int(5) NOT NULL, `kd_setting` varchar(100) NOT NULL, `caption` varchar(200) NOT NULL, `value` varchar(200) NOT NULL, `active` varchar(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_setting_laundry` -- INSERT INTO `tbl_setting_laundry` (`id`, `kd_setting`, `caption`, `value`, `active`) VALUES (1, 'main_color', 'Warna utama', '#0ab59e', '1'), (2, 'laundry_name', 'Nama Laundry', 'Nadha Laundry', '1'), (3, 'address', 'Alamat', 'Jln. Pantai Cermin, No. 59, Indomaret', '1'), (4, 'email', 'Email', '-', '1'), (5, 'hp', 'Nomor Handhone', '-', '1'), (6, 'kota', 'Kota', 'Perbaungan', '1'), (7, 'provinsi', 'Provinsi', 'Sumatera Utara', '1'), (8, 'kabupaten', 'Kabupaten', 'Serdang Bedagai', '1'), (9, 'kode_pos', 'Kode Pos', '20986', '1'), (10, 'auto_redeem', 'Otomatis redeem point ', '1000', '1'), (11, 'saldo_awal', 'Saldo awal laundry', '3000000', '1'), (12, 'tahun_release', 'Tahun pembukuan awal laundry', '2020', '1'), (13, 'server_backup', 'Alamat API server untuk backup data data laundry', 'http://service.haxors.or.id/backup', '1'), (14, 'api_key', 'API key yang digunakan sebagai penanda client ke server NadhaMedia. Digunakan untuk backup/restore data ke aplikasi client', '-', '1'), (15, 'email_host', 'Email untuk pengiriman notifikasi ke pelanggan', '-', '1'), (16, 'email_host_password', 'Password email untuk notifikasi ke pelanggan', '-', '1'), (17, 'api_key_wa', 'API Key Whatsapp, dapatkan di waresponder.co.id', '', '1'); -- -------------------------------------------------------- -- -- Table structure for table `tbl_temp_item_cucian` -- CREATE TABLE `tbl_temp_item_cucian` ( `id` int(10) NOT NULL, `kd_temp` varchar(50) NOT NULL, `kd_room` varchar(30) NOT NULL, `kd_item` varchar(30) NOT NULL, `harga_at` int(20) NOT NULL, `qt` double NOT NULL, `total` int(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `tbl_timeline` -- CREATE TABLE `tbl_timeline` ( `id` int(10) NOT NULL, `kd_timeline` varchar(50) DEFAULT NULL, `kd_service` varchar(20) DEFAULT NULL, `waktu` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `admin` varchar(50) DEFAULT NULL, `kd_event` varchar(50) DEFAULT NULL, `caption` text DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `tbl_transaksi_point` -- CREATE TABLE `tbl_transaksi_point` ( `id` int(5) NOT NULL, `token` varchar(11) NOT NULL, `username` varchar(111) NOT NULL, `waktu_pick` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `point` int(5) NOT NULL, `operator` varchar(51) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tbl_user` -- CREATE TABLE `tbl_user` ( `id` int(5) NOT NULL, `username` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, `last_login` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `tipe_user` varchar(20) NOT NULL, `active` varchar(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_user` -- INSERT INTO `tbl_user` (`id`, `username`, `password`, `last_login`, `tipe_user`, `active`) VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', '2020-06-15 19:53:58', 'admin', '1'), (4, 'aditia', '21232f297a57a5a743894a0e4a801fc3', '2020-04-25 20:20:52', 'admin', '1'), (5, 'arafahmuldianty', '21232f297a57a5a743894a0e4a801fc3', '2020-04-26 00:41:33', 'operator', '1'); -- -- Indexes for dumped tables -- -- -- Indexes for table `tbl_arus_kas` -- ALTER TABLE `tbl_arus_kas` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_bantuan` -- ALTER TABLE `tbl_bantuan` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_broadcast_pesan` -- ALTER TABLE `tbl_broadcast_pesan` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_kartu_laundry` -- ALTER TABLE `tbl_kartu_laundry` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_laundry_room` -- ALTER TABLE `tbl_laundry_room` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_level_user` -- ALTER TABLE `tbl_level_user` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_pelanggan` -- ALTER TABLE `tbl_pelanggan` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_pembayaran` -- ALTER TABLE `tbl_pembayaran` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_pengeluaran` -- ALTER TABLE `tbl_pengeluaran` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_promo_code` -- ALTER TABLE `tbl_promo_code` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_remote_service` -- ALTER TABLE `tbl_remote_service` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_service` -- ALTER TABLE `tbl_service` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_setting_laundry` -- ALTER TABLE `tbl_setting_laundry` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_temp_item_cucian` -- ALTER TABLE `tbl_temp_item_cucian` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_timeline` -- ALTER TABLE `tbl_timeline` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_transaksi_point` -- ALTER TABLE `tbl_transaksi_point` ADD PRIMARY KEY (`id`); -- -- Indexes for table `tbl_user` -- ALTER TABLE `tbl_user` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `tbl_arus_kas` -- ALTER TABLE `tbl_arus_kas` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `tbl_bantuan` -- ALTER TABLE `tbl_bantuan` MODIFY `id` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `tbl_broadcast_pesan` -- ALTER TABLE `tbl_broadcast_pesan` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `tbl_kartu_laundry` -- ALTER TABLE `tbl_kartu_laundry` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `tbl_laundry_room` -- ALTER TABLE `tbl_laundry_room` MODIFY `id` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `tbl_level_user` -- ALTER TABLE `tbl_level_user` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `tbl_pelanggan` -- ALTER TABLE `tbl_pelanggan` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `tbl_pembayaran` -- ALTER TABLE `tbl_pembayaran` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `tbl_pengeluaran` -- ALTER TABLE `tbl_pengeluaran` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `tbl_promo_code` -- ALTER TABLE `tbl_promo_code` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `tbl_remote_service` -- ALTER TABLE `tbl_remote_service` MODIFY `id` int(3) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `tbl_service` -- ALTER TABLE `tbl_service` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `tbl_setting_laundry` -- ALTER TABLE `tbl_setting_laundry` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; -- -- AUTO_INCREMENT for table `tbl_temp_item_cucian` -- ALTER TABLE `tbl_temp_item_cucian` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `tbl_timeline` -- ALTER TABLE `tbl_timeline` MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27; -- -- AUTO_INCREMENT for table `tbl_transaksi_point` -- ALTER TABLE `tbl_transaksi_point` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `tbl_user` -- ALTER TABLE `tbl_user` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
the_stack
-- 2018-02-22T12:03:34.538 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsEnableRemoteCacheInvalidation,IsOneInstanceOnly,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,540417,TO_TIMESTAMP('2018-02-22 12:03:34','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.inout','Y','N','N','N','N','Y','Shipment Statistics','N',TO_TIMESTAMP('2018-02-22 12:03:34','YYYY-MM-DD HH24:MI:SS'),100,'T',0,0) ; -- 2018-02-22T12:03:34.548 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=540417 AND NOT EXISTS (SELECT 1 FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) ; -- 2018-02-22T12:03:59.458 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsCheckParentsChanged,IsGenericZoomTarget,IsGridModeOnly,IsInfoTab,IsInsertRecord,IsQueryOnLoad,IsReadOnly,IsRefreshAllOnActivate,IsSearchActive,IsSearchCollapsed,IsSingleRow,IsSortTab,IsTranslationTab,MaxQueryRecords,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,541047,540949,540417,TO_TIMESTAMP('2018-02-22 12:03:59','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.inout','N','N','Y','N','Y','N','N','N','Y','Y','N','N','Y','Y','N','N','N',0,'Shipment Statistics','N',10,0,TO_TIMESTAMP('2018-02-22 12:03:59','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T12:03:59.468 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=541047 AND NOT EXISTS (SELECT 1 FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID) ; -- 2018-02-22T12:44:28.702 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,541044,0,540417,TO_TIMESTAMP('2018-02-22 12:44:28','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.inout','M_Shipment_Statistics_View','Y','N','N','N','N','Shipment Statistics',TO_TIMESTAMP('2018-02-22 12:44:28','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T12:44:28.715 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=541044 AND NOT EXISTS (SELECT 1 FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) ; -- 2018-02-22T12:44:28.724 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', now(), 100, now(), 100,t.AD_Tree_ID, 541044, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.AD_Table_ID=116 AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=541044) ; -- 2018-02-22T12:44:29.338 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=219 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.340 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=364 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.340 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=116 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.341 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=387 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.342 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=402 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.342 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=401 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.343 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=404 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.343 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=405 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.344 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=410 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.345 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=258 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.345 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=260 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.346 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=398 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.346 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=403 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:29.347 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=160, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=541044 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:32.869 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2018-02-22 12:44:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=541044 ; -- 2018-02-22T12:44:45.236 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000087 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.237 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=540970 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.238 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=540728 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.238 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=540783 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.239 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=540841 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.240 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=540868 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.241 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=540971 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.241 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=540949 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.242 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=540950 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.242 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=540976 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.243 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=541044 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.244 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000060 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.245 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000068 AND AD_Tree_ID=10 ; -- 2018-02-22T12:44:45.245 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000019, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000079 AND AD_Tree_ID=10 ; -- 2018-02-22T17:30:13.646 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559437,562993,0,541047,TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100,'Document sequence number of the document',30,'de.metas.inout','The document number is usually automatically generated by the system and determined by the document type of the document. If the document is not saved, the preliminary number is displayed in "<>". If the document type of your document has no automatic document sequence defined, the field is empty if you create a new document. This is for documents which usually have an external number (like vendor invoice). If you leave the field empty, the system will generate a document number for you. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','N','N','N','N','N','Nr.',TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:13.651 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=562993 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:13.731 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559438,562994,0,541047,TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100,'Datum, an dem eine Produkt in oder aus dem Bestand bewegt wurde',29,'de.metas.inout','"Bewegungs-Datum" bezeichnet das Datum, zu dem das Produkt in oder aus dem Bestand bewegt wurde Dies ist das Ergebnis einer Auslieferung, eines Wareneingangs oder einer Warenbewqegung.','Y','Y','N','N','N','N','N','Bewegungsdatum',TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:13.734 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=562994 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:13.817 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559439,562995,0,541047,TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100,'Sponsor-Nr.',40,'de.metas.inout','Suchschlüssel für den Geschäftspartner','Y','Y','N','N','N','N','N','Nr.',TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:13.820 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=562995 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:13.910 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559440,562996,0,541047,TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100,'Name des Sponsors.',60,'de.metas.inout','Y','Y','N','N','N','N','N','Name',TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:13.913 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=562996 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:13.996 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559441,562997,0,541047,TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100,'Postleitzahl',10,'de.metas.inout','"PLZ" bezeichnet die Postleitzahl für diese Adresse oder dieses Postfach.','Y','Y','N','N','N','N','N','PLZ',TO_TIMESTAMP('2018-02-22 17:30:13','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:13.998 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=562997 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.082 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559442,562998,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,'Schlüssel des Produktes',40,'de.metas.inout','Y','Y','N','N','N','N','N','Produktschlüssel',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.084 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=562998 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.165 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559443,562999,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,'Name des Produktes',255,'de.metas.inout','Y','Y','N','N','N','N','N','Produktname',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.167 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=562999 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.255 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559444,563000,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,10,'de.metas.inout','Y','Y','N','N','N','N','N','Unterlieferanten',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.257 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563000 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.342 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559445,563001,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,'UOM of the package',10,'de.metas.inout','','Y','Y','N','N','N','N','N','Package UOM',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.345 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563001 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.421 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559446,563002,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,'Maßeinheit',10,'de.metas.inout','Eine eindeutige (nicht monetäre) Maßeinheit','Y','Y','N','N','N','N','N','Maßeinheit',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.422 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563002 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.498 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559447,563003,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,'Menge',131089,'de.metas.inout','Menge bezeichnet die Anzahl eines bestimmten Produktes oder Artikels für dieses Dokument.','Y','Y','N','N','N','N','N','Menge',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.499 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563003 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.583 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559448,563004,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,'Hersteller des Produktes',200,'de.metas.inout','Der Hersteller des Produktes (genutzt, wenn abweichend von Geschäftspartner / Lieferant).','Y','Y','N','N','N','N','N','Hersteller',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.586 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563004 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.667 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559450,563005,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,10,'de.metas.inout','Y','N','N','N','N','N','N','N','m_shipment_statistic_v_id',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.670 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563005 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.748 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559452,563006,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,'Mandant für diese Installation.',10,'de.metas.inout','Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .','Y','Y','N','N','N','N','N','Mandant',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.750 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563006 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.833 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559453,563007,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,'Organisatorische Einheit des Mandanten',10,'de.metas.inout','Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.','Y','Y','N','N','N','N','N','Sektion',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.836 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563007 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:30:14.927 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,559454,563008,0,541047,TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100,10,'de.metas.inout','Y','Y','N','N','N','N','N','Dosage Form',TO_TIMESTAMP('2018-02-22 17:30:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:30:14.930 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563008 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:32:19.154 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='No.',Updated=TO_TIMESTAMP('2018-02-22 17:32:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562993 ; -- 2018-02-22T17:32:27.387 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Date',Updated=TO_TIMESTAMP('2018-02-22 17:32:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562994 ; -- 2018-02-22T17:32:57.404 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='PZN',Updated=TO_TIMESTAMP('2018-02-22 17:32:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562998 ; -- 2018-02-22T17:33:01.849 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Postal',Updated=TO_TIMESTAMP('2018-02-22 17:33:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562997 ; -- 2018-02-22T17:33:22.105 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Partner Value',Updated=TO_TIMESTAMP('2018-02-22 17:33:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562995 ; -- 2018-02-22T17:33:28.170 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Partner Name',Updated=TO_TIMESTAMP('2018-02-22 17:33:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562996 ; -- 2018-02-22T17:33:51.467 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=10, SortNo=10.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:33:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562993 ; -- 2018-02-22T17:33:57.298 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=20, SortNo=20.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:33:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562994 ; -- 2018-02-22T17:34:10.058 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=30, SortNo=30.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:34:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562995 ; -- 2018-02-22T17:34:16.572 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=40, SortNo=40.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:34:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562996 ; -- 2018-02-22T17:34:24.634 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=50, SortNo=50.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:34:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562997 ; -- 2018-02-22T17:34:30.531 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=60, SortNo=60.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:34:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562998 ; -- 2018-02-22T17:34:34.890 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=70, SortNo=70.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:34:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562999 ; -- 2018-02-22T17:34:56.802 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=80, SortNo=80.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:34:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563000 ; -- 2018-02-22T17:35:25.898 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=100, SortNo=100.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:35:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563001 ; -- 2018-02-22T17:35:33.291 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=110, SortNo=110.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:35:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563002 ; -- 2018-02-22T17:35:51.426 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=120, SortNo=120.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:35:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563003 ; -- 2018-02-22T17:35:59.130 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=130, SortNo=130.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:35:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563008 ; -- 2018-02-22T17:36:01.508 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=140.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:36:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563004 ; -- 2018-02-22T17:36:04.108 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=140,Updated=TO_TIMESTAMP('2018-02-22 17:36:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563004 ; -- 2018-02-22T17:36:34.805 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=1.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:36:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563006 ; -- 2018-02-22T17:36:46.927 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y', SortNo=2.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:36:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563007 ; -- 2018-02-22T17:40:22.855 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IncludedTabHeight,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,559455,563009,0,541047,0,TO_TIMESTAMP('2018-02-22 17:40:22','YYYY-MM-DD HH24:MI:SS'),100,'Size of a package',0,'de.metas.inout','The size indicated how many items ar ein a package',0,'Y','Y','Y','N','N','N','N','N','Package Size',10,150,0,1,1,TO_TIMESTAMP('2018-02-22 17:40:22','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:40:22.858 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=563009 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-02-22T17:40:55.179 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=90, SeqNoGrid=90,Updated=TO_TIMESTAMP('2018-02-22 17:40:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563009 ; -- 2018-02-22T17:40:58.620 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=10,Updated=TO_TIMESTAMP('2018-02-22 17:40:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562993 ; -- 2018-02-22T17:41:00.655 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=20,Updated=TO_TIMESTAMP('2018-02-22 17:41:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562994 ; -- 2018-02-22T17:41:02.820 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=30,Updated=TO_TIMESTAMP('2018-02-22 17:41:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562995 ; -- 2018-02-22T17:41:05.195 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=40,Updated=TO_TIMESTAMP('2018-02-22 17:41:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562996 ; -- 2018-02-22T17:41:07.725 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2018-02-22 17:41:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562997 ; -- 2018-02-22T17:41:10.334 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=60,Updated=TO_TIMESTAMP('2018-02-22 17:41:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562998 ; -- 2018-02-22T17:41:12.755 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2018-02-22 17:41:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562999 ; -- 2018-02-22T17:41:15.251 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2018-02-22 17:41:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563000 ; -- 2018-02-22T17:41:18.004 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=100,Updated=TO_TIMESTAMP('2018-02-22 17:41:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563001 ; -- 2018-02-22T17:41:20.596 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=110,Updated=TO_TIMESTAMP('2018-02-22 17:41:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563002 ; -- 2018-02-22T17:41:23.140 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=120,Updated=TO_TIMESTAMP('2018-02-22 17:41:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563003 ; -- 2018-02-22T17:41:26.019 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=140,Updated=TO_TIMESTAMP('2018-02-22 17:41:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563004 ; -- 2018-02-22T17:41:28.514 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=1,Updated=TO_TIMESTAMP('2018-02-22 17:41:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563006 ; -- 2018-02-22T17:41:33.564 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=2,Updated=TO_TIMESTAMP('2018-02-22 17:41:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563007 ; -- 2018-02-22T17:41:36.756 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=10,Updated=TO_TIMESTAMP('2018-02-22 17:41:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563006 ; -- 2018-02-22T17:41:39.796 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=20,Updated=TO_TIMESTAMP('2018-02-22 17:41:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563007 ; -- 2018-02-22T17:41:44.668 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=130,Updated=TO_TIMESTAMP('2018-02-22 17:41:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563008 ; -- 2018-02-22T17:42:04.093 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=30,Updated=TO_TIMESTAMP('2018-02-22 17:42:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562993 ; -- 2018-02-22T17:42:07.885 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=40,Updated=TO_TIMESTAMP('2018-02-22 17:42:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562994 ; -- 2018-02-22T17:42:12.931 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2018-02-22 17:42:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562995 ; -- 2018-02-22T17:42:15.612 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=60,Updated=TO_TIMESTAMP('2018-02-22 17:42:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562996 ; -- 2018-02-22T17:42:18.006 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2018-02-22 17:42:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562997 ; -- 2018-02-22T17:42:20.285 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2018-02-22 17:42:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562998 ; -- 2018-02-22T17:42:22.676 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=90,Updated=TO_TIMESTAMP('2018-02-22 17:42:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562999 ; -- 2018-02-22T17:42:25.028 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=100,Updated=TO_TIMESTAMP('2018-02-22 17:42:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563000 ; -- 2018-02-22T17:42:27.468 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=110,Updated=TO_TIMESTAMP('2018-02-22 17:42:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563009 ; -- 2018-02-22T17:42:30.437 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=120,Updated=TO_TIMESTAMP('2018-02-22 17:42:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563001 ; -- 2018-02-22T17:42:33.084 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=130,Updated=TO_TIMESTAMP('2018-02-22 17:42:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563002 ; -- 2018-02-22T17:42:35.430 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=140,Updated=TO_TIMESTAMP('2018-02-22 17:42:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563003 ; -- 2018-02-22T17:42:37.677 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=150,Updated=TO_TIMESTAMP('2018-02-22 17:42:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563008 ; -- 2018-02-22T17:42:43.812 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNo=160, SeqNoGrid=160,Updated=TO_TIMESTAMP('2018-02-22 17:42:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563004 ; -- 2018-02-22T17:42:59.148 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SeqNoGrid=140, SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:42:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563004 ; -- 2018-02-22T17:43:00.316 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563008 ; -- 2018-02-22T17:43:01.348 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563003 ; -- 2018-02-22T17:43:02.108 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563002 ; -- 2018-02-22T17:43:03.236 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563001 ; -- 2018-02-22T17:43:04.083 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563000 ; -- 2018-02-22T17:43:04.724 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562999 ; -- 2018-02-22T17:43:06.163 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562998 ; -- 2018-02-22T17:43:07.060 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562997 ; -- 2018-02-22T17:43:08.004 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562996 ; -- 2018-02-22T17:43:08.763 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562995 ; -- 2018-02-22T17:43:09.413 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563007 ; -- 2018-02-22T17:43:10.275 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562994 ; -- 2018-02-22T17:43:11.187 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2018-02-22 17:43:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=563006 ; -- 2018-02-22T17:43:19.592 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=1.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:43:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562993 ; -- 2018-02-22T17:43:31.754 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=20.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:43:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562998 ; -- 2018-02-22T17:43:34.987 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=2.000000000000,Updated=TO_TIMESTAMP('2018-02-22 17:43:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=562998 ; -- 2018-02-22T17:57:07.265 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,541047,540672,TO_TIMESTAMP('2018-02-22 17:57:06','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2018-02-22 17:57:06','YYYY-MM-DD HH24:MI:SS'),100,'main') ; -- 2018-02-22T17:57:07.273 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_UI_Section_ID=540672 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2018-02-22T17:57:07.353 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540897,540672,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:07.442 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540898,540672,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Y',20,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:07.532 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540897,541491,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','default',10,'primary',TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:07.621 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563006,0,541047,551131,541491,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Mandant für diese Installation.','Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .','Y','N','Y','N','Y','Mandant',10,0,10,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:07.705 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563007,0,541047,551132,541491,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Organisatorische Einheit des Mandanten','Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.','Y','N','Y','N','Y','Sektion',20,0,20,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:07.792 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,562993,0,541047,551133,541491,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Document sequence number of the document','The document number is usually automatically generated by the system and determined by the document type of the document. If the document is not saved, the preliminary number is displayed in "<>". If the document type of your document has no automatic document sequence defined, the field is empty if you create a new document. This is for documents which usually have an external number (like vendor invoice). If you leave the field empty, the system will generate a document number for you. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table (e.g. C_Order).','Y','N','Y','N','Y','No.',30,0,30,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:07.880 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,562994,0,541047,551134,541491,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Datum, an dem eine Produkt in oder aus dem Bestand bewegt wurde','"Bewegungs-Datum" bezeichnet das Datum, zu dem das Produkt in oder aus dem Bestand bewegt wurde Dies ist das Ergebnis einer Auslieferung, eines Wareneingangs oder einer Warenbewqegung.','Y','N','Y','N','Y','Date',40,0,40,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:07.965 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,562995,0,541047,551135,541491,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Sponsor-Nr.','Suchschlüssel für den Geschäftspartner','Y','N','Y','N','Y','Partner Value',50,0,50,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.048 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,562996,0,541047,551136,541491,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100,'Name des Sponsors.','Y','N','Y','N','Y','Partner Name',60,0,60,TO_TIMESTAMP('2018-02-22 17:57:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.134 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,562997,0,541047,551137,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Postleitzahl','"PLZ" bezeichnet die Postleitzahl für diese Adresse oder dieses Postfach.','Y','N','Y','N','Y','Postal',70,0,70,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.216 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,562998,0,541047,551138,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Schlüssel des Produktes','Y','N','Y','N','Y','PZN',80,0,80,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.298 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,562999,0,541047,551139,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Name des Produktes','Y','N','Y','N','Y','Produktname',90,0,90,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.384 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563000,0,541047,551140,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','Y','Unterlieferanten',100,0,100,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.468 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563009,0,541047,551141,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Size of a package','The size indicated how many items ar ein a package','Y','N','Y','N','Y','Package Size',110,0,110,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.554 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563001,0,541047,551142,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'UOM of the package','','Y','N','Y','N','Y','Package UOM',120,0,120,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.648 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563002,0,541047,551143,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Maßeinheit','Eine eindeutige (nicht monetäre) Maßeinheit','Y','N','Y','N','Y','Maßeinheit',130,0,130,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.729 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563003,0,541047,551144,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Menge','Menge bezeichnet die Anzahl eines bestimmten Produktes oder Artikels für dieses Dokument.','Y','N','Y','N','Y','Menge',140,0,140,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.813 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563008,0,541047,551145,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','Y','Dosage Form',150,0,150,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:57:08.900 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,563004,0,541047,551146,541491,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Hersteller des Produktes','Der Hersteller des Produktes (genutzt, wenn abweichend von Geschäftspartner / Lieferant).','Y','N','Y','N','Y','Hersteller',160,0,160,TO_TIMESTAMP('2018-02-22 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:58:45.972 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,540897,541492,TO_TIMESTAMP('2018-02-22 17:58:45','YYYY-MM-DD HH24:MI:SS'),100,'Y','product',20,'',TO_TIMESTAMP('2018-02-22 17:58:45','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T17:59:26.379 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541492, SeqNo=10,Updated=TO_TIMESTAMP('2018-02-22 17:59:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551138 ; -- 2018-02-22T17:59:35.482 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541492, SeqNo=20,Updated=TO_TIMESTAMP('2018-02-22 17:59:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551139 ; -- 2018-02-22T17:59:46.125 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541492, SeqNo=30,Updated=TO_TIMESTAMP('2018-02-22 17:59:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551144 ; -- 2018-02-22T17:59:56.232 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541492, SeqNo=40,Updated=TO_TIMESTAMP('2018-02-22 17:59:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551143 ; -- 2018-02-22T18:00:04.367 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541492, SeqNo=50,Updated=TO_TIMESTAMP('2018-02-22 18:00:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551141 ; -- 2018-02-22T18:00:11.023 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541492, SeqNo=60,Updated=TO_TIMESTAMP('2018-02-22 18:00:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551142 ; -- 2018-02-22T18:00:44.515 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540898,541493,TO_TIMESTAMP('2018-02-22 18:00:44','YYYY-MM-DD HH24:MI:SS'),100,'Y','document',10,TO_TIMESTAMP('2018-02-22 18:00:44','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T18:01:11.673 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540898,541494,TO_TIMESTAMP('2018-02-22 18:01:11','YYYY-MM-DD HH24:MI:SS'),100,'Y','details',20,TO_TIMESTAMP('2018-02-22 18:01:11','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T18:01:16.206 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540898,541495,TO_TIMESTAMP('2018-02-22 18:01:16','YYYY-MM-DD HH24:MI:SS'),100,'Y','org',30,TO_TIMESTAMP('2018-02-22 18:01:16','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-02-22T18:01:48.363 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541493, SeqNo=10,Updated=TO_TIMESTAMP('2018-02-22 18:01:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551134 ; -- 2018-02-22T18:02:08.056 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541493, SeqNo=20,Updated=TO_TIMESTAMP('2018-02-22 18:02:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551133 ; -- 2018-02-22T18:02:25.003 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541494, SeqNo=10,Updated=TO_TIMESTAMP('2018-02-22 18:02:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551140 ; -- 2018-02-22T18:02:38.042 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541494, SeqNo=20,Updated=TO_TIMESTAMP('2018-02-22 18:02:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551146 ; -- 2018-02-22T18:02:54.377 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541494, SeqNo=30,Updated=TO_TIMESTAMP('2018-02-22 18:02:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551145 ; -- 2018-02-22T18:03:06.257 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541495, SeqNo=10,Updated=TO_TIMESTAMP('2018-02-22 18:03:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551132 ; -- 2018-02-22T18:03:14.409 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541495, SeqNo=20,Updated=TO_TIMESTAMP('2018-02-22 18:03:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551131 ; -- 2018-02-22T18:03:41.873 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551131 ; -- 2018-02-22T18:03:41.879 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551133 ; -- 2018-02-22T18:03:41.885 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551134 ; -- 2018-02-22T18:03:41.890 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551135 ; -- 2018-02-22T18:03:41.894 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551136 ; -- 2018-02-22T18:03:41.898 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551137 ; -- 2018-02-22T18:03:41.903 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551138 ; -- 2018-02-22T18:03:41.907 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551139 ; -- 2018-02-22T18:03:41.912 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551140 ; -- 2018-02-22T18:03:41.916 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551141 ; -- 2018-02-22T18:03:41.918 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=100,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551142 ; -- 2018-02-22T18:03:41.920 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551143 ; -- 2018-02-22T18:03:41.922 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=120,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551144 ; -- 2018-02-22T18:03:41.924 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=130,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551145 ; -- 2018-02-22T18:03:41.925 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=140,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551146 ; -- 2018-02-22T18:03:41.927 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=150,Updated=TO_TIMESTAMP('2018-02-22 18:03:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551132 ; -- 2018-02-22T18:04:30.615 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=10,Updated=TO_TIMESTAMP('2018-02-22 18:04:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551135 ; -- 2018-02-22T18:04:30.620 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=20,Updated=TO_TIMESTAMP('2018-02-22 18:04:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551136 ; -- 2018-02-22T18:04:30.624 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=30,Updated=TO_TIMESTAMP('2018-02-22 18:04:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551134 ; -- 2018-02-22T18:04:30.629 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=40,Updated=TO_TIMESTAMP('2018-02-22 18:04:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=551132 ;
the_stack
--DCS DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1131419';--Acetarsol DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1000382';--Bilastine DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP2721034';--Calcium DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1131501';--Camphene DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1131504';--Carbetocin DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1131611';--manna DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1131633';--Oxetacaine DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP2721400';--Potassium DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP997623';--Rupatadine Fumarate DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP2721452';--Sodium DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1131687';--Stiripentol -- BN work UPDATE drug_concept_stage SET concept_name = initcap(regexp_replace(lower(concept_name), '( ltd)|( inc\.)| uk |( eu)( llc)|( limited)| ulc| (ltee)|( msd)|( ulc)|( plc)|( pharmaceuticals)|( gmbh)|( lab.*)|( - .*)| \(royaume-uni\)| france| \(pay-bas\)| canada| uk| \(u\.k\.\)| \(allemagne\)| \(grande-bretagne\)| \(grande bretagne\) \(autriche\)| \(belgique\)| \(irlande\)| \(danemark\)| \(societe\)| \(portugal\)| \(luxmebourg\)| \(republique tcheque\)', '', 'g')) WHERE concept_class_id = 'Supplier' AND concept_code NOT IN ( SELECT concept_code_1 FROM suppliers_to_repl ) AND concept_name NOT LIKE '%GmbH & Co%'; UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, '\(.*', '', 'g') WHERE concept_class_id = 'Supplier' AND concept_code NOT IN ( SELECT concept_code_1 FROM suppliers_to_repl ); UPDATE drug_concept_stage SET concept_name = initcap(replace(lower(concept_name), ' comp', '')) WHERE concept_class_id = 'Brand Name' AND concept_name ~ '-Q|Beloc|Enala|Prelis|Dormiphen|Eryfer|Provas|Isozid| Al | Ass |Quadronal|Dormiphen|Latanomed|Estramon|Valsacor|Dispadex'; UPDATE drug_concept_stage SET concept_name = replace(concept_name, ' INJECTABLE', '') WHERE concept_class_id = 'Brand Name' AND concept_name ~ 'ASPEGIC|AZANTAC|SPASMAG|TRIVASTAL|UNACIM'; DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( SELECT concept_code FROM drug_concept_stage WHERE concept_class_id = 'Brand Name' AND concept_name ~* '( comp$)|comprim|compound|(um .*um )|praeparatum| rh | injectable|zinci|phosphorus|(\d+(\.\d+)? m )|unguentum|molar|zincum|codeinum|apis| oel | oel$|((thym|baum|castor|halibut|lavandula|seed).*( tee | oleum| oil))|graveolens' AND NOT concept_name ~* 'PHARM|ABTEI|HEEL|INJEE|WINTHROP| ASS | AL |ROCHE|HEUMANN|MERCK|BLUESFISH|WESTERN|PHARMA|ZENTIVA|PFIZER|PHARMA|MEDE|MEDAC|FAIR|HAMELN|ACCORD|RATIO|AXCOUNT|STADA|SANDOZ|SOLVAY|GLENMARK|APOTHEKE|HEXAL|TEVA|AUROBINDO|ORION|SYXYL|NEURAX|KOHNE|ACTAVIS|CLARIS|NOVUM|ABZ|AXCOUNT|MYLAN|ARISTO|KABI|BENE|HORMOSAN|ZENTIVA|PUREN|BIOMO|ACIS|RATIOPH|SYNOMED|ALPHA|ROTEXMEDICA|BERCO|DURA|DAGO|GASTREU|FORTE|VITAL|VERLA|ONKOVIS|ONCOTRADE|NEOCORP' AND NOT concept_name ~* 'asa-|lambert|balneovit|similiaplex|heidac' ); DELETE FROM drug_concept_stage WHERE concept_class_id = 'Brand Name' AND concept_name ~* '( comp$)|comprim|compound|(um .*um )|praeparatum| rh | injectable|zinci|phosphorus|(\d+(\.\d+)? m )|unguentum|molar|zincum|codeinum|apis| oel | oel$|((thym|baum|castor|halibut|lavandula|seed).*( tee | oleum| oil))|graveolens' AND NOT concept_name ~* 'PHARM|ABTEI|HEEL|INJEE|WINTHROP| ASS | AL |ROCHE|HEUMANN|MERCK|BLUESFISH|WESTERN|PHARMA|ZENTIVA|PFIZER|PHARMA|MEDE|MEDAC|FAIR|HAMELN|ACCORD|RATIO|AXCOUNT|STADA|SANDOZ|SOLVAY|GLENMARK|APOTHEKE|HEXAL|TEVA|AUROBINDO|ORION|SYXYL|NEURAX|KOHNE|ACTAVIS|CLARIS|NOVUM|ABZ|AXCOUNT|MYLAN|ARISTO|KABI|BENE|HORMOSAN|ZENTIVA|PUREN|BIOMO|ACIS|RATIOPH|SYNOMED|ALPHA|ROTEXMEDICA|BERCO|DURA|DAGO|GASTREU|FORTE|VITAL|VERLA|ONKOVIS|ONCOTRADE|NEOCORP' AND NOT concept_name ~* 'asa-|lambert|balneovit|similiaplex|heidac'; DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( SELECT d1.concept_code FROM drug_concept_stage d1 JOIN concept c ON LOWER(d1.concept_name) = LOWER(c.concept_name) AND d1.concept_class_id = 'Brand Name' AND c.concept_class_id IN ( 'ATC 5th', 'ATC 4th', 'ATC 3rd', 'AU Substance', 'AU Qualifier', 'Chemical Structure', 'CPT4 Hierarchy', 'Gemscript', 'Gemscript THIN', 'GPI', 'Ingredient', 'Substance', 'LOINC Hierarchy', 'Main Heading', 'Organism', 'Pharma Preparation' ) ); DELETE FROM drug_concept_stage WHERE concept_code IN ( SELECT d1.concept_code FROM drug_concept_stage d1 JOIN concept c ON LOWER(d1.concept_name) = LOWER(c.concept_name) AND d1.concept_class_id = 'Brand Name' AND c.concept_class_id IN ( 'ATC 5th', 'ATC 4th', 'ATC 3rd', 'AU Substance', 'AU Qualifier', 'Chemical Structure', 'CPT4 Hierarchy', 'Gemscript', 'Gemscript THIN', 'GPI', 'Ingredient', 'Substance', 'LOINC Hierarchy', 'Main Heading', 'Organism', 'Pharma Preparation' ) ); --Suppliers UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, ',.*', '', 'g') WHERE (concept_name) LIKE '%,%' AND concept_class_id = 'Supplier'; UPDATE drug_concept_stage SET concept_name = 'Les Laboratories Servier' WHERE concept_code = 'OMOP439865'; UPDATE drug_concept_stage SET concept_name = 'Les Laboratoires Bio-Sante' WHERE concept_code = 'OMOP1019085'; UPDATE drug_concept_stage SET concept_name = 'Les Laboratoires Du Saint-Laurent' WHERE concept_code = 'OMOP1019086'; UPDATE drug_concept_stage SET concept_name = 'Les Laboratoires Swisse' WHERE concept_code = 'OMOP1019087'; UPDATE drug_concept_stage SET concept_name = 'Les Laboratoires Vachon' WHERE concept_code = 'OMOP1019088'; DELETE FROM drug_concept_stage WHERE concept_code IN ( SELECT a.concept_code FROM drug_concept_stage a JOIN drug_concept_stage b ON a.concept_name = b.concept_name AND a.concept_class_id = 'Brand Name' AND b.concept_class_id IN ( 'Supplier', 'Ingredient' ) ); DELETE FROM drug_concept_stage WHERE concept_code IN ( SELECT dcs.concept_code FROM drug_concept_stage dcs JOIN concept c ON lower(dcs.concept_name) = lower(c.concept_name) AND c.vocabulary_id = 'RxNorm' AND dcs.concept_class_id = 'Brand Name' AND c.concept_class_id = 'Ingredient' ); DELETE FROM drug_concept_stage WHERE concept_class_id = 'Supplier' AND concept_name LIKE '%Imported%'; DELETE FROM drug_concept_stage WHERE concept_name IN ( 'Ultracare', 'Ultrabalance', 'Tussin', 'Triad', 'Aplicare', 'Lactaid' ) AND concept_class_id = 'Supplier'; DELETE FROM drug_concept_stage WHERE concept_name = 'Cream' AND concept_class_id = 'Brand Name'; --semi-manual suppl DELETE FROM internal_relationship_stage --syrup WHERE concept_code_2 = 'OMOP993256'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP993256'; DELETE FROM internal_relationship_stage --gomenol WHERE concept_code_2 = 'OMOP439967'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP439967'; DELETE FROM internal_relationship_stage -- graphytes WHERE concept_code_2 = 'OMOP336422'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP336422'; DELETE FROM internal_relationship_stage --healthaid WHERE concept_code_2 = 'OMOP336747'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP336747'; --hepatoum DELETE FROM internal_relationship_stage WHERE concept_code_2 = 'OMOP440244'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP440244'; --disso blabla DELETE FROM internal_relationship_stage WHERE concept_code_2 = 'OMOP440141'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP440141'; --changing supplier's names UPDATE drug_concept_stage dcs SET concept_name = c.concept_name FROM ( SELECT c.concept_name, c.concept_code FROM drug_concept_stage dcs2 JOIN concept c ON c.concept_code = dcs2.concept_code AND c.vocabulary_id = 'RxNorm Extension' AND c.concept_class_id = 'Supplier' ) c WHERE dcs.concept_code = c.concept_code; UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, 'Pharmaceuticals\.|Pharmaceuticals|Pharmaceutical Products|Pharmaceutical Product|Pharmaceutical|Pharmazeutische Produkte|Pharma|Pharms| Pharm$| Pharm ', '', 'gi') WHERE concept_name ilike '% pharm%' AND concept_class_id = 'Supplier'; UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, 'Incorporated|Inc\.|Inc', '', 'g') WHERE concept_name ilike '% inc%'; UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, 'GmbH & Co\. KG|GmbH & Co\.|GmbH & Co|GmbH|mbH & Co\.KG', '', 'gi') WHERE ( concept_name ilike '% mbh%' OR concept_name ilike '% gmbh%' ) AND concept_class_id = 'Supplier'; UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, 'Group', '', 'gi') WHERE concept_class_id = 'Supplier' AND concept_name NOT LIKE '%Le Group%'; UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, 'Technologies|Limited|Specialty|Corporation|European|Europe| SERVICES|Manufacturing|Regulatory Solutions|Environmental Solutions|Mobility Solutions|Solutions|Vaccines and Diagnostics|Diagnostics|Life Sciences|Therapeutics|Deutschland|NETHERLANDS|TRADING|Medical Products|Medical', '', 'gi') WHERE concept_class_id = 'Supplier' AND NOT concept_name ~ '^Laboratories|^Healthcare|^Arzneimittel|^International|^Medical|^Product|^Nutrition|^Commercial'; UPDATE drug_concept_stage SET concept_name = trim(replace(rtrim(concept_name, '-'), ' ', ' ')) WHERE concept_name LIKE '%-'; UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, 'Laboratories|Sweden|Healthcare Products|Healthcare|Commercial|Sales Services|Health Care|Management|Arzneimittel|Canada|Company|\(.*\)|Registration|Nutritionals|Nutrition|Consumer Health|Consumer|Sante| SCIENCES| MALTA|FRANCE|International| Inc\.?| Ltee| Ltd\.?| Plc| PLC| Llc| Ulc| UK| \(UK\)| \(U\.K\.\)|U\.K\.| EU$| Ab$| A/S| AG$|&$| and$| of$', '', 'gi') WHERE concept_class_id = 'Supplier' AND NOT concept_name ~ '^Laboratories|^Healthcare|^Arzneimittel|^International|^Medical|^Product|^Nutrition|^Commercial'; UPDATE drug_concept_stage SET concept_name = regexp_replace(concept_name, ' \[HIST\]|e\.k\.', '', 'gi') WHERE concept_class_id = 'Supplier'; UPDATE drug_concept_stage SET concept_name = initcap(concept_name) WHERE concept_class_id = 'Supplier' AND ( SELECT count(*) FROM regexp_matches(concept_name, '[[:upper:]]', 'g') ) > 5; UPDATE drug_concept_stage SET concept_name = trim(replace(rtrim(concept_name, '-'), ' ', ' ')) WHERE concept_name LIKE '%-'; DO $_ $ BEGIN UPDATE drug_concept_stage SET concept_name = 'FIDIA FARMACEUTICI' WHERE concept_code = 'OMOP898169'; UPDATE drug_concept_stage SET concept_name = 'Dentinox' WHERE concept_code = 'OMOP897991'; UPDATE drug_concept_stage SET concept_name = 'Miles' WHERE concept_code = 'OMOP1018785'; UPDATE drug_concept_stage SET concept_name = 'Labs Nordic Laboratories' WHERE concept_code = 'OMOP1019043'; UPDATE drug_concept_stage SET concept_name = 'Lilly' WHERE concept_code = 'OMOP339232'; UPDATE drug_concept_stage SET concept_name = 'TEVA' WHERE concept_code = 'OMOP439847'; UPDATE drug_concept_stage SET concept_name = 'Gentium' WHERE concept_code = 'OMOP338026'; UPDATE drug_concept_stage SET concept_name = 'ALK' WHERE concept_code = 'OMOP1018216'; UPDATE drug_concept_stage SET concept_name = 'Janssen' WHERE concept_code = 'OMOP440202'; UPDATE drug_concept_stage SET concept_name = 'Fresenius' WHERE concept_code = 'OMOP338813'; UPDATE drug_concept_stage SET concept_name = 'Cutter' WHERE concept_code = 'OMOP1018742'; UPDATE drug_concept_stage SET concept_name = 'Ahorn Apotheke' WHERE concept_code = 'OMOP898024'; UPDATE drug_concept_stage SET concept_name = 'Amsco' WHERE concept_code = 'OMOP1018273'; UPDATE drug_concept_stage SET concept_name = 'Anpharm' WHERE concept_code = 'OMOP1018280'; UPDATE drug_concept_stage SET concept_name = 'BASILEA' WHERE concept_code = 'OMOP440251'; UPDATE drug_concept_stage SET concept_name = 'BRISTOL-MYERS SQUIBB' WHERE concept_code = 'OMOP439842'; UPDATE drug_concept_stage SET concept_name = 'Colgate' WHERE concept_code = 'OMOP1018724'; UPDATE drug_concept_stage SET concept_name = 'Diomed' WHERE concept_code = 'OMOP900358'; UPDATE drug_concept_stage SET concept_name = 'Dr. Kade' WHERE concept_code = 'OMOP900325'; UPDATE drug_concept_stage SET concept_name = 'Dr.Mewes Heilmittel' WHERE concept_code = 'OMOP897388'; UPDATE drug_concept_stage SET concept_name = 'FirstGenerixGermany' WHERE concept_code = 'OMOP899895'; UPDATE drug_concept_stage SET concept_name = 'Golden Pride' WHERE concept_code = 'OMOP1018524'; UPDATE drug_concept_stage SET concept_name = 'Hobon' WHERE concept_code = 'OMOP1019157'; UPDATE drug_concept_stage SET concept_name = 'Huronia' WHERE concept_code = 'OMOP1019139'; UPDATE drug_concept_stage SET concept_name = ' Intega Skin' WHERE concept_code = 'OMOP1019141'; UPDATE drug_concept_stage SET concept_name = 'Canus Goat''S Milk' WHERE concept_code = 'OMOP1019089'; UPDATE drug_concept_stage SET concept_name = 'Lotus Lab' WHERE concept_code = 'OMOP899585'; UPDATE drug_concept_stage SET concept_name = 'PINNACLE' WHERE concept_code = 'OMOP440335'; UPDATE drug_concept_stage SET concept_name = 'Professional' WHERE concept_code = 'OMOP1019339'; UPDATE drug_concept_stage SET concept_name = 'Sifi North America' WHERE concept_code = 'OMOP1019711'; UPDATE drug_concept_stage SET concept_name = 'Valeant' WHERE concept_code = 'OMOP1019618'; UPDATE drug_concept_stage SET concept_name = 'Vallee' WHERE concept_code = 'OMOP1019486'; UPDATE drug_concept_stage SET concept_name = 'H & S Tee' WHERE concept_code = 'OMOP898496'; UPDATE drug_concept_stage SET concept_name = 'Herbalife' WHERE concept_code = 'OMOP1019125'; UPDATE drug_concept_stage SET concept_name = 'Biogen' WHERE concept_code = 'OMOP338399'; UPDATE drug_concept_stage SET concept_name = 'Bencard' WHERE concept_code = 'OMOP899463'; UPDATE drug_concept_stage SET concept_name = 'Cambridge' WHERE concept_code = 'OMOP2018411'; UPDATE drug_concept_stage SET concept_name = 'Ayrton' WHERE concept_code = 'OMOP572464'; UPDATE drug_concept_stage SET concept_name = 'Braun' WHERE concept_code = 'OMOP440014'; UPDATE drug_concept_stage SET concept_name = 'Aventis' WHERE concept_code = 'OMOP1018338'; UPDATE drug_concept_stage SET concept_name = 'Carter' WHERE concept_code = 'OMOP1018469'; UPDATE drug_concept_stage SET concept_name = 'Casen' WHERE concept_code = 'OMOP338684'; UPDATE drug_concept_stage SET concept_name = 'Celltrion' WHERE concept_code = 'OMOP1018695'; UPDATE drug_concept_stage SET concept_name = 'Colgate' WHERE concept_code = 'OMOP339265'; UPDATE drug_concept_stage SET concept_name = 'GDS' WHERE concept_code = 'OMOP2018500'; UPDATE drug_concept_stage SET concept_name = 'Gentium' WHERE concept_code = 'OMOP338026'; UPDATE drug_concept_stage SET concept_name = 'Bailleul' WHERE concept_code = 'OMOP440079'; UPDATE drug_concept_stage SET concept_name = 'Lek' WHERE concept_code = 'OMOP898216'; UPDATE drug_concept_stage SET concept_name = 'Merrell' WHERE concept_code = 'OMOP1018914'; UPDATE drug_concept_stage SET concept_name = 'Neovii' WHERE concept_code = 'OMOP338079'; UPDATE drug_concept_stage SET concept_name = 'Nuron B.V' WHERE concept_code = 'OMOP1019368'; UPDATE drug_concept_stage SET concept_name = 'Olympus' WHERE concept_code = 'OMOP338444'; UPDATE drug_concept_stage SET concept_name = 'Buchholz' WHERE concept_code = 'OMOP2018737'; UPDATE drug_concept_stage SET concept_name = 'Mar' WHERE concept_code = 'OMOP440422'; UPDATE drug_concept_stage SET concept_name = 'Rapidscan' WHERE concept_code = 'OMOP338461'; UPDATE drug_concept_stage SET concept_name = 'Regent' WHERE concept_code = 'OMOP439892'; UPDATE drug_concept_stage SET concept_name = 'Rhone-Poulenc' WHERE concept_code = 'OMOP1019253'; UPDATE drug_concept_stage SET concept_name = 'Guttroff' WHERE concept_code = 'OMOP899637'; UPDATE drug_concept_stage SET concept_name = 'Schoening' WHERE concept_code = 'OMOP2018824'; UPDATE drug_concept_stage SET concept_name = 'Schwarzkopf' WHERE concept_code = 'OMOP1019775'; UPDATE drug_concept_stage SET concept_name = 'Scott' WHERE concept_code = 'OMOP1019793'; UPDATE drug_concept_stage SET concept_name = 'Bernburg' WHERE concept_code = 'OMOP897672'; UPDATE drug_concept_stage SET concept_name = 'Squibb' WHERE concept_code = 'OMOP900126'; UPDATE drug_concept_stage SET concept_name = 'Sterling' WHERE concept_code = 'OMOP1019625'; UPDATE drug_concept_stage SET concept_name = 'Sobi' WHERE concept_code = 'OMOP338479'; UPDATE drug_concept_stage SET concept_name = 'Wampole' WHERE concept_code = 'OMOP1019503'; UPDATE drug_concept_stage SET concept_name = 'Produits Sanitaires' WHERE concept_code = 'OMOP1019336'; UPDATE drug_concept_stage SET concept_name = 'Actavis' WHERE concept_code = 'OMOP1018198'; UPDATE drug_concept_stage SET concept_name = 'Cambridge' WHERE concept_code = 'OMOP2018411'; UPDATE drug_concept_stage SET concept_name = 'Ayrton' WHERE concept_code = 'OMOP572464'; UPDATE drug_concept_stage SET concept_name = 'Braun' WHERE concept_code = 'OMOP440014'; UPDATE drug_concept_stage SET concept_name = 'Aventis' WHERE concept_code = 'OMOP1018338'; UPDATE drug_concept_stage SET concept_name = 'Carter' WHERE concept_code = 'OMOP1018469'; UPDATE drug_concept_stage SET concept_name = 'Casen' WHERE concept_code = 'OMOP338684'; UPDATE drug_concept_stage SET concept_name = 'Celltrion' WHERE concept_code = 'OMOP1018695'; UPDATE drug_concept_stage SET concept_name = 'Colgate' WHERE concept_code = 'OMOP339265'; UPDATE drug_concept_stage SET concept_name = 'GDS' WHERE concept_code = 'OMOP2018500'; UPDATE drug_concept_stage SET concept_name = 'Gentium' WHERE concept_code = 'OMOP338026'; UPDATE drug_concept_stage SET concept_name = 'Bailleul' WHERE concept_code = 'OMOP440079'; UPDATE drug_concept_stage SET concept_name = 'Lek' WHERE concept_code = 'OMOP898216'; UPDATE drug_concept_stage SET concept_name = 'Merrell' WHERE concept_code = 'OMOP1018914'; UPDATE drug_concept_stage SET concept_name = 'Neovii' WHERE concept_code = 'OMOP338079'; UPDATE drug_concept_stage SET concept_name = 'Nuron B.V' WHERE concept_code = 'OMOP1019368'; UPDATE drug_concept_stage SET concept_name = 'Olympus' WHERE concept_code = 'OMOP338444'; UPDATE drug_concept_stage SET concept_name = 'Buchholz' WHERE concept_code = 'OMOP2018737'; UPDATE drug_concept_stage SET concept_name = 'Mar' WHERE concept_code = 'OMOP440422'; UPDATE drug_concept_stage SET concept_name = 'Rapidscan' WHERE concept_code = 'OMOP338461'; UPDATE drug_concept_stage SET concept_name = 'Regent' WHERE concept_code = 'OMOP439892'; UPDATE drug_concept_stage SET concept_name = 'Rhone-Poulenc' WHERE concept_code = 'OMOP1019253'; UPDATE drug_concept_stage SET concept_name = 'Guttroff' WHERE concept_code = 'OMOP899637'; UPDATE drug_concept_stage SET concept_name = 'Schoening' WHERE concept_code = 'OMOP2018824'; UPDATE drug_concept_stage SET concept_name = 'Schwarzkopf' WHERE concept_code = 'OMOP1019775'; UPDATE drug_concept_stage SET concept_name = 'Scott' WHERE concept_code = 'OMOP1019793'; UPDATE drug_concept_stage SET concept_name = 'Bernburg' WHERE concept_code = 'OMOP897672'; UPDATE drug_concept_stage SET concept_name = 'Squibb' WHERE concept_code = 'OMOP900126'; UPDATE drug_concept_stage SET concept_name = 'Sterling' WHERE concept_code = 'OMOP1019625'; UPDATE drug_concept_stage SET concept_name = 'Sobi' WHERE concept_code = 'OMOP338479'; UPDATE drug_concept_stage SET concept_name = 'Wampole' WHERE concept_code = 'OMOP1019503'; UPDATE drug_concept_stage SET concept_name = 'Produits Sanitaires' WHERE concept_code = 'OMOP1019336'; UPDATE drug_concept_stage SET concept_name = '1 A' WHERE concept_code = 'OMOP897322'; UPDATE drug_concept_stage SET concept_name = '2care4' WHERE concept_code = 'OMOP2018281'; UPDATE drug_concept_stage SET concept_name = 'A Baur' WHERE concept_code = 'OMOP898745'; UPDATE drug_concept_stage SET concept_name = 'A Menarini' WHERE concept_code = 'OMOP338242'; UPDATE drug_concept_stage SET concept_name = 'A Nattermann' WHERE concept_code = 'OMOP900145'; UPDATE drug_concept_stage SET concept_name = 'Aaston' WHERE concept_code = 'OMOP2018285'; UPDATE drug_concept_stage SET concept_name = 'Aatal-Apotheke Christina Schrick' WHERE concept_code = 'OMOP898717'; UPDATE drug_concept_stage SET concept_name = 'ABF' WHERE concept_code = 'OMOP899680'; UPDATE drug_concept_stage SET concept_name = 'Abis' WHERE concept_code = 'OMOP2018288'; UPDATE drug_concept_stage SET concept_name = 'ABJ' WHERE concept_code = 'OMOP1018170'; UPDATE drug_concept_stage SET concept_name = 'Abo & Painex' WHERE concept_code = 'OMOP899329'; UPDATE drug_concept_stage SET concept_name = 'Abtswinder Naturheilmittel' WHERE concept_code = 'OMOP897951'; UPDATE drug_concept_stage SET concept_name = 'AC' WHERE concept_code = 'OMOP899626'; UPDATE drug_concept_stage SET concept_name = 'Accura' WHERE concept_code = 'OMOP338685'; UPDATE drug_concept_stage SET concept_name = 'ACS' WHERE concept_code = 'OMOP898101'; UPDATE drug_concept_stage SET concept_name = 'Adams' WHERE concept_code = 'OMOP1018202'; UPDATE drug_concept_stage SET concept_name = 'Adler-Apotheke Dr Christian & Dr Alfons Tenner' WHERE concept_code = 'OMOP899205'; UPDATE drug_concept_stage SET concept_name = 'Adler-Apotheke Dr Gerhard Haubold Jun' WHERE concept_code = 'OMOP900457'; UPDATE drug_concept_stage SET concept_name = 'Adler-Apotheke Erhard & Ernst Sprakel' WHERE concept_code = 'OMOP899756'; UPDATE drug_concept_stage SET concept_name = 'Adler-Apotheke Johannes Jaenicke' WHERE concept_code = 'OMOP900016'; UPDATE drug_concept_stage SET concept_name = 'Adler-Apotheke Karl Aisslinger & Kurt Suesser' WHERE concept_code = 'OMOP897511'; UPDATE drug_concept_stage SET concept_name = 'ADOH' WHERE concept_code = 'OMOP899203'; UPDATE drug_concept_stage SET concept_name = 'Adolf Haupt' WHERE concept_code = 'OMOP898754'; UPDATE drug_concept_stage SET concept_name = 'Aframed' WHERE concept_code = 'OMOP898297'; UPDATE drug_concept_stage SET concept_name = 'Agence Conseil' WHERE concept_code = 'OMOP440113'; UPDATE drug_concept_stage SET concept_name = 'Agepha' WHERE concept_code = 'OMOP337876'; UPDATE drug_concept_stage SET concept_name = 'Agfa' WHERE concept_code = 'OMOP440197'; UPDATE drug_concept_stage SET concept_name = 'Aktiv' WHERE concept_code = 'OMOP897472'; UPDATE drug_concept_stage SET concept_name = 'Alembic' WHERE concept_code = 'OMOP338847'; UPDATE drug_concept_stage SET concept_name = 'Alexander-Apotheke Inhaber Anja Henkel' WHERE concept_code = 'OMOP897788'; UPDATE drug_concept_stage SET concept_name = 'Alissa' WHERE concept_code = 'OMOP338699'; UPDATE drug_concept_stage SET concept_name = 'Alkaloid-Int' WHERE concept_code = 'OMOP897758'; UPDATE drug_concept_stage SET concept_name = 'All Star' WHERE concept_code = 'OMOP1018218'; UPDATE drug_concept_stage SET concept_name = 'Allcura' WHERE concept_code = 'OMOP897812'; UPDATE drug_concept_stage SET concept_name = 'Allens' WHERE concept_code = 'OMOP338994'; UPDATE drug_concept_stage SET concept_name = 'Allgaeu Apotheke Inh Erich Pfister' WHERE concept_code = 'OMOP900467'; UPDATE drug_concept_stage SET concept_name = 'Allgaeuer Heilmoor Ehrlich' WHERE concept_code = 'OMOP898952'; UPDATE drug_concept_stage SET concept_name = 'Aloex' WHERE concept_code = 'OMOP1019328'; UPDATE drug_concept_stage SET concept_name = 'Alpenlaendisches Kraeuterhaus' WHERE concept_code = 'OMOP898172'; UPDATE drug_concept_stage SET concept_name = 'Alpenpharma' WHERE concept_code = 'OMOP898310'; UPDATE drug_concept_stage SET concept_name = 'Alsi' WHERE concept_code = 'OMOP1018249'; UPDATE drug_concept_stage SET concept_name = 'Alte Apotheke Beate & Ekkehard Dochtermann' WHERE concept_code = 'OMOP898625'; UPDATE drug_concept_stage SET concept_name = 'Alte Apotheke Dieter Bueller' WHERE concept_code = 'OMOP899446'; UPDATE drug_concept_stage SET concept_name = 'Alte Apotheke Dr Josef Knipp' WHERE concept_code = 'OMOP899937'; UPDATE drug_concept_stage SET concept_name = 'Alte Apotheke Guenter Verres' WHERE concept_code = 'OMOP897437'; UPDATE drug_concept_stage SET concept_name = 'Alte Apotheke In Rissen Kurt Moog' WHERE concept_code = 'OMOP900223'; UPDATE drug_concept_stage SET concept_name = 'Alte Apotheke Sabine Francke' WHERE concept_code = 'OMOP900095'; UPDATE drug_concept_stage SET concept_name = 'Alte Eilbeker Apotheke Nils Bomholt' WHERE concept_code = 'OMOP899152'; UPDATE drug_concept_stage SET concept_name = 'Alte Stadt-Apotheke Hans-Juergen Schneider' WHERE concept_code = 'OMOP898175'; UPDATE drug_concept_stage SET concept_name = 'Alter' WHERE concept_code = 'OMOP440184'; UPDATE drug_concept_stage SET concept_name = 'Altstadt-Apotheke S Wimmer & W Praun' WHERE concept_code = 'OMOP899371'; UPDATE drug_concept_stage SET concept_name = 'Alvogen Ipcor L' WHERE concept_code = 'OMOP898941'; UPDATE drug_concept_stage SET concept_name = 'AME' WHERE concept_code = 'OMOP897995'; UPDATE drug_concept_stage SET concept_name = 'Andreas-Apotheke Baerlehner & Seelentag' WHERE concept_code = 'OMOP897957'; UPDATE drug_concept_stage SET concept_name = 'Anton Huebner' WHERE concept_code = 'OMOP898787'; UPDATE drug_concept_stage SET concept_name = 'AOP' WHERE concept_code = 'OMOP440303'; UPDATE drug_concept_stage SET concept_name = 'APC' WHERE concept_code = 'OMOP338977'; UPDATE drug_concept_stage SET concept_name = 'APM' WHERE concept_code = 'OMOP1018267'; UPDATE drug_concept_stage SET concept_name = 'Apoforte' WHERE concept_code = 'OMOP899013'; UPDATE drug_concept_stage SET concept_name = 'Apollinaris Brands' WHERE concept_code = 'OMOP900030'; UPDATE drug_concept_stage SET concept_name = 'Apothex' WHERE concept_code = 'OMOP898849'; UPDATE drug_concept_stage SET concept_name = 'Aptevo' WHERE concept_code = 'OMOP1018284'; UPDATE drug_concept_stage SET concept_name = 'Ardey Quelle' WHERE concept_code = 'OMOP898660'; UPDATE drug_concept_stage SET concept_name = 'Arens Marien Apotheke Andreas Hebenstreit' WHERE concept_code = 'OMOP899168'; UPDATE drug_concept_stage SET concept_name = 'Argonal' WHERE concept_code = 'OMOP1018303'; UPDATE drug_concept_stage SET concept_name = 'Arjun' WHERE concept_code = 'OMOP338610'; UPDATE drug_concept_stage SET concept_name = 'Arkomedika' WHERE concept_code = 'OMOP899199'; UPDATE drug_concept_stage SET concept_name = 'Arnica-Apotheke Enno Peppmeierfm' WHERE concept_code = 'OMOP897719'; UPDATE drug_concept_stage SET concept_name = 'Arnulf Apotheke Johann Thoma' WHERE concept_code = 'OMOP899097'; UPDATE drug_concept_stage SET concept_name = 'Arzneimittel-Heilmittel-Diaetetika' WHERE concept_code = 'OMOP899959'; UPDATE drug_concept_stage SET concept_name = 'Asconex' WHERE concept_code = 'OMOP2018322'; UPDATE drug_concept_stage SET concept_name = 'AST' WHERE concept_code = 'OMOP1018300'; UPDATE drug_concept_stage SET concept_name = 'Athenstaedt' WHERE concept_code = 'OMOP899622'; UPDATE drug_concept_stage SET concept_name = 'Atlantic Multipower' WHERE concept_code = 'OMOP899512'; UPDATE drug_concept_stage SET concept_name = 'Atlantis-Apotheke Wolfgang & Gisela Langenberg' WHERE concept_code = 'OMOP899411'; UPDATE drug_concept_stage SET concept_name = 'Atlas Co' WHERE concept_code = 'OMOP1018311'; UPDATE drug_concept_stage SET concept_name = 'Auden Mckenzie' WHERE concept_code = 'OMOP339527'; UPDATE drug_concept_stage SET concept_name = 'Australian Bush Oil' WHERE concept_code = 'OMOP572437'; UPDATE drug_concept_stage SET concept_name = 'Auvex' WHERE concept_code = 'OMOP440150'; UPDATE drug_concept_stage SET concept_name = 'Avondale' WHERE concept_code = 'OMOP1018342'; UPDATE drug_concept_stage SET concept_name = 'Azar Baradaran-Kazem Zadeh Galenus-Apotheke' WHERE concept_code = 'OMOP899408'; UPDATE drug_concept_stage SET concept_name = 'Azevedos' WHERE concept_code = 'OMOP899880'; UPDATE drug_concept_stage SET concept_name = 'Aziende Chimiche Riunite Angelini Sco' WHERE concept_code = 'OMOP338034'; UPDATE drug_concept_stage SET concept_name = 'B F Ascher ' WHERE concept_code = 'OMOP1018318'; UPDATE drug_concept_stage SET concept_name = 'Basi' WHERE concept_code = 'OMOP899813'; UPDATE drug_concept_stage SET concept_name = 'Basi Schoeberl' WHERE concept_code = 'OMOP898935'; UPDATE drug_concept_stage SET concept_name = 'Basilea' WHERE concept_code = 'OMOP337947'; UPDATE drug_concept_stage SET concept_name = 'Bastian' WHERE concept_code = 'OMOP900183'; UPDATE drug_concept_stage SET concept_name = 'Bayard' WHERE concept_code = 'OMOP440269'; UPDATE drug_concept_stage SET concept_name = 'Bee' WHERE concept_code = 'OMOP339160'; UPDATE drug_concept_stage SET concept_name = 'Behany' WHERE concept_code = 'OMOP1018348'; UPDATE drug_concept_stage SET concept_name = 'Behring' WHERE concept_code = 'OMOP1019553'; UPDATE drug_concept_stage SET concept_name = 'Bene' WHERE concept_code = 'OMOP899796'; UPDATE drug_concept_stage SET concept_name = 'Berco- Gottfried Herzberg' WHERE concept_code = 'OMOP900152'; UPDATE drug_concept_stage SET concept_name = 'Betz"sche Apotheke Kurt Betz' WHERE concept_code = 'OMOP898580'; UPDATE drug_concept_stage SET concept_name = 'BGP' WHERE concept_code = 'OMOP338465'; UPDATE drug_concept_stage SET concept_name = 'Bieffe Medital' WHERE concept_code = 'OMOP899967'; UPDATE drug_concept_stage SET concept_name = 'Billev' WHERE concept_code = 'OMOP897540'; UPDATE drug_concept_stage SET concept_name = 'Bindergass-Apotheke' WHERE concept_code = 'OMOP899665'; UPDATE drug_concept_stage SET concept_name = 'Bio Breizh' WHERE concept_code = 'OMOP1018420'; UPDATE drug_concept_stage SET concept_name = 'Bio Oil' WHERE concept_code = 'OMOP1018421'; UPDATE drug_concept_stage SET concept_name = 'Bio Products' WHERE concept_code = 'OMOP337883'; UPDATE drug_concept_stage SET concept_name = 'Bio-Diaet-Berlin' WHERE concept_code = 'OMOP900239'; UPDATE drug_concept_stage SET concept_name = 'Biokirch' WHERE concept_code = 'OMOP898593'; UPDATE drug_concept_stage SET concept_name = 'Biokosma' WHERE concept_code = 'OMOP1018396'; UPDATE drug_concept_stage SET concept_name = 'Biological Homeopathic' WHERE concept_code = 'OMOP1018397'; UPDATE drug_concept_stage SET concept_name = 'Biomendi' WHERE concept_code = 'OMOP897608'; UPDATE drug_concept_stage SET concept_name = 'Bionorica' WHERE concept_code = 'OMOP899944'; UPDATE drug_concept_stage SET concept_name = 'Birnbaum-Apotheke Dr Claus Gernet' WHERE concept_code = 'OMOP898490'; UPDATE drug_concept_stage SET concept_name = 'Bischoff' WHERE concept_code = 'OMOP2018390'; UPDATE drug_concept_stage SET concept_name = 'Biscova' WHERE concept_code = 'OMOP900444'; UPDATE drug_concept_stage SET concept_name = 'Bittermedizin' WHERE concept_code = 'OMOP898837'; UPDATE drug_concept_stage SET concept_name = 'Bles' WHERE concept_code = 'OMOP1018370'; UPDATE drug_concept_stage SET concept_name = 'Bluecher-Schering' WHERE concept_code = 'OMOP898539'; UPDATE drug_concept_stage SET concept_name = 'BMG' WHERE concept_code = 'OMOP1019013'; UPDATE drug_concept_stage SET concept_name = 'Boettger' WHERE concept_code = 'OMOP899729'; UPDATE drug_concept_stage SET concept_name = 'Bohumil' WHERE concept_code = 'OMOP439996'; UPDATE drug_concept_stage SET concept_name = 'Boxo' WHERE concept_code = 'OMOP899723'; UPDATE drug_concept_stage SET concept_name = 'Brahms-Apotheke Eckart & Ilse Volke' WHERE concept_code = 'OMOP897913'; UPDATE drug_concept_stage SET concept_name = 'Buckley"s' WHERE concept_code = 'OMOP1019673'; UPDATE drug_concept_stage SET concept_name = 'C.D.' WHERE concept_code = 'OMOP2018374'; UPDATE drug_concept_stage SET concept_name = 'C.P.' WHERE concept_code = 'OMOP339405'; UPDATE drug_concept_stage SET concept_name = 'C.P.M.' WHERE concept_code = 'OMOP898357'; UPDATE drug_concept_stage SET concept_name = 'Cabot' WHERE concept_code = 'OMOP440411'; UPDATE drug_concept_stage SET concept_name = 'Cadillac' WHERE concept_code = 'OMOP1019329'; UPDATE drug_concept_stage SET concept_name = 'Calcorp 55' WHERE concept_code = 'OMOP1018443'; UPDATE drug_concept_stage SET concept_name = 'Canea' WHERE concept_code = 'OMOP897747'; UPDATE drug_concept_stage SET concept_name = 'Cantassium' WHERE concept_code = 'OMOP337895'; UPDATE drug_concept_stage SET concept_name = 'Cardinal' WHERE concept_code = 'OMOP1018457'; UPDATE drug_concept_stage SET concept_name = 'Carl-Schurz-Apotheke Eva & Sabine Knoll' WHERE concept_code = 'OMOP899390'; UPDATE drug_concept_stage SET concept_name = 'Carmaran' WHERE concept_code = 'OMOP1018465'; UPDATE drug_concept_stage SET concept_name = 'Cascan' WHERE concept_code = 'OMOP899430'; UPDATE drug_concept_stage SET concept_name = 'Casen Recordati' WHERE concept_code = 'OMOP338684'; UPDATE drug_concept_stage SET concept_name = 'Cassella-Med' WHERE concept_code = 'OMOP897422'; UPDATE drug_concept_stage SET concept_name = 'Cathapham' WHERE concept_code = 'OMOP898759'; UPDATE drug_concept_stage SET concept_name = 'CCA' WHERE concept_code = 'OMOP1018455'; UPDATE drug_concept_stage SET concept_name = 'Cd' WHERE concept_code = 'OMOP337853'; UPDATE drug_concept_stage SET concept_name = 'Cedona' WHERE concept_code = 'OMOP1018456'; UPDATE drug_concept_stage SET concept_name = 'Cefak' WHERE concept_code = 'OMOP899365'; UPDATE drug_concept_stage SET concept_name = 'Cellex' WHERE concept_code = 'OMOP900072'; UPDATE drug_concept_stage SET concept_name = 'Celltrion' WHERE concept_code = 'OMOP1018695'; UPDATE drug_concept_stage SET concept_name = 'Cetylite' WHERE concept_code = 'OMOP1018705'; UPDATE drug_concept_stage SET concept_name = 'Challenge' WHERE concept_code = 'OMOP1018706'; UPDATE drug_concept_stage SET concept_name = 'Charton' WHERE concept_code = 'OMOP1019026'; UPDATE drug_concept_stage SET concept_name = 'Chem Affairs Deutschland' WHERE concept_code = 'OMOP898127'; UPDATE drug_concept_stage SET concept_name = 'Chemo Iberica Barcelona' WHERE concept_code = 'OMOP897876'; UPDATE drug_concept_stage SET concept_name = 'Chephasaar' WHERE concept_code = 'OMOP897883'; UPDATE drug_concept_stage SET concept_name = 'Commerce Pharmaceutics' WHERE concept_code = 'OMOP1018749'; UPDATE drug_concept_stage SET concept_name = 'Confab' WHERE concept_code = 'OMOP1019027'; UPDATE drug_concept_stage SET concept_name = 'Consilient' WHERE concept_code = 'OMOP338172'; UPDATE drug_concept_stage SET concept_name = 'Coralite' WHERE concept_code = 'OMOP1018774'; UPDATE drug_concept_stage SET concept_name = 'Corden' WHERE concept_code = 'OMOP898038'; UPDATE drug_concept_stage SET concept_name = 'Cormontapharm' WHERE concept_code = 'OMOP898590'; UPDATE drug_concept_stage SET concept_name = 'Cortunon' WHERE concept_code = 'OMOP1019028'; UPDATE drug_concept_stage SET concept_name = 'Country' WHERE concept_code = 'OMOP1018701'; UPDATE drug_concept_stage SET concept_name = 'Croma' WHERE concept_code = 'OMOP2018425'; UPDATE drug_concept_stage SET concept_name = 'Crucell' WHERE concept_code = 'OMOP899357'; UPDATE drug_concept_stage SET concept_name = 'CTRS' WHERE concept_code = 'OMOP338414'; UPDATE drug_concept_stage SET concept_name = 'Cusanus-Apotheke Sarah Sauer' WHERE concept_code = 'OMOP899949'; UPDATE drug_concept_stage SET concept_name = 'Cuxson Gerrard' WHERE concept_code = 'OMOP1018744'; UPDATE drug_concept_stage SET concept_name = 'Cyathus Exquirere' WHERE concept_code = 'OMOP900310'; UPDATE drug_concept_stage SET concept_name = 'Cyndea' WHERE concept_code = 'OMOP898743'; UPDATE drug_concept_stage SET concept_name = 'D.A.V.I.D.' WHERE concept_code = 'OMOP898429'; UPDATE drug_concept_stage SET concept_name = 'D.C.' WHERE concept_code = 'OMOP1018763'; UPDATE drug_concept_stage SET concept_name = 'Dana' WHERE concept_code = 'OMOP1018769'; UPDATE drug_concept_stage SET concept_name = 'Dauner Sprudel O Hommes' WHERE concept_code = 'OMOP898892'; UPDATE drug_concept_stage SET concept_name = 'Debregeas' WHERE concept_code = 'OMOP440467'; UPDATE drug_concept_stage SET concept_name = 'Decleor' WHERE concept_code = 'OMOP1019029'; UPDATE drug_concept_stage SET concept_name = 'Defiante Sa' WHERE concept_code = 'OMOP440119'; UPDATE drug_concept_stage SET concept_name = 'Del' WHERE concept_code = 'OMOP1018667'; UPDATE drug_concept_stage SET concept_name = 'Delbert' WHERE concept_code = 'OMOP439840'; UPDATE drug_concept_stage SET concept_name = 'Delon' WHERE concept_code = 'OMOP1019030'; UPDATE drug_concept_stage SET concept_name = 'Delphin-Apotheke Ruediger Becker' WHERE concept_code = 'OMOP897652'; UPDATE drug_concept_stage SET concept_name = 'Demo' WHERE concept_code = 'OMOP899213'; UPDATE drug_concept_stage SET concept_name = 'Denorex' WHERE concept_code = 'OMOP1019675'; UPDATE drug_concept_stage SET concept_name = 'Dental Health' WHERE concept_code = 'OMOP338245'; UPDATE drug_concept_stage SET concept_name = 'Dermo-Cosmetik' WHERE concept_code = 'OMOP1019031'; UPDATE drug_concept_stage SET concept_name = 'Desbergers' WHERE concept_code = 'OMOP1018675'; UPDATE drug_concept_stage SET concept_name = 'Desomed Dr Trippen' WHERE concept_code = 'OMOP898424'; UPDATE drug_concept_stage SET concept_name = 'Deutsche Homoeopathie-Union Dhu' WHERE concept_code = 'OMOP897882'; UPDATE drug_concept_stage SET concept_name = 'Diamed' WHERE concept_code = 'OMOP900236'; UPDATE drug_concept_stage SET concept_name = 'Diamo' WHERE concept_code = 'OMOP899346'; UPDATE drug_concept_stage SET concept_name = 'Dibropharm Distribution' WHERE concept_code = 'OMOP899312'; UPDATE drug_concept_stage SET concept_name = 'Die Renchtal-Apotheke Rainer Fettig' WHERE concept_code = 'OMOP900066'; UPDATE drug_concept_stage SET concept_name = 'Die Thor-Apotheke Sylvia Thorwarth' WHERE concept_code = 'OMOP898733'; UPDATE drug_concept_stage SET concept_name = 'Disphar' WHERE concept_code = 'OMOP900249'; UPDATE drug_concept_stage SET concept_name = 'Dm-Drogerie Markt' WHERE concept_code = 'OMOP897833'; UPDATE drug_concept_stage SET concept_name = 'Docmorris Apotheke Bad Hersfeldfrkia Hildwein' WHERE concept_code = 'OMOP898621'; UPDATE drug_concept_stage SET concept_name = 'Docpharm' WHERE concept_code = 'OMOP897483'; UPDATE drug_concept_stage SET concept_name = 'Doliage' WHERE concept_code = 'OMOP440174'; UPDATE drug_concept_stage SET concept_name = 'Donovan' WHERE concept_code = 'OMOP1018689'; UPDATE drug_concept_stage SET concept_name = 'Dotopharma' WHERE concept_code = 'OMOP897464'; UPDATE drug_concept_stage SET concept_name = 'Dovital' WHERE concept_code = 'OMOP900270'; UPDATE drug_concept_stage SET concept_name = 'Dr B Scheffler' WHERE concept_code = 'OMOP898458'; UPDATE drug_concept_stage SET concept_name = 'Dr Behre' WHERE concept_code = 'OMOP899309'; UPDATE drug_concept_stage SET concept_name = 'Dr Blasberg-Apotheke Dr Matthias Grundmann' WHERE concept_code = 'OMOP898639'; UPDATE drug_concept_stage SET concept_name = 'Dr Daniel' WHERE concept_code = 'OMOP1018565'; UPDATE drug_concept_stage SET concept_name = 'Dr Deppe' WHERE concept_code = 'OMOP898451'; UPDATE drug_concept_stage SET concept_name = 'Dr Die Neue Apotheke' WHERE concept_code = 'OMOP897577'; UPDATE drug_concept_stage SET concept_name = 'Dr Karl Thomae' WHERE concept_code = 'OMOP897504'; UPDATE drug_concept_stage SET concept_name = 'Dr Felgentraeger Oeko-Chem' WHERE concept_code = 'OMOP899627'; UPDATE drug_concept_stage SET concept_name = 'Dr Franz Koehler Chemie Mit Beschraenkter' WHERE concept_code = 'OMOP899467'; UPDATE drug_concept_stage SET concept_name = 'Dr Friedrichse' WHERE concept_code = 'OMOP899409'; UPDATE drug_concept_stage SET concept_name = 'Dr Gerhard Mann' WHERE concept_code = 'OMOP897500'; UPDATE drug_concept_stage SET concept_name = 'Dr Kuhns Apotheke Dr Arne Kuhn' WHERE concept_code = 'OMOP900013'; UPDATE drug_concept_stage SET concept_name = 'Dr Loges' WHERE concept_code = 'OMOP897631'; UPDATE drug_concept_stage SET concept_name = 'Dr Marien-Apothekefm' WHERE concept_code = 'OMOP899081'; UPDATE drug_concept_stage SET concept_name = 'Dr Markt-Apotheke 24' WHERE concept_code = 'OMOP897439'; UPDATE drug_concept_stage SET concept_name = 'Dr Med Mainz' WHERE concept_code = 'OMOP899023'; UPDATE drug_concept_stage SET concept_name = 'Dr Poehlmann' WHERE concept_code = 'OMOP900334'; UPDATE drug_concept_stage SET concept_name = 'Dr R Pfleger' WHERE concept_code = 'OMOP897364'; UPDATE drug_concept_stage SET concept_name = 'Dr Ritsert' WHERE concept_code = 'OMOP898212'; UPDATE drug_concept_stage SET concept_name = 'Dr Rosen Apotheke' WHERE concept_code = 'OMOP898027'; UPDATE drug_concept_stage SET concept_name = 'Dr Roshdy Ismail' WHERE concept_code = 'OMOP899384'; UPDATE drug_concept_stage SET concept_name = 'Dr Stadt-Apotheke' WHERE concept_code = 'OMOP899140'; UPDATE drug_concept_stage SET concept_name = 'Dreisessel-Apotheke' WHERE concept_code = 'OMOP898389'; UPDATE drug_concept_stage SET concept_name = 'DRK-Blutspendedienst Baden-Wuerttemberg-Hessen' WHERE concept_code = 'OMOP900192'; UPDATE drug_concept_stage SET concept_name = 'Drossapharm' WHERE concept_code = 'OMOP900006'; UPDATE drug_concept_stage SET concept_name = 'Drula' WHERE concept_code = 'OMOP1018572'; UPDATE drug_concept_stage SET concept_name = 'Dtr Dermal Therapy' WHERE concept_code = 'OMOP1018578'; UPDATE drug_concept_stage SET concept_name = 'Dustbane' WHERE concept_code = 'OMOP1018591'; UPDATE drug_concept_stage SET concept_name = 'Dutch Ophthalmic' WHERE concept_code = 'OMOP1018592'; UPDATE drug_concept_stage SET concept_name = 'Dyckerhoff' WHERE concept_code = 'OMOP900446'; UPDATE drug_concept_stage SET concept_name = 'Dymatize' WHERE concept_code = 'OMOP1018593'; UPDATE drug_concept_stage SET concept_name = 'E.R.I.' WHERE concept_code = 'OMOP1018605'; UPDATE drug_concept_stage SET concept_name = 'Easy Motion' WHERE concept_code = 'OMOP1018609'; UPDATE drug_concept_stage SET concept_name = 'Easyapotheke' WHERE concept_code = 'OMOP897406'; UPDATE drug_concept_stage SET concept_name = 'Eduard Gerlach' WHERE concept_code = 'OMOP898066'; UPDATE drug_concept_stage SET concept_name = 'Edwards' WHERE concept_code = 'OMOP1018626'; UPDATE drug_concept_stage SET concept_name = 'Efamol' WHERE concept_code = 'OMOP1018627'; UPDATE drug_concept_stage SET concept_name = 'Eichendorff Apotheke Patric Sengfm' WHERE concept_code = 'OMOP898648'; UPDATE drug_concept_stage SET concept_name = 'Eimsbuetteler-Apotheke' WHERE concept_code = 'OMOP900285'; UPDATE drug_concept_stage SET concept_name = 'EKR' WHERE concept_code = 'OMOP1018629'; UPDATE drug_concept_stage SET concept_name = 'Elasten' WHERE concept_code = 'OMOP897296'; UPDATE drug_concept_stage SET concept_name = 'Elc Group' WHERE concept_code = 'OMOP898926'; UPDATE drug_concept_stage SET concept_name = 'Elpen' WHERE concept_code = 'OMOP898786'; UPDATE drug_concept_stage SET concept_name = 'Elsass-Apotheke Luecker' WHERE concept_code = 'OMOP898267'; UPDATE drug_concept_stage SET concept_name = 'Emasdi' WHERE concept_code = 'OMOP897469'; UPDATE drug_concept_stage SET concept_name = 'Emergent Sales And Marketing' WHERE concept_code = 'OMOP899679'; UPDATE drug_concept_stage SET concept_name = 'Emu Man L C' WHERE concept_code = 'OMOP1019676'; UPDATE drug_concept_stage SET concept_name = 'Engarde' WHERE concept_code = 'OMOP1018475'; UPDATE drug_concept_stage SET concept_name = 'Engelhard' WHERE concept_code = 'OMOP898631'; UPDATE drug_concept_stage SET concept_name = 'Ernest Jackson' WHERE concept_code = 'OMOP338199'; UPDATE drug_concept_stage SET concept_name = 'Espen-Apotheke Gundhilt Mueller' WHERE concept_code = 'OMOP900213'; UPDATE drug_concept_stage SET concept_name = 'Ester-C' WHERE concept_code = 'OMOP1018601'; UPDATE drug_concept_stage SET concept_name = 'Eu Rho' WHERE concept_code = 'OMOP899651'; UPDATE drug_concept_stage SET concept_name = 'Euro-Apotheke Eurapon' WHERE concept_code = 'OMOP899251'; UPDATE drug_concept_stage SET concept_name = 'Eurogenerics' WHERE concept_code = 'OMOP439862'; UPDATE drug_concept_stage SET concept_name = 'Evepacks' WHERE concept_code = 'OMOP900055'; UPDATE drug_concept_stage SET concept_name = 'Exeltis' WHERE concept_code = 'OMOP898491'; UPDATE drug_concept_stage SET concept_name = 'F Maltby' WHERE concept_code = 'OMOP338835'; UPDATE drug_concept_stage SET concept_name = 'Farmaryn' WHERE concept_code = 'OMOP898695'; UPDATE drug_concept_stage SET concept_name = 'Farmigea' WHERE concept_code = 'OMOP339522'; UPDATE drug_concept_stage SET concept_name = 'Ferrer' WHERE concept_code = 'OMOP439931'; UPDATE drug_concept_stage SET concept_name = 'FGK' WHERE concept_code = 'OMOP899136'; UPDATE drug_concept_stage SET concept_name = 'Fides' WHERE concept_code = 'OMOP899970'; UPDATE drug_concept_stage SET concept_name = 'Fitne Gesundheits Und Wellness' WHERE concept_code = 'OMOP900471'; UPDATE drug_concept_stage SET concept_name = 'Flora-Apotheke Dr Bernhard Cuntze' WHERE concept_code = 'OMOP898225'; UPDATE drug_concept_stage SET concept_name = 'Fontus' WHERE concept_code = 'OMOP337973'; UPDATE drug_concept_stage SET concept_name = 'Fournier S' WHERE concept_code = 'OMOP1019032'; UPDATE drug_concept_stage SET concept_name = 'Frank W Kerr' WHERE concept_code = 'OMOP1018619'; UPDATE drug_concept_stage SET concept_name = 'Franken Brunnen' WHERE concept_code = 'OMOP898058'; UPDATE drug_concept_stage SET concept_name = 'Frank"s' WHERE concept_code = 'OMOP1018620'; UPDATE drug_concept_stage SET concept_name = 'Freesen-Apotheke Petra Engel' WHERE concept_code = 'OMOP899749'; UPDATE drug_concept_stage SET concept_name = 'Friedrich Kremer Jr Inh Hans Kremer' WHERE concept_code = 'OMOP900008'; UPDATE drug_concept_stage SET concept_name = 'Fritz Oskar Michallik' WHERE concept_code = 'OMOP900245'; UPDATE drug_concept_stage SET concept_name = 'Friulchem' WHERE concept_code = 'OMOP899958'; UPDATE drug_concept_stage SET concept_name = 'Fujisawa' WHERE concept_code = 'OMOP1018633'; UPDATE drug_concept_stage SET concept_name = 'Fuller Brush' WHERE concept_code = 'OMOP1018634'; UPDATE drug_concept_stage SET concept_name = 'G & G Food' WHERE concept_code = 'OMOP338808'; UPDATE drug_concept_stage SET concept_name = 'G.A.' WHERE concept_code = 'OMOP900031'; UPDATE drug_concept_stage SET concept_name = 'G.E.S.' WHERE concept_code = 'OMOP900255'; UPDATE drug_concept_stage SET concept_name = 'G.L.' WHERE concept_code = 'OMOP898333'; UPDATE drug_concept_stage SET concept_name = 'G2D' WHERE concept_code = 'OMOP440396'; UPDATE drug_concept_stage SET concept_name = 'Galenica' WHERE concept_code = 'OMOP899942'; UPDATE drug_concept_stage SET concept_name = 'Galenicum' WHERE concept_code = 'OMOP897562'; UPDATE drug_concept_stage SET concept_name = 'GDS' WHERE concept_code = 'OMOP2018500'; UPDATE drug_concept_stage SET concept_name = 'Gebr Waaning-Tilly' WHERE concept_code = 'OMOP899700'; UPDATE drug_concept_stage SET concept_name = 'Geiser' WHERE concept_code = 'OMOP898649'; UPDATE drug_concept_stage SET concept_name = 'Genericon' WHERE concept_code = 'OMOP900438'; UPDATE drug_concept_stage SET concept_name = 'Genfarma' WHERE concept_code = 'OMOP898020'; UPDATE drug_concept_stage SET concept_name = 'Genius- Apotheke' WHERE concept_code = 'OMOP898586'; UPDATE drug_concept_stage SET concept_name = 'Genpharm' WHERE concept_code = 'OMOP1018500'; UPDATE drug_concept_stage SET concept_name = 'Genzyme' WHERE concept_code = 'OMOP337872'; UPDATE drug_concept_stage SET concept_name = 'Gerd Rehme Apotheke Am Behnhaus' WHERE concept_code = 'OMOP899362'; UPDATE drug_concept_stage SET concept_name = 'Gerda' WHERE concept_code = 'OMOP440064'; UPDATE drug_concept_stage SET concept_name = 'Gernetic' WHERE concept_code = 'OMOP1019015'; UPDATE drug_concept_stage SET concept_name = 'Geschwister Popp & Goldmann' WHERE concept_code = 'OMOP899262'; UPDATE drug_concept_stage SET concept_name = 'Geymonat' WHERE concept_code = 'OMOP900020'; UPDATE drug_concept_stage SET concept_name = 'Gingi-Pak' WHERE concept_code = 'OMOP1018508'; UPDATE drug_concept_stage SET concept_name = 'Giovanni Lorenzini' WHERE concept_code = 'OMOP899417'; UPDATE drug_concept_stage SET concept_name = 'Gojo' WHERE concept_code = 'OMOP1018519'; UPDATE drug_concept_stage SET concept_name = 'Good Oil' WHERE concept_code = 'OMOP572456'; UPDATE drug_concept_stage SET concept_name = 'Gothaplast' WHERE concept_code = 'OMOP900357'; UPDATE drug_concept_stage SET concept_name = 'Graham' WHERE concept_code = 'OMOP1018528'; UPDATE drug_concept_stage SET concept_name = 'Graichen Produktions' WHERE concept_code = 'OMOP899414'; UPDATE drug_concept_stage SET concept_name = 'Green' WHERE concept_code = 'OMOP1018531'; UPDATE drug_concept_stage SET concept_name = 'Green Medicine' WHERE concept_code = 'OMOP1019677'; UPDATE drug_concept_stage SET concept_name = 'Grunitz' WHERE concept_code = 'OMOP1018561'; UPDATE drug_concept_stage SET concept_name = 'GSE' WHERE concept_code = 'OMOP2018519'; UPDATE drug_concept_stage SET concept_name = 'H C Stark' WHERE concept_code = 'OMOP898402'; UPDATE drug_concept_stage SET concept_name = 'H.J. Sutton' WHERE concept_code = 'OMOP1018540'; UPDATE drug_concept_stage SET concept_name = 'Hager & Werken' WHERE concept_code = 'OMOP900053'; UPDATE drug_concept_stage SET concept_name = 'Hair Cosmetics' WHERE concept_code = 'OMOP1018228'; UPDATE drug_concept_stage SET concept_name = 'Hannemarie Brandt' WHERE concept_code = 'OMOP900395'; UPDATE drug_concept_stage SET concept_name = 'Haupt Ag' WHERE concept_code = 'OMOP899255'; UPDATE drug_concept_stage SET concept_name = 'Haus Schaeben' WHERE concept_code = 'OMOP900156'; UPDATE drug_concept_stage SET concept_name = 'HBM' WHERE concept_code = 'OMOP899631'; UPDATE drug_concept_stage SET concept_name = 'Health 4 All' WHERE concept_code = 'OMOP1018548'; UPDATE drug_concept_stage SET concept_name = 'Health Way' WHERE concept_code = 'OMOP1018552'; UPDATE drug_concept_stage SET concept_name = 'Healthcare Sales & Service' WHERE concept_code = 'OMOP339068'; UPDATE drug_concept_stage SET concept_name = 'Heilbad Bad Neuenahr-Ahrweiler' WHERE concept_code = 'OMOP900384'; UPDATE drug_concept_stage SET concept_name = 'Heinrich Klenk' WHERE concept_code = 'OMOP898908'; UPDATE drug_concept_stage SET concept_name = 'Heinrich Kleppe' WHERE concept_code = 'OMOP900459'; UPDATE drug_concept_stage SET concept_name = 'Heinrich Mickan' WHERE concept_code = 'OMOP899728'; UPDATE drug_concept_stage SET concept_name = 'Heinrich-Heine-Apotheke Alexandra Tscheuschner' WHERE concept_code = 'OMOP897565'; UPDATE drug_concept_stage SET concept_name = 'Helenen-Apotheke Dr Rer Nat Guenter Lang' WHERE concept_code = 'OMOP899003'; UPDATE drug_concept_stage SET concept_name = 'Henkel Agaa' WHERE concept_code = 'OMOP899137'; UPDATE drug_concept_stage SET concept_name = 'Herbages Naturbec' WHERE concept_code = 'OMOP1018556'; UPDATE drug_concept_stage SET concept_name = 'Herbalist & Doc' WHERE concept_code = 'OMOP897770'; UPDATE drug_concept_stage SET concept_name = 'Herbrand' WHERE concept_code = 'OMOP898314'; UPDATE drug_concept_stage SET concept_name = 'Herzogen-Apotheke Sabina Van Dornick' WHERE concept_code = 'OMOP899664'; UPDATE drug_concept_stage SET concept_name = 'Heumann' WHERE concept_code = 'OMOP899775'; UPDATE drug_concept_stage SET concept_name = 'Hevert' WHERE concept_code = 'OMOP900091'; UPDATE drug_concept_stage SET concept_name = 'HFC Prestige' WHERE concept_code = 'OMOP1019135'; UPDATE drug_concept_stage SET concept_name = 'Hi-Ga' WHERE concept_code = 'OMOP1019148'; UPDATE drug_concept_stage SET concept_name = 'High' WHERE concept_code = 'OMOP1019149'; UPDATE drug_concept_stage SET concept_name = 'Highcrest' WHERE concept_code = 'OMOP1019150'; UPDATE drug_concept_stage SET concept_name = 'Hilary"s' WHERE concept_code = 'OMOP1019151'; UPDATE drug_concept_stage SET concept_name = 'Hipp' WHERE concept_code = 'OMOP899260'; UPDATE drug_concept_stage SET concept_name = 'Hirundo' WHERE concept_code = 'OMOP2018567'; UPDATE drug_concept_stage SET concept_name = 'HLS' WHERE concept_code = 'OMOP1019156'; UPDATE drug_concept_stage SET concept_name = 'Holistic' WHERE concept_code = 'OMOP1019161'; UPDATE drug_concept_stage SET concept_name = 'Horizon' WHERE concept_code = 'OMOP1018962'; UPDATE drug_concept_stage SET concept_name = 'Hormosan' WHERE concept_code = 'OMOP897339'; UPDATE drug_concept_stage SET concept_name = 'Hospal' WHERE concept_code = 'OMOP898256'; UPDATE drug_concept_stage SET concept_name = 'Houbigant' WHERE concept_code = 'OMOP1018984'; UPDATE drug_concept_stage SET concept_name = 'Humanus' WHERE concept_code = 'OMOP2018547'; UPDATE drug_concept_stage SET concept_name = 'Hunza' WHERE concept_code = 'OMOP338496'; UPDATE drug_concept_stage SET concept_name = 'Hustadt-Apotheke Dietmar Streit' WHERE concept_code = 'OMOP899090'; UPDATE drug_concept_stage SET concept_name = 'HWI Analytik' WHERE concept_code = 'OMOP898464'; UPDATE drug_concept_stage SET concept_name = 'I.B.' WHERE concept_code = 'OMOP898694'; UPDATE drug_concept_stage SET concept_name = 'I.S.N.' WHERE concept_code = 'OMOP900179'; UPDATE drug_concept_stage SET concept_name = 'Ibigen ' WHERE concept_code = 'OMOP899025'; UPDATE drug_concept_stage SET concept_name = 'ID bio' WHERE concept_code = 'OMOP1019189'; UPDATE drug_concept_stage SET concept_name = 'IDD' WHERE concept_code = 'OMOP899396'; UPDATE drug_concept_stage SET concept_name = 'Idelle' WHERE concept_code = 'OMOP1019190'; UPDATE drug_concept_stage SET concept_name = 'IDL' WHERE concept_code = 'OMOP440280'; UPDATE drug_concept_stage SET concept_name = 'IHN-Allaire' WHERE concept_code = 'OMOP1018968'; UPDATE drug_concept_stage SET concept_name = 'IIP-Institut' WHERE concept_code = 'OMOP898848'; UPDATE drug_concept_stage SET concept_name = 'I-Med' WHERE concept_code = 'OMOP899862'; UPDATE drug_concept_stage SET concept_name = 'IMG Institut' WHERE concept_code = 'OMOP899361'; UPDATE drug_concept_stage SET concept_name = 'Impuls' WHERE concept_code = 'OMOP2018740'; UPDATE drug_concept_stage SET concept_name = 'Incyte' WHERE concept_code = 'OMOP1140334'; UPDATE drug_concept_stage SET concept_name = 'Infectopharm' WHERE concept_code = 'OMOP897767'; UPDATE drug_concept_stage SET concept_name = 'Inn-Farm' WHERE concept_code = 'OMOP898007'; UPDATE drug_concept_stage SET concept_name = 'Innovapharm' WHERE concept_code = 'OMOP899604'; UPDATE drug_concept_stage SET concept_name = 'INO' WHERE concept_code = 'OMOP1018987'; UPDATE drug_concept_stage SET concept_name = 'Inter Pharm' WHERE concept_code = 'OMOP2018575'; UPDATE drug_concept_stage SET concept_name = 'Interdos' WHERE concept_code = 'OMOP899123'; UPDATE drug_concept_stage SET concept_name = 'International Medication Systems' WHERE concept_code = 'OMOP337798'; UPDATE drug_concept_stage SET concept_name = 'Invent Farma' WHERE concept_code = 'OMOP898866'; UPDATE drug_concept_stage SET concept_name = 'Inverma Johannes Lange' WHERE concept_code = 'OMOP898455'; UPDATE drug_concept_stage SET concept_name = 'Iovate' WHERE concept_code = 'OMOP1019168'; UPDATE drug_concept_stage SET concept_name = 'IPP' WHERE concept_code = 'OMOP897924'; UPDATE drug_concept_stage SET concept_name = 'IPS' WHERE concept_code = 'OMOP338599'; UPDATE drug_concept_stage SET concept_name = 'Iroko' WHERE concept_code = 'OMOP440366'; UPDATE drug_concept_stage SET concept_name = 'Isis' WHERE concept_code = 'OMOP338975'; UPDATE drug_concept_stage SET concept_name = 'Ispex' WHERE concept_code = 'OMOP899889'; UPDATE drug_concept_stage SET concept_name = 'IVC' WHERE concept_code = 'OMOP1019213'; UPDATE drug_concept_stage SET concept_name = 'J Carl Pflueger' WHERE concept_code = 'OMOP898087'; UPDATE drug_concept_stage SET concept_name = 'J L Mathieu' WHERE concept_code = 'OMOP1019215'; UPDATE drug_concept_stage SET concept_name = 'Jadran Galenski Laboratorij D D' WHERE concept_code = 'OMOP899915'; UPDATE drug_concept_stage SET concept_name = 'Jan Marini' WHERE concept_code = 'OMOP1019169'; UPDATE drug_concept_stage SET concept_name = 'Jane' WHERE concept_code = 'OMOP1019170'; UPDATE drug_concept_stage SET concept_name = 'Jazz' WHERE concept_code = 'OMOP1019172'; UPDATE drug_concept_stage SET concept_name = 'Jedmon' WHERE concept_code = 'OMOP1019174'; UPDATE drug_concept_stage SET concept_name = 'Jenson' WHERE concept_code = 'OMOP899196'; UPDATE drug_concept_stage SET concept_name = 'Jr Carlson' WHERE concept_code = 'OMOP1019180'; UPDATE drug_concept_stage SET concept_name = 'Jubilant' WHERE concept_code = 'OMOP897378'; UPDATE drug_concept_stage SET concept_name = 'Jura Gollwitzer' WHERE concept_code = 'OMOP900141'; UPDATE drug_concept_stage SET concept_name = 'Juvise' WHERE concept_code = 'OMOP440440'; UPDATE drug_concept_stage SET concept_name = 'Kabi' WHERE concept_code = 'OMOP1019187'; UPDATE drug_concept_stage SET concept_name = 'Kabivitrum' WHERE concept_code = 'OMOP2018607'; UPDATE drug_concept_stage SET concept_name = 'Kao' WHERE concept_code = 'OMOP1019204'; UPDATE drug_concept_stage SET concept_name = 'Karmed' WHERE concept_code = 'OMOP899891'; UPDATE drug_concept_stage SET concept_name = 'Kedrion' WHERE concept_code = 'OMOP899873'; UPDATE drug_concept_stage SET concept_name = 'Kerastase' WHERE concept_code = 'OMOP1019223'; UPDATE drug_concept_stage SET concept_name = 'Kimed' WHERE concept_code = 'OMOP898990'; UPDATE drug_concept_stage SET concept_name = 'Klaire' WHERE concept_code = 'OMOP1018979'; UPDATE drug_concept_stage SET concept_name = 'Klemens-Apotheke Dr F U H Reiter' WHERE concept_code = 'OMOP899229'; UPDATE drug_concept_stage SET concept_name = 'Klemenz' WHERE concept_code = 'OMOP898008'; UPDATE drug_concept_stage SET concept_name = 'Koeniglich Privilegierte Adler Apotheke' WHERE concept_code = 'OMOP897590'; UPDATE drug_concept_stage SET concept_name = 'Korea Ginseng' WHERE concept_code = 'OMOP899208'; UPDATE drug_concept_stage SET concept_name = 'Kowa' WHERE concept_code = 'OMOP897871'; UPDATE drug_concept_stage SET concept_name = 'Kraeuterhaus Sanct Bernhard' WHERE concept_code = 'OMOP897290'; UPDATE drug_concept_stage SET concept_name = 'Kraeuterpfarrer Kuenzle' WHERE concept_code = 'OMOP897949'; UPDATE drug_concept_stage SET concept_name = 'Kraiss & Friz' WHERE concept_code = 'OMOP898345'; UPDATE drug_concept_stage SET concept_name = 'Kreuzapotheke Ruelzheim Inhaber Gabriele Deutsch' WHERE concept_code = 'OMOP899030'; UPDATE drug_concept_stage SET concept_name = 'Kroeger Herb' WHERE concept_code = 'OMOP1019001'; UPDATE drug_concept_stage SET concept_name = 'Krueger' WHERE concept_code = 'OMOP897999'; UPDATE drug_concept_stage SET concept_name = 'KSK-Pharma' WHERE concept_code = 'OMOP900456'; UPDATE drug_concept_stage SET concept_name = 'Kutol' WHERE concept_code = 'OMOP1019003'; UPDATE drug_concept_stage SET concept_name = 'L & S' WHERE concept_code = 'OMOP1019007'; UPDATE drug_concept_stage SET concept_name = 'L Molteni & C Dei F Lli Alitti' WHERE concept_code = 'OMOP898281'; UPDATE drug_concept_stage SET concept_name = 'Laboratoire Larima' WHERE concept_code = 'OMOP1019021'; UPDATE drug_concept_stage SET concept_name = 'Laboratori Diaco Bioi' WHERE concept_code = 'OMOP899334'; UPDATE drug_concept_stage SET concept_name = 'Laboratori Guidotti' WHERE concept_code = 'OMOP900432'; UPDATE drug_concept_stage SET concept_name = 'Laboratories For Applied Biology' WHERE concept_code = 'OMOP339479'; UPDATE drug_concept_stage SET concept_name = 'Lacorium' WHERE concept_code = 'OMOP1019046'; UPDATE drug_concept_stage SET concept_name = 'Laderma' WHERE concept_code = 'OMOP1019048'; UPDATE drug_concept_stage SET concept_name = 'Laer' WHERE concept_code = 'OMOP1019049'; UPDATE drug_concept_stage SET concept_name = 'Lakeridge Health' WHERE concept_code = 'OMOP1019050'; UPDATE drug_concept_stage SET concept_name = 'Lane' WHERE concept_code = 'OMOP1019055'; UPDATE drug_concept_stage SET concept_name = 'Lannacher Heilmittel' WHERE concept_code = 'OMOP898993'; UPDATE drug_concept_stage SET concept_name = 'Lantheus' WHERE concept_code = 'OMOP440450'; UPDATE drug_concept_stage SET concept_name = 'Larose & Fils' WHERE concept_code = 'OMOP1019057'; UPDATE drug_concept_stage SET concept_name = 'Laurentius-Apotheke Stephanie Macagnino' WHERE concept_code = 'OMOP899597'; UPDATE drug_concept_stage SET concept_name = 'Le Nigen N' WHERE concept_code = 'OMOP1019064'; UPDATE drug_concept_stage SET concept_name = 'Lebewohl' WHERE concept_code = 'OMOP900115'; UPDATE drug_concept_stage SET concept_name = 'Leda Innovations' WHERE concept_code = 'OMOP1019067'; UPDATE drug_concept_stage SET concept_name = 'Lege Artis' WHERE concept_code = 'OMOP898302'; UPDATE drug_concept_stage SET concept_name = 'Lek D D' WHERE concept_code = 'OMOP898216'; UPDATE drug_concept_stage SET concept_name = 'Bio-SantГ©' WHERE concept_code = 'OMOP1019085'; UPDATE drug_concept_stage SET concept_name = 'Chimiques B O D' WHERE concept_code = 'OMOP1019081'; UPDATE drug_concept_stage SET concept_name = 'Saint-Laurent' WHERE concept_code = 'OMOP1019086'; UPDATE drug_concept_stage SET concept_name = 'Entreprises Plein Sol' WHERE concept_code = 'OMOP1019082'; UPDATE drug_concept_stage SET concept_name = 'Servier' WHERE concept_code = 'OMOP439865'; UPDATE drug_concept_stage SET concept_name = 'Swisse' WHERE concept_code = 'OMOP1019087'; UPDATE drug_concept_stage SET concept_name = 'Lever' WHERE concept_code = 'OMOP1019094'; UPDATE drug_concept_stage SET concept_name = 'Lichtenheldt' WHERE concept_code = 'OMOP900352'; UPDATE drug_concept_stage SET concept_name = 'Lichtenstein Zeutica' WHERE concept_code = 'OMOP899822'; UPDATE drug_concept_stage SET concept_name = 'Lichtwer' WHERE concept_code = 'OMOP1019097'; UPDATE drug_concept_stage SET concept_name = 'Liebermann' WHERE concept_code = 'OMOP900077'; UPDATE drug_concept_stage SET concept_name = 'Lifeplan' WHERE concept_code = 'OMOP338187'; UPDATE drug_concept_stage SET concept_name = 'Lil" Drug Store' WHERE concept_code = 'OMOP1019101'; UPDATE drug_concept_stage SET concept_name = 'Limes-Apotheke Andreas Gruenebaum' WHERE concept_code = 'OMOP897276'; UPDATE drug_concept_stage SET concept_name = 'Linden' WHERE concept_code = 'OMOP898334'; UPDATE drug_concept_stage SET concept_name = 'Logenex' WHERE concept_code = 'OMOP898067'; UPDATE drug_concept_stage SET concept_name = 'Lomapharm Rudolf Lohmann' WHERE concept_code = 'OMOP898507'; UPDATE drug_concept_stage SET concept_name = 'Lousal' WHERE concept_code = 'OMOP1019109'; UPDATE drug_concept_stage SET concept_name = 'Lyocentre' WHERE concept_code = 'OMOP439941'; UPDATE drug_concept_stage SET concept_name = 'Vachon' WHERE concept_code = 'OMOP1019060'; UPDATE drug_concept_stage SET concept_name = 'Mainopharm' WHERE concept_code = 'OMOP898732'; UPDATE drug_concept_stage SET concept_name = 'Majorelle' WHERE concept_code = 'OMOP440465'; UPDATE drug_concept_stage SET concept_name = 'Mameca' WHERE concept_code = 'OMOP1019331'; UPDATE drug_concept_stage SET concept_name = 'Manai' WHERE concept_code = 'OMOP898742'; UPDATE drug_concept_stage SET concept_name = 'Maney Paul' WHERE concept_code = 'OMOP1019042'; UPDATE drug_concept_stage SET concept_name = 'Marien-Apotheke Roland Leikertfm' WHERE concept_code = 'OMOP897383'; UPDATE drug_concept_stage SET concept_name = 'Martin-Apotheke Guenter Stephan Gisela Heidt-Templin' WHERE concept_code = 'OMOP897454'; UPDATE drug_concept_stage SET concept_name = 'Martinus-Apotheke Bernhard Gievert' WHERE concept_code = 'OMOP898969'; UPDATE drug_concept_stage SET concept_name = 'Matol Botanique' WHERE concept_code = 'OMOP1018943'; UPDATE drug_concept_stage SET concept_name = 'Matramed Mfg' WHERE concept_code = 'OMOP1018947'; UPDATE drug_concept_stage SET concept_name = 'Mauermann' WHERE concept_code = 'OMOP899774'; UPDATE drug_concept_stage SET concept_name = 'Mavena' WHERE concept_code = 'OMOP897966'; UPDATE drug_concept_stage SET concept_name = 'Mayne' WHERE concept_code = 'OMOP338706'; UPDATE drug_concept_stage SET concept_name = 'Mayoly Spindler' WHERE concept_code = 'OMOP440326'; UPDATE drug_concept_stage SET concept_name = 'Mco' WHERE concept_code = 'OMOP2018657'; UPDATE drug_concept_stage SET concept_name = 'Media pharmaceutic' WHERE concept_code = 'OMOP2018649'; UPDATE drug_concept_stage SET concept_name = 'Medic Laboratory' WHERE concept_code = 'OMOP1018795'; UPDATE drug_concept_stage SET concept_name = 'Medicines' WHERE concept_code = 'OMOP339238'; UPDATE drug_concept_stage SET concept_name = 'Medicon' WHERE concept_code = 'OMOP899143'; UPDATE drug_concept_stage SET concept_name = 'Medique/Unifirst' WHERE concept_code = 'OMOP1018879'; UPDATE drug_concept_stage SET concept_name = 'Medix Team' WHERE concept_code = 'OMOP338143'; UPDATE drug_concept_stage SET concept_name = 'Medline' WHERE concept_code = 'OMOP1018880'; UPDATE drug_concept_stage SET concept_name = 'Medopharm' WHERE concept_code = 'OMOP899724'; UPDATE drug_concept_stage SET concept_name = 'Medrx Llp' WHERE concept_code = 'OMOP338764'; UPDATE drug_concept_stage SET concept_name = 'Mekos' WHERE concept_code = 'OMOP1018892'; UPDATE drug_concept_stage SET concept_name = 'Menarini' WHERE concept_code = 'OMOP440135'; UPDATE drug_concept_stage SET concept_name = 'Merus Luxco' WHERE concept_code = 'OMOP339442'; UPDATE drug_concept_stage SET concept_name = 'Metrex' WHERE concept_code = 'OMOP1018944'; UPDATE drug_concept_stage SET concept_name = 'Meuselbach' WHERE concept_code = 'OMOP897791'; UPDATE drug_concept_stage SET concept_name = 'Meyer Zall' WHERE concept_code = 'OMOP1018946'; UPDATE drug_concept_stage SET concept_name = 'Mickan' WHERE concept_code = 'OMOP899067'; UPDATE drug_concept_stage SET concept_name = 'Micro-Labs' WHERE concept_code = 'OMOP897870'; UPDATE drug_concept_stage SET concept_name = 'Mineralbrunnen Ueberkingen-Teinach' WHERE concept_code = 'OMOP900279'; UPDATE drug_concept_stage SET concept_name = 'Mithra' WHERE concept_code = 'OMOP899197'; UPDATE drug_concept_stage SET concept_name = 'MM' WHERE concept_code = 'OMOP1018928'; UPDATE drug_concept_stage SET concept_name = 'Momaja Elc-Group' WHERE concept_code = 'OMOP897730'; UPDATE drug_concept_stage SET concept_name = 'Monarch' WHERE concept_code = 'OMOP440034'; UPDATE drug_concept_stage SET concept_name = 'Montavit' WHERE concept_code = 'OMOP1019363'; UPDATE drug_concept_stage SET concept_name = 'Montreal Veterinary' WHERE concept_code = 'OMOP1018930'; UPDATE drug_concept_stage SET concept_name = 'Morex' WHERE concept_code = 'OMOP1018931'; UPDATE drug_concept_stage SET concept_name = 'Mustermann' WHERE concept_code = 'OMOP900061'; UPDATE drug_concept_stage SET concept_name = 'mv-Pharma' WHERE concept_code = 'OMOP899956'; UPDATE drug_concept_stage SET concept_name = 'Mycare' WHERE concept_code = 'OMOP898371'; UPDATE drug_concept_stage SET concept_name = 'Nabisco' WHERE concept_code = 'OMOP1018809'; UPDATE drug_concept_stage SET concept_name = 'Nadeau' WHERE concept_code = 'OMOP1019016'; UPDATE drug_concept_stage SET concept_name = 'Natali' WHERE concept_code = 'OMOP1018815'; UPDATE drug_concept_stage SET concept_name = 'Natural Factors' WHERE concept_code = 'OMOP1018823'; UPDATE drug_concept_stage SET concept_name = 'Naturasanitas' WHERE concept_code = 'OMOP897530'; UPDATE drug_concept_stage SET concept_name = 'Nature"s Sunshine' WHERE concept_code = 'OMOP1018834'; UPDATE drug_concept_stage SET concept_name = 'Negma' WHERE concept_code = 'OMOP440260'; UPDATE drug_concept_stage SET concept_name = 'Neitum' WHERE concept_code = 'OMOP440140'; UPDATE drug_concept_stage SET concept_name = 'NEL' WHERE concept_code = 'OMOP897935'; UPDATE drug_concept_stage SET concept_name = 'Neogen' WHERE concept_code = 'OMOP899630'; UPDATE drug_concept_stage SET concept_name = 'Nepenthes' WHERE concept_code = 'OMOP440152'; UPDATE drug_concept_stage SET concept_name = 'Nephro Medica' WHERE concept_code = 'OMOP899462'; UPDATE drug_concept_stage SET concept_name = 'Nestle' WHERE concept_code = 'OMOP339543'; UPDATE drug_concept_stage SET concept_name = 'New Era' WHERE concept_code = 'OMOP1018847'; UPDATE drug_concept_stage SET concept_name = 'New Life' WHERE concept_code = 'OMOP1018848'; UPDATE drug_concept_stage SET concept_name = 'Newline' WHERE concept_code = 'OMOP897567'; UPDATE drug_concept_stage SET concept_name = 'Nibelungen-Apotheke Andreas Hammer' WHERE concept_code = 'OMOP898834'; UPDATE drug_concept_stage SET concept_name = 'NM Vital Apotheke' WHERE concept_code = 'OMOP898060'; UPDATE drug_concept_stage SET concept_name = 'Nobel' WHERE concept_code = 'OMOP1018857'; UPDATE drug_concept_stage SET concept_name = 'Norit' WHERE concept_code = 'OMOP898029'; UPDATE drug_concept_stage SET concept_name = 'Normon' WHERE concept_code = 'OMOP899802'; UPDATE drug_concept_stage SET concept_name = 'Norwood' WHERE concept_code = 'OMOP1018873'; UPDATE drug_concept_stage SET concept_name = 'Novesia' WHERE concept_code = 'OMOP899980'; UPDATE drug_concept_stage SET concept_name = 'Nuron Biotech' WHERE concept_code = 'OMOP1019368'; UPDATE drug_concept_stage SET concept_name = 'Nutra' WHERE concept_code = 'OMOP1019370'; UPDATE drug_concept_stage SET concept_name = 'Nutri' WHERE concept_code = 'OMOP440158'; UPDATE drug_concept_stage SET concept_name = 'Nutri-Chem' WHERE concept_code = 'OMOP1019396'; UPDATE drug_concept_stage SET concept_name = 'Nutri-Dyn' WHERE concept_code = 'OMOP1019398'; UPDATE drug_concept_stage SET concept_name = 'Nutrimedika' WHERE concept_code = 'OMOP1019406'; UPDATE drug_concept_stage SET concept_name = 'Nutrivac' WHERE concept_code = 'OMOP1019415'; UPDATE drug_concept_stage SET concept_name = 'Nuvo' WHERE concept_code = 'OMOP900311'; UPDATE drug_concept_stage SET concept_name = 'Obagi' WHERE concept_code = 'OMOP1019426'; UPDATE drug_concept_stage SET concept_name = 'Olympia-Apothekecha Strehmel' WHERE concept_code = 'OMOP898118'; UPDATE drug_concept_stage SET concept_name = 'Omrix' WHERE concept_code = 'OMOP440069'; UPDATE drug_concept_stage SET concept_name = 'Opti' WHERE concept_code = 'OMOP2018726'; UPDATE drug_concept_stage SET concept_name = 'Organika' WHERE concept_code = 'OMOP1019417'; UPDATE drug_concept_stage SET concept_name = 'Orpha Devel' WHERE concept_code = 'OMOP440321'; UPDATE drug_concept_stage SET concept_name = 'Oshawa Group' WHERE concept_code = 'OMOP1019678'; UPDATE drug_concept_stage SET concept_name = 'Osterholz' WHERE concept_code = 'OMOP897556'; UPDATE drug_concept_stage SET concept_name = 'P.T. New Tombak' WHERE concept_code = 'OMOP1019462'; UPDATE drug_concept_stage SET concept_name = 'Paladin' WHERE concept_code = 'OMOP338178'; UPDATE drug_concept_stage SET concept_name = 'Panacea Biotec' WHERE concept_code = 'OMOP899217'; UPDATE drug_concept_stage SET concept_name = 'Parall' WHERE concept_code = 'OMOP1019356'; UPDATE drug_concept_stage SET concept_name = 'Parfums Parquet' WHERE concept_code = 'OMOP1019376'; UPDATE drug_concept_stage SET concept_name = 'Parthenon' WHERE concept_code = 'OMOP1019679'; UPDATE drug_concept_stage SET concept_name = 'Pascoe' WHERE concept_code = 'OMOP899450'; UPDATE drug_concept_stage SET concept_name = 'Pasteur Apotheke Barbara Henkel' WHERE concept_code = 'OMOP899835'; UPDATE drug_concept_stage SET concept_name = 'Patroklus Apotheke Dr F Tenbieg' WHERE concept_code = 'OMOP898248'; UPDATE drug_concept_stage SET concept_name = 'Paul Cors' WHERE concept_code = 'OMOP900244'; UPDATE drug_concept_stage SET concept_name = 'Paulus Apotheke' WHERE concept_code = 'OMOP897617'; UPDATE drug_concept_stage SET concept_name = 'PE' WHERE concept_code = 'OMOP2018766'; UPDATE drug_concept_stage SET concept_name = 'Performance' WHERE concept_code = 'OMOP1019464'; UPDATE drug_concept_stage SET concept_name = 'Pern' WHERE concept_code = 'OMOP339504'; UPDATE drug_concept_stage SET concept_name = 'Pfingstweide-Apotheke Juergen Duerrwang' WHERE concept_code = 'OMOP899590'; UPDATE drug_concept_stage SET concept_name = 'Pharma Aktiva-Bitte Nicht Zum Codieren Verwenden ' WHERE concept_code = 'OMOP897536'; UPDATE drug_concept_stage SET concept_name = 'Pharma Aldenhoven' WHERE concept_code = 'OMOP900158'; UPDATE drug_concept_stage SET concept_name = 'Pharmacal' WHERE concept_code = 'OMOP1019475'; UPDATE drug_concept_stage SET concept_name = 'Pharmaceuticals Sales & Development' WHERE concept_code = 'OMOP897889'; UPDATE drug_concept_stage SET concept_name = 'Pharmachemie' WHERE concept_code = 'OMOP897460'; UPDATE drug_concept_stage SET concept_name = 'Pharmacie Centrale Des Armees' WHERE concept_code = 'OMOP440167'; UPDATE drug_concept_stage SET concept_name = 'Pharmafrid' WHERE concept_code = 'OMOP900134'; UPDATE drug_concept_stage SET concept_name = 'Pharmaki' WHERE concept_code = 'OMOP440339'; UPDATE drug_concept_stage SET concept_name = 'Pharmaselect' WHERE concept_code = 'OMOP440121'; UPDATE drug_concept_stage SET concept_name = 'Pharmaswiss' WHERE concept_code = 'OMOP440436'; UPDATE drug_concept_stage SET concept_name = 'Pharmtek' WHERE concept_code = 'OMOP1019034'; UPDATE drug_concept_stage SET concept_name = 'Pharos-Oriented' WHERE concept_code = 'OMOP899703'; UPDATE drug_concept_stage SET concept_name = 'Phytocon' WHERE concept_code = 'OMOP898049'; UPDATE drug_concept_stage SET concept_name = 'Pierre Rolland' WHERE concept_code = 'OMOP440166'; UPDATE drug_concept_stage SET concept_name = 'Pittsburgh Plastics' WHERE concept_code = 'OMOP1019389'; UPDATE drug_concept_stage SET concept_name = 'PKH' WHERE concept_code = 'OMOP899320'; UPDATE drug_concept_stage SET concept_name = 'Plosspharma' WHERE concept_code = 'OMOP897465'; UPDATE drug_concept_stage SET concept_name = 'PNS' WHERE concept_code = 'OMOP1019310'; UPDATE drug_concept_stage SET concept_name = 'Preval' WHERE concept_code = 'OMOP1019290'; UPDATE drug_concept_stage SET concept_name = 'Prime' WHERE concept_code = 'OMOP1019297'; UPDATE drug_concept_stage SET concept_name = 'Pro Med' WHERE concept_code = 'OMOP439851'; UPDATE drug_concept_stage SET concept_name = 'Proactiv' WHERE concept_code = 'OMOP1019680'; UPDATE drug_concept_stage SET concept_name = 'ProCura hymed' WHERE concept_code = 'OMOP898572'; UPDATE drug_concept_stage SET concept_name = 'Prodeal' WHERE concept_code = 'OMOP1019061'; UPDATE drug_concept_stage SET concept_name = 'Prodene Klint' WHERE concept_code = 'OMOP1019035'; UPDATE drug_concept_stage SET concept_name = 'Produits Francais' WHERE concept_code = 'OMOP1019330'; UPDATE drug_concept_stage SET concept_name = 'Produits Sani Professionel' WHERE concept_code = 'OMOP1019334'; UPDATE drug_concept_stage SET concept_name = 'Pronova' WHERE concept_code = 'OMOP439878'; UPDATE drug_concept_stage SET concept_name = 'Protina' WHERE concept_code = 'OMOP900424'; UPDATE drug_concept_stage SET concept_name = 'PS' WHERE concept_code = 'OMOP900282'; UPDATE drug_concept_stage SET concept_name = 'Purity Life' WHERE concept_code = 'OMOP1019294'; UPDATE drug_concept_stage SET concept_name = 'QD' WHERE concept_code = 'OMOP1019300'; UPDATE drug_concept_stage SET concept_name = 'Quigley' WHERE concept_code = 'OMOP1019681'; UPDATE drug_concept_stage SET concept_name = 'Quintessenz' WHERE concept_code = 'OMOP2018792'; UPDATE drug_concept_stage SET concept_name = 'Quisisana' WHERE concept_code = 'OMOP900114'; UPDATE drug_concept_stage SET concept_name = 'R.I.S.' WHERE concept_code = 'OMOP338280'; UPDATE drug_concept_stage SET concept_name = 'Rafarm' WHERE concept_code = 'OMOP900201'; UPDATE drug_concept_stage SET concept_name = 'Ramprie' WHERE concept_code = 'OMOP572413'; UPDATE drug_concept_stage SET concept_name = 'Rapidscan' WHERE concept_code = 'OMOP338461'; UPDATE drug_concept_stage SET concept_name = 'Ratingsee-Apotheke M Roth' WHERE concept_code = 'OMOP898258'; UPDATE drug_concept_stage SET concept_name = 'Ravensberg' WHERE concept_code = 'OMOP898541'; UPDATE drug_concept_stage SET concept_name = 'Redken' WHERE concept_code = 'OMOP1019342'; UPDATE drug_concept_stage SET concept_name = 'Regent' WHERE concept_code = 'OMOP439892'; UPDATE drug_concept_stage SET concept_name = 'Regime' WHERE concept_code = 'OMOP1019346'; UPDATE drug_concept_stage SET concept_name = 'Repha' WHERE concept_code = 'OMOP899520'; UPDATE drug_concept_stage SET concept_name = 'Reusch' WHERE concept_code = 'OMOP2018744'; UPDATE drug_concept_stage SET concept_name = 'RMC' WHERE concept_code = 'OMOP1019260'; UPDATE drug_concept_stage SET concept_name = 'Robugen' WHERE concept_code = 'OMOP899282'; UPDATE drug_concept_stage SET concept_name = 'Ronneburg-Apotheke Peter Frank' WHERE concept_code = 'OMOP899569'; UPDATE drug_concept_stage SET concept_name = 'Root' WHERE concept_code = 'OMOP1019276'; UPDATE drug_concept_stage SET concept_name = 'Rotexmedica' WHERE concept_code = 'OMOP898924'; UPDATE drug_concept_stage SET concept_name = 'Roth' WHERE concept_code = 'OMOP900155'; UPDATE drug_concept_stage SET concept_name = 'Rotop' WHERE concept_code = 'OMOP440342'; UPDATE drug_concept_stage SET concept_name = 'Rowa-Wagner' WHERE concept_code = 'OMOP899494'; UPDATE drug_concept_stage SET concept_name = 'RW' WHERE concept_code = 'OMOP1019277'; UPDATE drug_concept_stage SET concept_name = 'S.C. Polipharma' WHERE concept_code = 'OMOP900313'; UPDATE drug_concept_stage SET concept_name = 'S+H' WHERE concept_code = 'OMOP2018796'; UPDATE drug_concept_stage SET concept_name = 'Saale-Apotheke Kaulsdorf Uta Seitz' WHERE concept_code = 'OMOP897505'; UPDATE drug_concept_stage SET concept_name = 'Safetex' WHERE concept_code = 'OMOP1019271'; UPDATE drug_concept_stage SET concept_name = 'Sage' WHERE concept_code = 'OMOP899924'; UPDATE drug_concept_stage SET concept_name = 'Salzach Apotheke' WHERE concept_code = 'OMOP899550'; UPDATE drug_concept_stage SET concept_name = 'Saneca' WHERE concept_code = 'OMOP897305'; UPDATE drug_concept_stage SET concept_name = 'Sanesco' WHERE concept_code = 'OMOP899955'; UPDATE drug_concept_stage SET concept_name = 'Sanis' WHERE concept_code = 'OMOP1019745'; UPDATE drug_concept_stage SET concept_name = 'Sano' WHERE concept_code = 'OMOP899855'; UPDATE drug_concept_stage SET concept_name = 'Sanorell' WHERE concept_code = 'OMOP897707'; UPDATE drug_concept_stage SET concept_name = 'SantГ© Nature' WHERE concept_code = 'OMOP1019201'; UPDATE drug_concept_stage SET concept_name = 'SantГ© Naturelle' WHERE concept_code = 'OMOP1019751'; UPDATE drug_concept_stage SET concept_name = 'Sanum Kehlbeck' WHERE concept_code = 'OMOP900302'; UPDATE drug_concept_stage SET concept_name = 'Saraya' WHERE concept_code = 'OMOP898032'; UPDATE drug_concept_stage SET concept_name = 'SBS' WHERE concept_code = 'OMOP1019770'; UPDATE drug_concept_stage SET concept_name = 'SC Infomed Fluids' WHERE concept_code = 'OMOP900168'; UPDATE drug_concept_stage SET concept_name = 'Schaper & Bruemmer' WHERE concept_code = 'OMOP900288'; UPDATE drug_concept_stage SET concept_name = 'Scholl' WHERE concept_code = 'OMOP337824'; UPDATE drug_concept_stage SET concept_name = 'Schubert-Apotheke Dr Matthias Oechsner' WHERE concept_code = 'OMOP898434'; UPDATE drug_concept_stage SET concept_name = 'Schuck' WHERE concept_code = 'OMOP899844'; UPDATE drug_concept_stage SET concept_name = 'Schumann Apotheke Nadya Hannoudi' WHERE concept_code = 'OMOP899671'; UPDATE drug_concept_stage SET concept_name = 'Schur' WHERE concept_code = 'OMOP898177'; UPDATE drug_concept_stage SET concept_name = 'Schwarzhaupt' WHERE concept_code = 'OMOP899460'; UPDATE drug_concept_stage SET concept_name = 'Schwoerer' WHERE concept_code = 'OMOP899276'; UPDATE drug_concept_stage SET concept_name = 'Searle' WHERE concept_code = 'OMOP1019796'; UPDATE drug_concept_stage SET concept_name = 'Semmelweis-Apotheke Brigitte Rump' WHERE concept_code = 'OMOP899686'; UPDATE drug_concept_stage SET concept_name = 'SFDB' WHERE concept_code = 'OMOP440049'; UPDATE drug_concept_stage SET concept_name = 'Siemens' WHERE concept_code = 'OMOP338512'; UPDATE drug_concept_stage SET concept_name = 'Sintetica' WHERE concept_code = 'OMOP337930'; UPDATE drug_concept_stage SET concept_name = 'Sisir Gupta' WHERE concept_code = 'OMOP899317'; UPDATE drug_concept_stage SET concept_name = 'Sivem' WHERE concept_code = 'OMOP1019753'; UPDATE drug_concept_stage SET concept_name = 'Smiths ASD' WHERE concept_code = 'OMOP1019784'; UPDATE drug_concept_stage SET concept_name = 'Solar Cosmetic' WHERE concept_code = 'OMOP1019685'; UPDATE drug_concept_stage SET concept_name = 'Solgar' WHERE concept_code = 'OMOP337880'; UPDATE drug_concept_stage SET concept_name = 'Somex' WHERE concept_code = 'OMOP338743'; UPDATE drug_concept_stage SET concept_name = 'Sopherion' WHERE concept_code = 'OMOP1019696'; UPDATE drug_concept_stage SET concept_name = 'Source Of Life' WHERE concept_code = 'OMOP1019716'; UPDATE drug_concept_stage SET concept_name = 'Speciality' WHERE concept_code = 'OMOP339172'; UPDATE drug_concept_stage SET concept_name = 'Spitzweg-Apotheke Gertrud Heim' WHERE concept_code = 'OMOP898702'; UPDATE drug_concept_stage SET concept_name = 'Sportscience' WHERE concept_code = 'OMOP1019723'; UPDATE drug_concept_stage SET concept_name = 'Sprakita' WHERE concept_code = 'OMOP1019732'; UPDATE drug_concept_stage SET concept_name = 'SRH Zentralklinikum Suhl' WHERE concept_code = 'OMOP900042'; UPDATE drug_concept_stage SET concept_name = 'St Antonius-Apotheke Hans Tauber' WHERE concept_code = 'OMOP899594'; UPDATE drug_concept_stage SET concept_name = 'St Johanser Naturmittel' WHERE concept_code = 'OMOP898201'; UPDATE drug_concept_stage SET concept_name = 'Stadtbruecken-Apotheke Swetlana Koslowski' WHERE concept_code = 'OMOP900233'; UPDATE drug_concept_stage SET concept_name = 'Steierl' WHERE concept_code = 'OMOP898852'; UPDATE drug_concept_stage SET concept_name = 'Sterigen' WHERE concept_code = 'OMOP1019036'; UPDATE drug_concept_stage SET concept_name = 'Stroschein' WHERE concept_code = 'OMOP2018745'; UPDATE drug_concept_stage SET concept_name = 'Stulln' WHERE concept_code = 'OMOP897905'; UPDATE drug_concept_stage SET concept_name = 'Summerberry' WHERE concept_code = 'OMOP1019720'; UPDATE drug_concept_stage SET concept_name = 'Sunlife' WHERE concept_code = 'OMOP899993'; UPDATE drug_concept_stage SET concept_name = 'Sun-Rype' WHERE concept_code = 'OMOP1019725'; UPDATE drug_concept_stage SET concept_name = 'Super Diet' WHERE concept_code = 'OMOP440189'; UPDATE drug_concept_stage SET concept_name = 'Superieures Solutions' WHERE concept_code = 'OMOP1019741'; UPDATE drug_concept_stage SET concept_name = 'Syxyl' WHERE concept_code = 'OMOP900097'; UPDATE drug_concept_stage SET concept_name = 'Talecris' WHERE concept_code = 'OMOP1019633'; UPDATE drug_concept_stage SET concept_name = 'Tanning' WHERE concept_code = 'OMOP1019634'; UPDATE drug_concept_stage SET concept_name = 'Taoasis Natur' WHERE concept_code = 'OMOP898523'; UPDATE drug_concept_stage SET concept_name = 'Thermyc' WHERE concept_code = 'OMOP1019025'; UPDATE drug_concept_stage SET concept_name = 'Thorne' WHERE concept_code = 'OMOP1019663'; UPDATE drug_concept_stage SET concept_name = 'Tianshi' WHERE concept_code = 'OMOP1019671'; UPDATE drug_concept_stage SET concept_name = 'Titus-Apotheke Dr Roland Herbst' WHERE concept_code = 'OMOP898287'; UPDATE drug_concept_stage SET concept_name = 'Togal-Werk' WHERE concept_code = 'OMOP897840'; UPDATE drug_concept_stage SET concept_name = 'Topfit' WHERE concept_code = 'OMOP338256'; UPDATE drug_concept_stage SET concept_name = 'TP' WHERE concept_code = 'OMOP1019582'; UPDATE drug_concept_stage SET concept_name = 'Trafalgar' WHERE concept_code = 'OMOP1019585'; UPDATE drug_concept_stage SET concept_name = 'Trans' WHERE concept_code = 'OMOP1019598'; UPDATE drug_concept_stage SET concept_name = 'Trianon' WHERE concept_code = 'OMOP1019037'; UPDATE drug_concept_stage SET concept_name = 'Trillium' WHERE concept_code = 'OMOP1019509'; UPDATE drug_concept_stage SET concept_name = 'Tyczka' WHERE concept_code = 'OMOP898552'; UPDATE drug_concept_stage SET concept_name = 'Tyler' WHERE concept_code = 'OMOP1019568'; UPDATE drug_concept_stage SET concept_name = 'Ultra-Love' WHERE concept_code = 'OMOP1019573'; UPDATE drug_concept_stage SET concept_name = 'Ultrapac' WHERE concept_code = 'OMOP1019062'; UPDATE drug_concept_stage SET concept_name = 'Uni- Kleon Tsetis' WHERE concept_code = 'OMOP899250'; UPDATE drug_concept_stage SET concept_name = 'Unichem' WHERE concept_code = 'OMOP899523'; UPDATE drug_concept_stage SET concept_name = 'Unimark Remedies' WHERE concept_code = 'OMOP897723'; UPDATE drug_concept_stage SET concept_name = 'Unither' WHERE concept_code = 'OMOP440370'; UPDATE drug_concept_stage SET concept_name = 'Valda' WHERE concept_code = 'OMOP1019044'; UPDATE drug_concept_stage SET concept_name = 'Valmo' WHERE concept_code = 'OMOP1019017'; UPDATE drug_concept_stage SET concept_name = 'Velvian' WHERE concept_code = 'OMOP440177'; UPDATE drug_concept_stage SET concept_name = 'Vemedia' WHERE concept_code = 'OMOP900102'; UPDATE drug_concept_stage SET concept_name = 'Vitalia' WHERE concept_code = 'OMOP900410'; UPDATE drug_concept_stage SET concept_name = 'Vitavie Au Naturel' WHERE concept_code = 'OMOP1019605'; UPDATE drug_concept_stage SET concept_name = 'Vocate' WHERE concept_code = 'OMOP897604'; UPDATE drug_concept_stage SET concept_name = 'W.H. Werk' WHERE concept_code = 'OMOP2018900'; UPDATE drug_concept_stage SET concept_name = 'Walter Ritter' WHERE concept_code = 'OMOP897988'; UPDATE drug_concept_stage SET concept_name = 'Wampole' WHERE concept_code = 'OMOP1019503'; UPDATE drug_concept_stage SET concept_name = 'Wappen' WHERE concept_code = 'OMOP2018892'; UPDATE drug_concept_stage SET concept_name = 'Weider' WHERE concept_code = 'OMOP1019513'; UPDATE drug_concept_stage SET concept_name = 'Welding' WHERE concept_code = 'OMOP899381'; UPDATE drug_concept_stage SET concept_name = 'Welfen-Apotheke Moritz Bringmann' WHERE concept_code = 'OMOP897921'; UPDATE drug_concept_stage SET concept_name = 'Welk' WHERE concept_code = 'OMOP2018747'; UPDATE drug_concept_stage SET concept_name = 'Wero- Werner Michallik' WHERE concept_code = 'OMOP898592'; UPDATE drug_concept_stage SET concept_name = 'Wes Pak' WHERE concept_code = 'OMOP1019519'; UPDATE drug_concept_stage SET concept_name = 'Wesergold' WHERE concept_code = 'OMOP897726'; UPDATE drug_concept_stage SET concept_name = 'West Chemical' WHERE concept_code = 'OMOP1019521'; UPDATE drug_concept_stage SET concept_name = 'Westfalen-Apotheke Hans-Peter Dasbach' WHERE concept_code = 'OMOP897552'; UPDATE drug_concept_stage SET concept_name = 'Wieb Pharm' WHERE concept_code = 'OMOP897433'; UPDATE drug_concept_stage SET concept_name = 'Wiedemann' WHERE concept_code = 'OMOP898936'; UPDATE drug_concept_stage SET concept_name = 'Wilhelm Horn' WHERE concept_code = 'OMOP898133'; UPDATE drug_concept_stage SET concept_name = 'WIN Medicare' WHERE concept_code = 'OMOP899745'; UPDATE drug_concept_stage SET concept_name = 'Wolf' WHERE concept_code = 'OMOP2018749'; UPDATE drug_concept_stage SET concept_name = 'Xo' WHERE concept_code = 'OMOP440101'; UPDATE drug_concept_stage SET concept_name = 'Yves Ponroy' WHERE concept_code = 'OMOP1018992'; UPDATE drug_concept_stage SET concept_name = 'Zep' WHERE concept_code = 'OMOP1019549'; END $_ $; UPDATE drug_concept_stage SET concept_name = initcap(concept_name) WHERE concept_code IN ( 'OMOP1019746', 'OMOP1140332', 'OMOP338156', 'OMOP339265', 'OMOP439864', 'OMOP439886', 'OMOP439966', 'OMOP440103', 'OMOP440239', 'OMOP440255', 'OMOP440361', 'OMOP440377', 'OMOP440390', 'OMOP440444', 'OMOP899887', 'OMOP897787', 'OMOP440036', 'OMOP440162', 'OMOP440311', 'OMOP440117', 'OMOP1140336', 'OMOP897922', 'OMOP440455', 'OMOP899299', 'OMOP1140328', 'OMOP899903', 'OMOP899517', 'OMOP2018490', 'OMOP440013', 'OMOP898959', 'OMOP897843', 'OMOP440087', 'OMOP440054', 'OMOP440424', 'OMOP900406', 'OMOP900170', 'OMOP897576', 'OMOP898690', 'OMOP899948', 'OMOP338526', 'OMOP898887', 'OMOP338667', 'OMOP898603', 'OMOP899663', 'OMOP897447', 'OMOP899827', 'OMOP897515', 'OMOP338334', 'OMOP440052', 'OMOP1018733', 'OMOP440380', 'OMOP898311', 'OMOP898655', 'OMOP338104', 'OMOP440289', 'OMOP440181', 'OMOP440146', 'OMOP898628', 'OMOP899289', 'OMOP439979', 'OMOP899432', 'OMOP1140327', 'OMOP898170', 'OMOP440051', 'OMOP440071', 'OMOP440348', 'OMOP900428', 'OMOP900167', 'OMOP899487', 'OMOP440402', 'OMOP900154', 'OMOP899825', 'OMOP897804', 'OMOP900318', 'OMOP440131', 'OMOP439987', 'OMOP900452', 'OMOP440012', 'OMOP440142', 'OMOP439963', 'OMOP897635', 'OMOP440043', 'OMOP900241', 'OMOP440416', 'OMOP338332', 'OMOP898096', 'OMOP899395', 'OMOP899245', 'OMOP899978', 'OMOP897647', 'OMOP1140335', 'OMOP899641', 'OMOP1140340', 'OMOP898152', 'OMOP440292', 'OMOP440068', 'OMOP898010', 'OMOP899764', 'OMOP900050', 'OMOP440233', 'OMOP440124', 'OMOP439970', 'OMOP899653', 'OMOP338039', 'OMOP899256', 'OMOP1018924', 'OMOP898373', 'OMOP440205', 'OMOP440063', 'OMOP439969', 'OMOP440250', 'OMOP898347', 'OMOP898814', 'OMOP440257', 'OMOP898428', 'OMOP439905', 'OMOP439845', 'OMOP440434', 'OMOP440053', 'OMOP898398', 'OMOP440224', 'OMOP338500', 'OMOP440297', 'OMOP440372', 'OMOP899611', 'OMOP899818', 'OMOP900469', 'OMOP439981', 'OMOP338651', 'OMOP440022', 'OMOP440284', 'OMOP899957', 'OMOP899007', 'OMOP898853', 'OMOP898589', 'OMOP898121', 'OMOP440449', 'OMOP440262', 'OMOP898698', 'OMOP900307', 'OMOP439920', 'OMOP440462', 'OMOP900109', 'OMOP898555', 'OMOP338556', 'OMOP899730', 'OMOP440473' ); UPDATE drug_concept_stage SET concept_name = upper(concept_name) WHERE concept_code IN ( 'OMOP440196', 'OMOP1018189', 'OMOP1019188', 'OMOP2018283', 'OMOP2018329', 'OMOP2018371', 'OMOP1018653', 'OMOP337858', 'OMOP2018480', 'OMOP338558', 'OMOP2018558', 'OMOP440033', 'OMOP898426', 'OMOP2018544', 'OMOP1019140', 'OMOP2018569', 'OMOP1019173', 'OMOP1019206', 'OMOP1019002', 'OMOP2018615', 'OMOP1018927', 'OMOP2018664', 'OMOP2018690', 'OMOP1019438', 'OMOP2018765', 'OMOP1019472', 'OMOP2018734', 'OMOP1019248', 'OMOP2018853' ); --ds_stage --fix quant homeopathy that is missing unit UPDATE ds_stage SET denominator_unit = 'mL' WHERE numerator_unit IN ( '[hp_X]', '[hp_C]' ) AND denominator_value IS NOT NULL AND denominator_unit IS NULL AND drug_concept_code IN ( SELECT concept_code FROM drug_concept_stage WHERE concept_name ~ '^\d+(\.\d+)? ML ' ); UPDATE ds_stage SET denominator_unit = 'mg' WHERE numerator_unit IN ( '[hp_X]', '[hp_C]' ) AND denominator_value IS NOT NULL AND denominator_unit IS NULL AND drug_concept_code IN ( SELECT concept_code FROM drug_concept_stage WHERE concept_name ~ '^\d+(\.\d+)? MG ' ); --fix wrong numerator calculation in homeopathy UPDATE ds_stage SET numerator_value = numerator_value / denominator_value WHERE numerator_unit IN ( '[hp_X]', '[hp_C]' ) AND denominator_value IS NOT NULL AND drug_concept_code IN ( SELECT drug_concept_code FROM ds_stage JOIN drug_concept_stage ON concept_code = drug_concept_code AND substring(concept_name, '\s(\d+)\s(X|C)\s')::FLOAT != numerator_value ); --fix gases UPDATE ds_stage SET denominator_value = NULL WHERE numerator_unit = '%' AND denominator_value IS NOT NULL; --need to somehow figure it out UPDATE ds_stage SET numerator_unit = '{cells}' -- M cells WHERE numerator_unit IS NULL AND amount_unit IS NULL AND drug_concept_code IN ( SELECT drug_concept_code FROM ds_stage JOIN drug_concept_stage ON concept_code = drug_concept_code AND concept_name ilike '%strain%' ); UPDATE ds_stage SET numerator_unit = '[hp_C]' WHERE numerator_unit IS NULL AND amount_unit IS NULL; --quant homeopathy shouldn't exist without denominator_value UPDATE ds_stage SET denominator_unit = NULL WHERE denominator_value IS NULL AND numerator_unit IN ( '[hp_X]', '[hp_C]' ); --Fix solid forms with denominator UPDATE ds_stage SET amount_unit = numerator_unit, amount_value = numerator_value, numerator_value = NULL, numerator_unit = NULL, denominator_value = NULL, denominator_unit = NULL WHERE drug_concept_code IN ( SELECT drug_concept_code FROM ds_stage WHERE numerator_unit IN ( '[hp_X]', '[hp_C]' ) ) AND drug_concept_code IN ( SELECT a.concept_code FROM drug_concept_stage a WHERE ( concept_name LIKE '%Tablet%' OR concept_name LIKE '%Capsule%' OR concept_name LIKE '%Suppositor%' OR concept_name LIKE '%Lozenge%' OR concept_name LIKE '%Pellet%' OR concept_name LIKE '%Granules%' OR concept_name LIKE '%Powder%' ) -- solid forms defined by their forms ); --also fixing those that are Components UPDATE ds_stage SET amount_unit = numerator_unit, amount_value = numerator_value, numerator_value = NULL, numerator_unit = NULL, denominator_value = NULL, denominator_unit = NULL WHERE drug_concept_code IN ( SELECT c2.concept_code FROM drug_strength JOIN concept c ON drug_concept_id = c.concept_id JOIN concept_ancestor ON drug_concept_id = descendant_concept_id JOIN concept c2 ON c2.concept_id = ancestor_concept_id AND c2.concept_class_id IN ( 'Clinical Drug Comp', 'Branded Drug Comp' ) WHERE numerator_unit_concept_id IN ( 9325, 9324 ) AND ( c.concept_name LIKE '%Tablet%' OR c.concept_name LIKE '%Capsule%' OR c.concept_name LIKE '%Suppositor%' OR c.concept_name LIKE '%Lozenge%' OR c.concept_name LIKE '%Pellet%' OR c.concept_name LIKE '%Granules%' OR c.concept_name LIKE '%Powder%' ) ); UPDATE ds_stage SET ingredient_concept_code = 'OMOP995215' WHERE ingredient_concept_code = 'OMOP1131419';--Acetarsol UPDATE ds_stage SET ingredient_concept_code = 'OMOP995215' WHERE ingredient_concept_code = 'OMOP1000382';--Bilastine UPDATE ds_stage SET ingredient_concept_code = '1895' WHERE ingredient_concept_code = 'OMOP2721034';--Calcium UPDATE ds_stage SET ingredient_concept_code = 'OMOP994745' WHERE ingredient_concept_code = 'OMOP1131501';--Camphene UPDATE ds_stage SET ingredient_concept_code = 'OMOP1001875' WHERE ingredient_concept_code = 'OMOP1131504';--Carbetocin UPDATE ds_stage SET ingredient_concept_code = 'OMOP998052' WHERE ingredient_concept_code = 'OMOP1131611';--manna UPDATE ds_stage SET ingredient_concept_code = 'OMOP991296' WHERE ingredient_concept_code = 'OMOP1131633';--Oxetacaine UPDATE ds_stage SET ingredient_concept_code = '8588' WHERE ingredient_concept_code = 'OMOP2721400';--Potassium UPDATE ds_stage SET ingredient_concept_code = 'OMOP1131662' WHERE ingredient_concept_code = 'OMOP997623';--Rupatadine Fumarate UPDATE ds_stage SET ingredient_concept_code = '9853' WHERE ingredient_concept_code = 'OMOP2721452';--Sodium UPDATE ds_stage SET ingredient_concept_code = 'OMOP1001157' WHERE ingredient_concept_code = 'OMOP1131687';--Stiripentol --IRS --insert missing ingredients INSERT INTO internal_relationship_stage ( concept_code_1, concept_code_2 ) SELECT concept_code, '4850' FROM drug_concept_stage WHERE concept_code NOT IN ( SELECT concept_code_1 FROM internal_relationship_stage JOIN drug_concept_stage ON concept_code_2 = concept_code AND concept_class_id = 'Ingredient' ) AND concept_code NOT IN ( SELECT pack_concept_code FROM pc_stage ) AND concept_class_id = 'Drug Product' AND concept_name LIKE '%Glucose%'; INSERT INTO internal_relationship_stage ( concept_code_1, concept_code_2 ) SELECT concept_code, '9853' FROM drug_concept_stage WHERE concept_code NOT IN ( SELECT concept_code_1 FROM internal_relationship_stage JOIN drug_concept_stage ON concept_code_2 = concept_code AND concept_class_id = 'Ingredient' ) AND concept_code NOT IN ( SELECT pack_concept_code FROM pc_stage ) AND concept_class_id = 'Drug Product' AND concept_name LIKE '%Sodium%'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP995215' WHERE concept_code_2 = 'OMOP1131419';--Acetarsol UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP995215' WHERE concept_code_2 = 'OMOP1000382';--Bilastine UPDATE internal_relationship_stage SET concept_code_2 = '1895' WHERE concept_code_2 = 'OMOP2721034';--Calcium UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP994745' WHERE concept_code_2 = 'OMOP1131501';--Camphene UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1001875' WHERE concept_code_2 = 'OMOP1131504';--Carbetocin UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP998052' WHERE concept_code_2 = 'OMOP1131611';--manna UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP991296' WHERE concept_code_2 = 'OMOP1131633';--Oxetacaine UPDATE internal_relationship_stage SET concept_code_2 = '8588' WHERE concept_code_2 = 'OMOP2721400';--Potassium UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1131662' WHERE concept_code_2 = 'OMOP997623';--Rupatadine Fumarate UPDATE internal_relationship_stage SET concept_code_2 = '9853' WHERE concept_code_2 = 'OMOP2721452';--Sodium UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1001157' WHERE concept_code_2 = 'OMOP1131687';--Stiripentol -- change drug form to gas UPDATE internal_relationship_stage SET concept_code_2 = '316999' WHERE concept_code_2 = '346161' AND concept_code_1 IN ( SELECT concept_code FROM drug_concept_stage WHERE concept_name ~ 'ML.*%.*Inhalant Solution' ); --all the supplier work DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( SELECT a.concept_code FROM drug_concept_stage a JOIN drug_concept_stage b ON a.concept_name = b.concept_name AND a.concept_class_id = 'Brand Name' AND b.concept_class_id IN ( 'Supplier', 'Ingredient' ) ); DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( SELECT concept_code FROM drug_concept_stage WHERE concept_class_id = 'Supplier' AND concept_name LIKE '%Imported%' ); DELETE FROM relationship_to_concept WHERE concept_code_1 IN ( SELECT concept_code FROM drug_concept_stage WHERE concept_class_id = 'Supplier' AND concept_name LIKE '%Imported%' ); DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( SELECT dcs.concept_code FROM drug_concept_stage dcs JOIN concept c ON lower(dcs.concept_name) = lower(c.concept_name) AND c.vocabulary_id = 'RxNorm' AND dcs.concept_class_id = 'Brand Name' AND c.concept_class_id = 'Ingredient' ); --real BN DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( SELECT concept_code FROM drug_concept_stage WHERE concept_name IN ( 'Ultracare', 'Ultrabalance', 'Tussin', 'Triad', 'Aplicare', 'Lactaid' ) AND concept_class_id = 'Supplier' ); --semi-manual UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1017600' WHERE concept_code_2 = 'OMOP1017607'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1017607'; UPDATE internal_relationship_stage SET concept_code_2 = '220323' WHERE concept_code_2 = 'OMOP1016513'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1016513'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1018323' WHERE concept_code_2 = 'OMOP1018324'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1018324'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP440130' WHERE concept_code_2 = 'OMOP1018429'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1018429'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1018685' WHERE concept_code_2 = 'OMOP1018686'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1018686'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP572515' WHERE concept_code_2 = 'OMOP1018691'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1018691'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP339439' WHERE concept_code_2 = 'OMOP338286'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP338286'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP338031' WHERE concept_code_2 = 'OMOP1018618'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1018618'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP440349' WHERE concept_code_2 = 'OMOP440208'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP440208'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1019137' WHERE concept_code_2 = 'OMOP1019138'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019138'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP440416' WHERE concept_code_2 = 'OMOP440408'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP440408'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP440149' WHERE concept_code_2 = 'OMOP1019102'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019102'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP897383' WHERE concept_code_2 = 'OMOP897539'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP897539'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1018819' WHERE concept_code_2 = 'OMOP2018692'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP2018692'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP337929' WHERE concept_code_2 = 'OMOP1019418'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019418'; DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( 'OMOP2018741', 'OMOP440362' ); DELETE FROM drug_concept_stage WHERE concept_code IN ( 'OMOP2018741', 'OMOP440362' ); UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP897860' WHERE concept_code_2 = 'OMOP1019590'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019590'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP339047' WHERE concept_code_2 = 'OMOP1019539'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019539'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1017600' WHERE concept_code_2 = 'OMOP1017607'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1017607'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP440424' WHERE concept_code_2 = 'OMOP339350'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP339350'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP440068' WHERE concept_code_2 = 'OMOP337877'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP337877'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP898387' WHERE concept_code_2 = 'OMOP898911'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP898911'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP439969' WHERE concept_code_2 = 'OMOP337870'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP337870'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1019538' WHERE concept_code_2 = 'OMOP338727'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP338727'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP439969' WHERE concept_code_2 = 'OMOP337870'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP337870'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP339321' WHERE concept_code_2 IN ( 'OMOP1018727', 'OMOP440341' ); DELETE FROM drug_concept_stage WHERE concept_code IN ( 'OMOP1018727', 'OMOP440341' ); UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1018327' WHERE concept_code_2 = 'OMOP338814'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP338814'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP337838' WHERE concept_code_2 = 'OMOP1019712'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019712'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP338930' WHERE concept_code_2 = 'OMOP440306'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP440306'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP339321' WHERE concept_code_2 IN ('OMOP897524'); DELETE FROM drug_concept_stage WHERE concept_code IN ('OMOP897524'); --fix packs INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) SELECT c2.concept_code, c.concept_code, CASE WHEN c2.concept_name LIKE '%24%' THEN 4 ELSE 7 END FROM concept c JOIN concept_relationship cr ON c.concept_id = concept_id_1 AND cr.relationship_id = 'Has brand name' AND cr.invalid_reason IS NULL JOIN concept_relationship cr2 ON cr.concept_id_2 = cr2.concept_id_1 AND cr2.relationship_id = 'Has brand name' AND cr.invalid_reason IS NULL JOIN concept c2 ON c2.concept_id = cr2.concept_id_2 AND c2.vocabulary_id = 'RxNorm Extension' WHERE c.concept_name LIKE 'Inert%' AND c.vocabulary_id = 'RxNorm Extension' AND c.concept_class_id = 'Branded Drug Form' AND c2.concept_code IN ( SELECT pack_concept_code FROM pc_stage ); --somehow active pack_comp has amount=7 instead of 21 UPDATE pc_stage SET amount = 21 WHERE pack_concept_code IN ( 'OMOP573433', 'OMOP573537', 'OMOP573357', 'OMOP573533', 'OMOP572820', 'OMOP573009', 'OMOP1131307', 'OMOP1131349', 'OMOP1131350' ) AND drug_concept_code != '748796'; --Linessa 28 INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP1131349', '748796', 7 ); INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP573433', '748796', 7 ); INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP573537', '748796', 7 ); INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP573357', '748796', 7 ); INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP1131350', '748796', 7 ); INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP573533', '748796', 7 ); INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP1131307', '748796', 7 ); INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP572820', '748796', 7 ); INSERT INTO pc_stage ( pack_concept_code, drug_concept_code, amount ) VALUES ( 'OMOP573009', '748796', 7 ); --RTC DELETE FROM relationship_to_concept WHERE concept_code_1 IN ( SELECT dcs.concept_code FROM drug_concept_stage dcs JOIN concept c ON lower(dcs.concept_name) = lower(c.concept_name) AND c.vocabulary_id = 'RxNorm' AND c.invalid_reason IS NULL AND dcs.concept_class_id = 'Brand Name' AND c.concept_class_id = 'Brand Name' AND dcs.concept_code != c.concept_code ); INSERT INTO relationship_to_concept ( concept_code_1, vocabulary_id_1, concept_id_2, precedence ) SELECT dcs.concept_code, 'Rxfix', c.concept_id, 1 FROM drug_concept_stage dcs JOIN concept c ON lower(dcs.concept_name) = lower(c.concept_name) AND c.vocabulary_id = 'RxNorm' AND c.invalid_reason IS NULL AND dcs.concept_class_id = 'Brand Name' AND c.concept_class_id = 'Brand Name' AND dcs.concept_code != c.concept_code;; UPDATE relationship_to_concept SET concept_id_2 = 19089602 WHERE concept_code_1 = 'OMOP1004367'; UPDATE relationship_to_concept SET concept_id_2 = 1539954 WHERE concept_code_1 = 'OMOP1131570'; UPDATE relationship_to_concept SET concept_id_2 = 1505346 WHERE concept_code_1 = 'OMOP1000349'; UPDATE relationship_to_concept --inj susp SET concept_id_2 = 19082260 WHERE concept_code_1 = 'OMOP1007430'; UPDATE relationship_to_concept --Intravenous Suspension SET concept_id_2 = 19095915 WHERE concept_code_1 = 'OMOP1007431'; UPDATE relationship_to_concept SET concept_id_2 = 19082198 --Rectal Powder WHERE concept_code_1 = 'OMOP1007432'; --ingredients UPDATE RELATIONSHIP_TO_CONCEPT SET concept_id_2 = 35604657 WHERE concept_code_1 = 'OMOP1131431'; UPDATE relationship_to_concept SET concept_id_2 = 43532537 WHERE concept_code_1 = 'OMOP1005778'; UPDATE relationship_to_concept SET concept_id_2 = 44784806 WHERE concept_code_1 = 'OMOP997397'; UPDATE relationship_to_concept SET concept_id_2 = 1352213 WHERE concept_code_1 = 'OMOP2721447'; UPDATE relationship_to_concept SET concept_id_2 = 1505346 WHERE concept_code_1 = 'OMOP1000349'; UPDATE relationship_to_concept SET concept_id_2 = 19137312 WHERE concept_code_1 = 'OMOP2721489'; UPDATE relationship_to_concept SET concept_id_2 = 46221433 WHERE concept_code_1 = 'OMOP1131599'; UPDATE relationship_to_concept SET concept_id_2 = 1539954 WHERE concept_code_1 = 'OMOP1131570'; UPDATE relationship_to_concept SET concept_id_2 = 35605804 WHERE concept_code_1 = 'OMOP1131529'; UPDATE relationship_to_concept SET concept_id_2 = 35604657 WHERE concept_code_1 = 'OMOP1131431'; UPDATE relationship_to_concept SET concept_id_2 = 42903942 WHERE concept_code_1 = 'OMOP2721481'; --additional suppl work DROP TABLE IF EXISTS irs_suppl; CREATE TABLE irs_suppl AS SELECT irs.concept_code_1, CASE WHEN s.concept_code_2 IS NOT NULL THEN s.concept_code_2 ELSE irs.concept_code_2 END AS concept_code_2 FROM internal_relationship_stage irs LEFT JOIN suppliers_to_repl s ON s.concept_code_1 = irs.concept_code_2; TRUNCATE TABLE internal_relationship_stage; INSERT INTO internal_relationship_stage ( concept_code_1, concept_code_2 ) SELECT DISTINCT concept_code_1, concept_code_2 FROM irs_suppl; --Suppl+BN DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( SELECT b.concept_code FROM drug_concept_stage a JOIN drug_concept_stage b ON lower(a.concept_name) = lower(b.concept_name) AND a.concept_class_id = 'Supplier' AND b.concept_class_id = 'Brand Name' ) AND concept_code_2 NOT IN ( 'OMOP881621', 'OMOP335576' ) AND concept_code_2 LIKE '%OMOP%'; DELETE FROM drug_concept_stage WHERE concept_code IN ( SELECT b.concept_code FROM drug_concept_stage a JOIN drug_concept_stage b ON lower(a.concept_name) = lower(b.concept_name) AND a.concept_class_id = 'Supplier' AND b.concept_class_id = 'Brand Name' ) AND concept_code NOT IN ( 'OMOP881621', 'OMOP335576' ) AND concept_code LIKE '%OMOP%'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP1018666' --DEl WHERE concept_code_2 = 'OMOP1018667'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1018667'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP440135' WHERE concept_code_2 = 'OMOP440228'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP440228'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP897860' --menarini WHERE concept_code_2 = 'OMOP1019590'; DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019590'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP439865' WHERE concept_code_2 = 'OMOP1019692';--servier DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019692'; UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP337896' WHERE concept_code_2 = 'OMOP1019636';--Taro DELETE FROM drug_concept_stage WHERE concept_code = 'OMOP1019636'; DROP TABLE IF EXISTS irs_bn; CREATE TABLE irs_bn AS SELECT irs.concept_code_1, CASE WHEN s.cc2 IS NOT NULL THEN s.cc2 ELSE irs.concept_code_2 END AS concept_code_2 FROM internal_relationship_stage irs LEFT JOIN ( SELECT b.concept_code AS cc1, a.concept_code AS cc2 FROM drug_concept_stage a JOIN drug_concept_stage b ON lower(a.concept_name) = lower(b.concept_name) AND a.concept_code < b.concept_code AND a.concept_class_id = 'Brand Name' AND b.concept_class_id = 'Brand Name' ) s ON s.cc1 = irs.concept_code_2; TRUNCATE TABLE internal_relationship_stage; INSERT INTO internal_relationship_stage ( concept_code_1, concept_code_2 ) SELECT DISTINCT concept_code_1, concept_code_2 FROM irs_bn; DELETE FROM drug_concept_stage WHERE concept_code IN ( SELECT b.concept_code FROM drug_concept_stage a JOIN drug_concept_stage b ON lower(a.concept_name) = lower(b.concept_name) AND a.concept_code < b.concept_code AND a.concept_class_id = 'Brand Name' AND b.concept_class_id = 'Brand Name' ); --Merck KG UPDATE internal_relationship_stage SET concept_code_2 = 'OMOP339289' WHERE concept_code_2 = 'OMOP1018908' AND concept_code_1 IN ( 'OMOP759641', 'OMOP759638', 'OMOP759635', 'OMOP759905', 'OMOP759907', 'OMOP760169', 'OMOP760171', 'OMOP517968', 'OMOP427799' );
the_stack
INSERT INTO `hg19`.`grp` VALUES ( 'ENCODE2_ChIA-PET', 'ChIA-PET (ENCODE PHASE 2)', 5, 0, 0 ); CREATE TABLE `hg19`.`ENCFF001THT` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001THT.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001THT`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001THT', -- Track table name 'interaction', -- Track type: interaction 14, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET HCT-116", "priority":14, "longLabel":"ENCSR000BZX:ENCFF001THT", "track":"ENCFF001THT", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001THU` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001THU.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001THU`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001THU', -- Track table name 'interaction', -- Track type: interaction 13, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET HeLa-S3", "priority":13, "longLabel":"ENCSR000BZW:ENCFF001THU", "track":"ENCFF001THU", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001THV` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001THV.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001THV`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001THV', -- Track table name 'interaction', -- Track type: interaction 3, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"CTCF ChIA-PET K562", "priority":3, "longLabel":"ENCSR000CAC:ENCFF001THV", "track":"ENCFF001THV", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001THW` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001THW.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001THW`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001THW', -- Track table name 'interaction', -- Track type: interaction 1, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET K562", "priority":1, "longLabel":"ENCSR000BZY:ENCFF001THW", "track":"ENCFF001THW", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"full" }' ); CREATE TABLE `hg19`.`ENCFF001THX` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001THX.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001THX`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001THX', -- Track table name 'interaction', -- Track type: interaction 8, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"CTCF ChIA-PET MCF-7", "priority":8, "longLabel":"ENCSR000CAD:ENCFF001THX", "track":"ENCFF001THX", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001THY` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001THY.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001THY`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001THY', -- Track table name 'interaction', -- Track type: interaction 9, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"CTCF ChIA-PET MCF-7", "priority":9, "longLabel":"ENCSR000CAD:ENCFF001THY", "track":"ENCFF001THY", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001THZ` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001THZ.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001THZ`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001THZ', -- Track table name 'interaction', -- Track type: interaction 10, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"ESR1 ChIA-PET MCF-7", "priority":10, "longLabel":"ENCSR000BZZ:ENCFF001THZ", "track":"ENCFF001THZ", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001TIA` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001TIA.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001TIA`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001TIA', -- Track table name 'interaction', -- Track type: interaction 11, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"ESR1 ChIA-PET MCF-7", "priority":11, "longLabel":"ENCSR000BZZ:ENCFF001TIA", "track":"ENCFF001TIA", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001TIB` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001TIB.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001TIB`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001TIB', -- Track table name 'interaction', -- Track type: interaction 12, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"ESR1 ChIA-PET MCF-7", "priority":12, "longLabel":"ENCSR000BZZ:ENCFF001TIB", "track":"ENCFF001TIB", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001TIC` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001TIC.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001TIC`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001TIC', -- Track table name 'interaction', -- Track type: interaction 2, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET K562", "priority":2, "longLabel":"ENCSR000BZY:ENCFF001TIC", "track":"ENCFF001TIC", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001TID` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001TID.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001TID`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001TID', -- Track table name 'interaction', -- Track type: interaction 4, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET MCF-7", "priority":4, "longLabel":"ENCSR000CAA:ENCFF001TID", "track":"ENCFF001TID", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001TIE` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001TIE.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001TIE`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001TIE', -- Track table name 'interaction', -- Track type: interaction 5, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET MCF-7", "priority":5, "longLabel":"ENCSR000CAA:ENCFF001TIE", "track":"ENCFF001TIE", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001TIF` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001TIF.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001TIF`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001TIF', -- Track table name 'interaction', -- Track type: interaction 6, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET MCF-7", "priority":6, "longLabel":"ENCSR000CAA:ENCFF001TIF", "track":"ENCFF001TIF", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"full" }' ); CREATE TABLE `hg19`.`ENCFF001TIG` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001TIG.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001TIG`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001TIG', -- Track table name 'interaction', -- Track type: interaction 15, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET NB4", "priority":15, "longLabel":"ENCSR000CAB:ENCFF001TIG", "track":"ENCFF001TIG", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' ); CREATE TABLE `hg19`.`ENCFF001TIJ` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `chrom` varchar(255) NOT NULL DEFAULT '', `start` int(10) unsigned NOT NULL DEFAULT '0', `end` int(10) unsigned NOT NULL DEFAULT '0', `linkID` int(10) unsigned NOT NULL DEFAULT '0', `value` float NOT NULL DEFAULT '0', `dirFlag` tinyint(4) NOT NULL DEFAULT '-1', PRIMARY KEY (`ID`), KEY `chrom` (`chrom`(16),`start`), KEY `chrom_2` (`chrom`(16),`end`), KEY `linkID` (`linkID`) ); LOAD DATA LOCAL INFILE "./give_x_ENCFF001TIJ.bed.gz.bed" INTO TABLE `hg19`.`ENCFF001TIJ`; INSERT INTO `hg19`.`trackDb` VALUES ( 'ENCFF001TIJ', -- Track table name 'interaction', -- Track type: interaction 7, NULL, NULL, 'ENCODE2_ChIA-PET', -- Group name, should be the same as grp.name '{ "group":"ENCODE2_ChIA-PET", "shortLabel":"POLR2A ChIA-PET MCF-7", "priority":7, "longLabel":"ENCSR000CAA:ENCFF001TIJ", "track":"ENCFF001TIJ", "type":"interaction", "thresholdPercentile": [ 10, 60, 110, 160, 210, 260, 310, 360, 410, 460, 510, 560, 610, 660, 710, 760, 810, 860, 910, 960, 1010 ], "visibility":"hide" }' );
the_stack
-- 2018-05-15T18:17:12.582 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength,Help,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsForceIncludeInGeneratedModel,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,560158,3020,0,10,533,'N','Status',TO_TIMESTAMP('2018-05-15 18:17:12','YYYY-MM-DD HH24:MI:SS'),100,'N','','D',1,'','Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Status',0,0,TO_TIMESTAMP('2018-05-15 18:17:12','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2018-05-15T18:17:12.584 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=560158 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-05-15T18:17:20.401 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('I_BPartner','ALTER TABLE public.I_BPartner ADD COLUMN Status VARCHAR(1)') ; -- 2018-05-15T18:18:03.338 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IncludedTabHeight,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,560158,564208,0,441,0,TO_TIMESTAMP('2018-05-15 18:18:03','YYYY-MM-DD HH24:MI:SS'),100,'',0,'D','',0,'Y','Y','Y','N','N','N','N','N','Status',960,800,0,1,1,TO_TIMESTAMP('2018-05-15 18:18:03','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-05-15T18:18:03.339 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=564208 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-05-15T18:18:10.172 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=790,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564208 ; -- 2018-05-15T18:18:10.177 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=800,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5932 ; -- 2018-05-15T18:18:10.180 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=810,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564184 ; -- 2018-05-15T18:18:10.184 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=820,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564185 ; -- 2018-05-15T18:18:10.187 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=830,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560564 ; -- 2018-05-15T18:18:10.190 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=840,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560566 ; -- 2018-05-15T18:18:10.194 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=850,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564169 ; -- 2018-05-15T18:18:10.196 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=860,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564170 ; -- 2018-05-15T18:18:10.199 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=870,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564175 ; -- 2018-05-15T18:18:10.202 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=880,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564176 ; -- 2018-05-15T18:18:10.204 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=890,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564173 ; -- 2018-05-15T18:18:10.207 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=900,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564172 ; -- 2018-05-15T18:18:10.209 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=910,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564177 ; -- 2018-05-15T18:18:10.211 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=920,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564174 ; -- 2018-05-15T18:18:10.214 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=930,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564171 ; -- 2018-05-15T18:18:10.216 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=940,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564203 ; -- 2018-05-15T18:18:10.219 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=950,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5941 ; -- 2018-05-15T18:18:10.221 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=960,Updated=TO_TIMESTAMP('2018-05-15 18:18:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5924 ; -- 2018-05-15T18:18:17.348 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=800,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564184 ; -- 2018-05-15T18:18:17.354 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=810,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564185 ; -- 2018-05-15T18:18:17.359 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=820,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560564 ; -- 2018-05-15T18:18:17.365 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=830,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560566 ; -- 2018-05-15T18:18:17.371 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=840,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564169 ; -- 2018-05-15T18:18:17.377 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=850,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564170 ; -- 2018-05-15T18:18:17.379 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=860,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564175 ; -- 2018-05-15T18:18:17.382 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=870,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564176 ; -- 2018-05-15T18:18:17.385 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=880,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564173 ; -- 2018-05-15T18:18:17.387 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=890,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564172 ; -- 2018-05-15T18:18:17.390 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=900,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564177 ; -- 2018-05-15T18:18:17.392 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=910,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564174 ; -- 2018-05-15T18:18:17.395 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=920,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564171 ; -- 2018-05-15T18:18:17.397 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=930,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=564203 ; -- 2018-05-15T18:18:17.400 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=940,Updated=TO_TIMESTAMP('2018-05-15 18:18:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5932 ; -- 2018-05-15T18:21:11.728 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,544084,0,'IsActiveStatus',TO_TIMESTAMP('2018-05-15 18:21:11','YYYY-MM-DD HH24:MI:SS'),100,'','D','','Y','Active Status','Active Status',TO_TIMESTAMP('2018-05-15 18:21:11','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-05-15T18:21:11.730 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=544084 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2018-05-15T18:21:27.261 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=544084, AD_Reference_ID=20, ColumnName='IsActiveStatus', DefaultValue='Y', Description='', Help='', IsMandatory='Y', Name='Active Status',Updated=TO_TIMESTAMP('2018-05-15 18:21:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=560158 ; -- 2018-05-15T18:21:27.272 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Active Status', Description='', Help='' WHERE AD_Column_ID=560158 ; -- 2018-05-15T18:21:29.009 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('I_BPartner','ALTER TABLE public.I_BPartner ADD COLUMN IsActiveStatus CHAR(1) DEFAULT ''Y'' CHECK (IsActiveStatus IN (''Y'',''N'')) NOT NULL') ; /* DDL */ SELECT public.db_alter_table('I_BPartner','ALTER TABLE public.I_BPartner DROP COLUMN Status') ; -- 2018-05-15T18:30:44.111 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=868, AD_Reference_ID=10, ColumnName='DocumentNote', DefaultValue='', Description='Zusätzliche Information für den Kunden', Help='"Notiz" wird für zusätzliche Informationen zu diesem Produkt verwendet.', IsMandatory='N', Name='Notiz / Zeilentext',Updated=TO_TIMESTAMP('2018-05-15 18:30:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=560151 ; -- 2018-05-15T18:30:44.115 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Notiz / Zeilentext', Description='Zusätzliche Information für den Kunden', Help='"Notiz" wird für zusätzliche Informationen zu diesem Produkt verwendet.' WHERE AD_Column_ID=560151 ; -- 2018-05-15T18:30:55.506 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('I_BPartner','ALTER TABLE public.I_BPartner ADD COLUMN DocumentNote VARCHAR(1)') ; /* DDL */ SELECT public.db_alter_table('I_BPartner','ALTER TABLE public.I_BPartner DROP COLUMN DocumentNote') ; -- 2018-05-15T18:33:33.186 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=544081, AD_Reference_ID=20, ColumnName='IsShowDeliveryNote', DefaultValue='N', Description=NULL, Help=NULL, IsMandatory='Y', Name='Show Delivery Note',Updated=TO_TIMESTAMP('2018-05-15 18:33:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=560151 ; -- 2018-05-15T18:33:33.188 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Show Delivery Note', Description=NULL, Help=NULL WHERE AD_Column_ID=560151 ;
the_stack
DROP MATERIALIZED VIEW home_projects; CREATE VIEW project_members_all AS ( SELECT p.id, pm.user_id FROM projects p LEFT JOIN project_members pm ON p.id = pm.project_id UNION SELECT p.id, om.user_id FROM projects p LEFT JOIN organization_members om ON p.owner_id = om.organization_id WHERE om.user_id IS NOT NULL ); CREATE MATERIALIZED VIEW home_projects AS WITH tags AS ( SELECT sq.project_id, sq.version_string, sq.tag_name, sq.tag_version, sq.tag_color FROM (SELECT pv.project_id, pv.version_string, pvt.name AS tag_name, pvt.data AS tag_version, pvt.platform_version, pvt.color AS tag_color, row_number() OVER (PARTITION BY pv.project_id, pvt.platform_version ORDER BY pv.created_at DESC) AS row_num FROM project_versions pv JOIN ( SELECT pvti.version_id, pvti.name, pvti.data, --TODO, use a STORED column in Postgres 12 CASE WHEN pvti.name = 'Sponge' THEN substring(pvti.data FROM '^\[?(\d+)\.\d+(?:\.\d+)?(?:-SNAPSHOT)?(?:-[a-z0-9]{7,9})?(?:,(?:\d+\.\d+(?:\.\d+)?)?\))?$') WHEN pvti.name = 'SpongeForge' THEN substring(pvti.data FROM '^\d+\.\d+\.\d+-\d+-(\d+)\.\d+\.\d+(?:(?:-BETA-\d+)|(?:-RC\d+))?$') WHEN pvti.name = 'SpongeVanilla' THEN substring(pvti.data FROM '^\d+\.\d+\.\d+-(\d+)\.\d+\.\d+(?:(?:-BETA-\d+)|(?:-RC\d+))?$') WHEN pvti.name = 'Forge' THEN substring(pvti.data FROM '^\d+\.(\d+)\.\d+(?:\.\d+)?$') WHEN pvti.name = 'Lantern' THEN NULL --TODO Change this once Lantern changes to SpongeVanilla's format ELSE NULL END AS platform_version, pvti.color FROM project_version_tags pvti WHERE pvti.name IN ('Sponge', 'SpongeForge', 'SpongeVanilla', 'Forge', 'Lantern') AND pvti.data IS NOT NULL ) pvt ON pv.id = pvt.version_id WHERE pv.visibility = 1 AND pvt.name IN ('Sponge', 'SpongeForge', 'SpongeVanilla', 'Forge', 'Lantern') AND pvt.platform_version IS NOT NULL) sq WHERE sq.row_num = 1 ORDER BY sq.platform_version DESC) SELECT p.id, p.owner_name, array_agg(DISTINCT pm.user_id) as project_members, p.slug, p.visibility, p.views, p.downloads, p.stars, p.category, p.description, p.name, p.plugin_id, p.created_at, max(lv.created_at) AS last_updated, to_jsonb( ARRAY(SELECT jsonb_build_object('version_string', tags.version_string, 'tag_name', tags.tag_name, 'tag_version', tags.tag_version, 'tag_color', tags.tag_color) FROM tags WHERE tags.project_id = p.id LIMIT 5)) AS promoted_versions, setweight(to_tsvector('english', p.name) || to_tsvector('english', regexp_replace(p.name, '([a-z])([A-Z]+)', '\1_\2', 'g')) || to_tsvector('english', p.plugin_id), 'A') || setweight(to_tsvector('english', p.description), 'B') || setweight(to_tsvector('english', array_to_string(p.keywords, ' ')), 'C') || setweight(to_tsvector('english', p.owner_name) || to_tsvector('english', regexp_replace(p.owner_name, '([a-z])([A-Z]+)', '\1_\2', 'g')), 'D') AS search_words FROM projects p LEFT JOIN project_versions lv ON p.id = lv.project_id JOIN project_members_all pm ON p.id = pm.id GROUP BY p.id; CREATE INDEX home_projects_downloads_idx ON home_projects (downloads); CREATE INDEX home_projects_stars_idx ON home_projects (stars); CREATE INDEX home_projects_views_idx ON home_projects (views); CREATE INDEX home_projects_created_at_idx ON home_projects (extract(EPOCH from created_at)); CREATE INDEX home_projects_last_updated_idx ON home_projects (extract(EPOCH from last_updated)); CREATE INDEX home_projects_search_words_idx ON home_projects USING gin (search_words); # --- !Downs DROP MATERIALIZED VIEW home_projects; CREATE MATERIALIZED VIEW home_projects AS WITH tags AS ( SELECT sq.project_id, sq.version_string, sq.tag_name, sq.tag_version, sq.tag_color FROM (SELECT pv.project_id, pv.version_string, pvt.name AS tag_name, pvt.data AS tag_version, pvt.platform_version, pvt.color AS tag_color, row_number() OVER (PARTITION BY pv.project_id, pvt.platform_version ORDER BY pv.created_at DESC) AS row_num FROM project_versions pv JOIN ( SELECT pvti.version_id, pvti.name, pvti.data, --TODO, use a STORED column in Postgres 12 CASE WHEN pvti.name = 'Sponge' THEN substring(pvti.data FROM '^\[?(\d+)\.\d+(?:\.\d+)?(?:-SNAPSHOT)?(?:-[a-z0-9]{7,9})?(?:,(?:\d+\.\d+(?:\.\d+)?)?\))?$') WHEN pvti.name = 'SpongeForge' THEN substring(pvti.data FROM '^\d+\.\d+\.\d+-\d+-(\d+)\.\d+\.\d+(?:(?:-BETA-\d+)|(?:-RC\d+))?$') WHEN pvti.name = 'SpongeVanilla' THEN substring(pvti.data FROM '^\d+\.\d+\.\d+-(\d+)\.\d+\.\d+(?:(?:-BETA-\d+)|(?:-RC\d+))?$') WHEN pvti.name = 'Forge' THEN substring(pvti.data FROM '^\d+\.(\d+)\.\d+(?:\.\d+)?$') WHEN pvti.name = 'Lantern' THEN NULL --TODO Change this once Lantern changes to SpongeVanilla's format ELSE NULL END AS platform_version, pvti.color FROM project_version_tags pvti WHERE pvti.name IN ('Sponge', 'SpongeForge', 'SpongeVanilla', 'Forge', 'Lantern') AND pvti.data IS NOT NULL ) pvt ON pv.id = pvt.version_id WHERE pv.visibility = 1 AND pvt.name IN ('Sponge', 'SpongeForge', 'SpongeVanilla', 'Forge', 'Lantern') AND pvt.platform_version IS NOT NULL) sq WHERE sq.row_num = 1 ORDER BY sq.platform_version DESC) SELECT p.id, p.owner_name, p.owner_id, p.slug, p.visibility, p.views, p.downloads, p.stars, p.category, p.description, p.name, p.plugin_id, p.created_at, max(lv.created_at) AS last_updated, to_jsonb( ARRAY(SELECT jsonb_build_object('version_string', tags.version_string, 'tag_name', tags.tag_name, 'tag_version', tags.tag_version, 'tag_color', tags.tag_color) FROM tags WHERE tags.project_id = p.id LIMIT 5)) as promoted_versions, setweight(to_tsvector('english', p.name) || to_tsvector('english', regexp_replace(p.name, '([a-z])([A-Z]+)', '\1_\2', 'g')) || to_tsvector('english', p.plugin_id), 'A') || setweight(to_tsvector('english', p.description), 'B') || setweight(to_tsvector('english', array_to_string(p.keywords, ' ')), 'C') || setweight(to_tsvector('english', p.owner_name) || to_tsvector('english', regexp_replace(p.owner_name, '([a-z])([A-Z]+)', '\1_\2', 'g')), 'D') AS search_words FROM projects p LEFT JOIN project_versions lv ON p.id = lv.project_id GROUP BY p.id ORDER BY p.downloads DESC; CREATE INDEX home_projects_downloads_idx ON home_projects (downloads); CREATE INDEX home_projects_stars_idx ON home_projects (stars); CREATE INDEX home_projects_views_idx ON home_projects (views); CREATE INDEX home_projects_created_at_idx ON home_projects (extract(EPOCH from created_at)); CREATE INDEX home_projects_last_updated_idx ON home_projects (extract(EPOCH from last_updated)); CREATE INDEX home_projects_search_words_idx ON home_projects USING gin (search_words);
the_stack
Rem Rem $Header: tk_objects/tkxm/sql/dbmsxutil_otn.sql st_server_bhammers_bug-13083182/2 2011/10/17 10:32:39 bhammers Exp $ Rem Rem dbmsxutil.sql Rem Rem Copyright (c) 2009, 2011, Oracle and/or its affiliates. Rem All rights reserved. Rem Rem NAME Rem dbmsxutil.sql - <one-line expansion of the name> Rem Rem DESCRIPTION Rem <short description of component this file declares/defines> Rem Rem NOTES Rem This file will be executed an various db versions and that conditional Rem compilation needs to be used if a procedure should not appear in all Rem versions. Rem Rem MODIFIED (MM/DD/YY) Rem bhammers 10/12/11 - fix sql injection bug 13083026 Rem bhammers 01/21/11 - bug 10094590, 10324163 Rem shivsriv 01/14/11 - modify ALL_XMLTYPE_COLS Rem bhammers 08/06/10 - add printWarnings Rem hxzhang 05/20/10 - exchange partition pre/post proc Rem shivsriv 04/12/10 - bug 9542232 Rem shivsriv 02/11/10 - modify renameCollectionTable Rem bhammers 12/12/09 - incorporate change requests from MDRAKE Rem schakrab 05/27/09 - add OBJCOL_NAME in *_XMLTYPE_COLS Rem shivsriv 05/20/09 - change the procedure names Rem schakrab 02/27/09 - make XDB_INDEX_DDL_CACHE private Rem bhammers 01/13/09 - added XPath to xcolumn mapping Rem shivsriv 01/12/09 - added scopeXMLReferences/indexXMLRefences methods Rem bhammers 12/15/08 - moved implementation to prvtxutil.sql Rem bhammers 11/10/08 - Created Rem SET SERVEROUTPUT ON BEGIN $IF DBMS_DB_VERSION.VER_LE_10_1 $THEN DBMS_OUTPUT.PUT_LINE('This package is only working on Oracle RDBMS versions 10.2, 11.1, and 11.2.'); RAISE_APPLICATION_ERROR(-31061, 'Unsupported Oracle RDBMS version'); $ELSIF DBMS_DB_VERSION.VER_LE_10_2 $THEN DBMS_OUTPUT.PUT_LINE('INSTALLING SCRIPT FOR VERSION 10.2.'); $ELSIF DBMS_DB_VERSION.VER_LE_11_1 $THEN DBMS_OUTPUT.PUT_LINE('INSTALLING SCRIPT FOR VERSION 11.1.'); $ELSIF DBMS_DB_VERSION.VER_LE_11_2 $THEN DBMS_OUTPUT.PUT_LINE('INSTALLING SCRIPT FOR VERSION 11.2.'); $ELSE DBMS_OUTPUT.PUT_LINE('This package is only working on Oracle RDBMS versions 10.2, 11.1, and 11.2.'); RAISE_APPLICATION_ERROR(-31061, 'Unsupported Oracle RDBMS version'); $END END; / BEGIN DBMS_LOCK.SLEEP(2); END; / SET ECHO ON SET FEEDBACK 1 SET NUMWIDTH 10 SET LINESIZE 80 SET TRIMSPOOL ON SET TAB OFF SET PAGESIZE 100 --************************************************** -- Create xml schema views first because some -- pl/sql procedures need them --************************************************** --************************************************** -- Create xml schema views first because some -- pl/sql procedures need them --************************************************** /* This view selects all the available namespaces OWNER - user who owns the namespace TARGET_NAMESPACE - the targetNamespace XML_SCHEMA_URL - the url of the schema */ create or replace view DBA_XML_SCHEMA_NAMESPACES as select s.xmldata.schema_owner OWNER, s.xmldata.target_namespace TARGET_NAMESPACE, s.xmldata.schema_url SCHEMA_URL from xdb.xdb$schema s / grant select on DBA_XML_SCHEMA_NAMESPACES to select_catalog_role / create or replace public synonym DBA_XML_SCHEMA_NAMESPACES for DBA_XML_SCHEMA_NAMESPACES / /* This view selects all the available namespaces for the user OWNER - user who owns the namespace TARGET_NAMESPACE - the targetNamespace XML_SCHEMA_URL - the url of the schema */ create or replace view ALL_XML_SCHEMA_NAMESPACES as select s.xmldata.schema_owner OWNER, s.xmldata.target_namespace TARGET_NAMESPACE, s.xmldata.schema_url SCHEMA_URL from xdb.xdb$schema s, all_xml_schemas a where s.xmldata.schema_owner = a.owner and s.xmldata.schema_url = a.schema_url / grant select on ALL_XML_SCHEMA_NAMESPACES to public / create or replace public synonym ALL_XML_SCHEMA_NAMESPACES for ALL_XML_SCHEMA_NAMESPACES / /* This view selects all the namaspaces for the current user TARGET_NAMESPACE - the targetNamespace XML_SCHEMA_URL - the url of the schema */ create or replace view USER_XML_SCHEMA_NAMESPACES as select TARGET_NAMESPACE, SCHEMA_URL from DBA_XML_SCHEMA_NAMESPACES where OWNER = USER / grant select on USER_XML_SCHEMA_NAMESPACES to public / create or replace public synonym USER_XML_SCHEMA_NAMESPACES for USER_XML_SCHEMA_NAMESPACES / CREATE OR REPLACE TYPE PARENTIDARRAY is VARRAY(20) OF RAW(20); / CREATE OR REPLACE PACKAGE PrvtParentChild IS TYPE refCursor is REF CURSOR; Function getParentID ( elementID IN varchar2 ) RETURN PARENTIDARRAY; Function sizeArray ( elementID IN varchar2 ) RETURN NUMBER; END; / CREATE OR REPLACE package body PrvtParentChild IS Function getParentIDFromModelID ( modelID IN varchar2 ) RETURN PARENTIDARRAY IS parentElementID PARENTIDARRAY := PARENTIDARRAY(); cur0 refCursor; pID RAW(200); sqlStmtBase varchar2(2000); sqlStmt varchar2(2000); counter number(38); complexID varchar2(200); BEGIN sqlStmtBase := 'from xdb.xdb$complex_type ct where ( sys_op_r2o(ct.xmldata.all_kid) ='; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.choice_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.sequence_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.group_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.extension.sequence_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.extension.choice_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.extension.all_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.extension.group_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.restriction.sequence_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.restriction.choice_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.restriction.all_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.restriction.group_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmtBase := sqlStmtBase || ' )'; sqlStmt := ' select count(*) ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter ; IF (counter <> 0) THEN sqlStmt := 'select ct.sys_nc_oid$ ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO complexID ; sqlStmt := ' select hextoraw(e.xmldata.property.prop_number) from xdb.xdb$element e where sys_op_r2o(e.xmldata.property.type_ref) = '; sqlStmt := sqlStmt || Dbms_Assert.Enquote_Literal(complexID); sqlStmt := sqlStmt ; counter := 1; OPEN cur0 FOR sqlStmt; LOOP FETCH cur0 INTO pID; EXIT WHEN cur0%NOTFOUND; parentElementID.extend; parentElementID(counter) := pID; counter := counter + 1; END LOOP; CLOSE cur0; RETURN parentElementID; ELSE RETURN NULL; END IF; RETURN parentElementID; EXCEPTION WHEN OTHERS THEN RETURN NULL; END; Function getParentIDFromGroupID ( groupID IN varchar2 ) RETURN PARENTIDARRAY IS modelID varchar2(200); complexID varchar2(200); counter number(38); sqlStmtBase varchar2(2000); sqlStmt varchar2(2000); seqKid boolean := FALSE; choiceKid boolean := FALSE; allKid boolean := FALSE; kidClause varchar2(100); elementID varchar2(200); parentElementID PARENTIDARRAY := PARENTIDARRAY(); cur0 refCursor; pID RAW(200); BEGIN counter := 0; -- Get the reference ID from the def ID select count(*) INTO counter from xdb.xdb$group_ref rg, xdb.xdb$group_def dg where ref(dg) = rg.xmldata.groupref_ref and dg.sys_nc_oid$= groupID; IF (counter <> 0) THEN select rg.sys_nc_oid$ INTO elementID from xdb.xdb$group_ref rg, xdb.xdb$group_def dg where ref(dg) = rg.xmldata.groupref_ref and dg.sys_nc_oid$= groupID; ELSE RETURN NULL; END IF; -- choice sqlStmtBase := 'from xdb.xdb$choice_model sm, table(sm.xmldata.groups) t where sys_op_r2o(t.column_value) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(elementID); sqlStmt := ' select count(*) ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter ; IF ( counter <> 0 ) THEN sqlStmt := ' select sm.sys_nc_oid$ ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID ; choiceKid := TRUE; ELSE sqlStmtBase := 'from xdb.xdb$sequence_model sm, table(sm.xmldata.groups) t where sys_op_r2o(t.column_value) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(elementID); sqlStmt := ' select count(*) ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter ; IF ( counter <> 0 ) THEN sqlStmt := ' select sm.sys_nc_oid$ ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID ; seqKid := TRUE; ELSE sqlStmtBase := 'from xdb.xdb$all_model sm, table(sm.xmldata.groups) t where sys_op_r2o(t.column_value) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(elementID); sqlStmt := ' select count(*) ' || sqlStmtBase; IF ( counter <> 0 ) THEN sqlStmt := ' select sm.sys_nc_oid$ ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID ; allKid := TRUE; ELSE -- could be a direct child sqlStmtBase := 'from xdb.xdb$complex_type ct where ( '; sqlStmtBase := sqlStmtBase || ' sys_op_r2o(ct.xmldata.group_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(elementID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.extension.group_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(elementID); sqlStmtBase := sqlStmtBase || ' OR sys_op_r2o(ct.xmldata.complexcontent.restriction.group_kid) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(elementID); sqlStmtBase := sqlStmtBase || ' )'; sqlStmt := ' select count(*) ' || sqlStmtBase; DBMS_OUTPUT.PUT_LINE ( sqlStmt); EXECUTE IMMEDIATE sqlStmt INTO counter ; IF (counter <> 0) THEN sqlStmt := 'select ct.sys_nc_oid$ ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO complexID ; sqlStmt := ' select hextoraw(e.xmldata.property.prop_number) from xdb.xdb$element e where sys_op_r2o(e.xmldata.property.type_ref) = '; sqlStmt := sqlStmt || Dbms_Assert.Enquote_Literal(complexID); sqlStmt := sqlStmt ; counter := 1; OPEN cur0 FOR sqlStmt; LOOP FETCH cur0 INTO pID; EXIT WHEN cur0%NOTFOUND; parentElementID.extend; parentElementID(counter) := pID; counter := counter + 1; END LOOP; CLOSE cur0; RETURN parentElementID; ELSE RETURN NULL; END IF; END IF; END IF; END IF; sqlStmtBase := ''; WHILE TRUE LOOP IF (seqKid = TRUE) THEN kidClause := 'sequence_kids'; ELSIF (choiceKid = TRUE) THEN kidClause := 'choice_kids'; ELSE RETURN getParentIDFromModelID(modelID); END IF; counter := 0; sqlStmtBase := 'table(sm.xmldata.' || kidClause || ')t where sys_op_r2o(t.column_value) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmt := 'select count(*) from xdb.xdb$choice_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter ; IF (counter <> 0) THEN sqlStmt := 'select sm.sys_nc_oid$ from xdb.xdb$choice_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID ; choicekid := TRUE; seqKid := FALSE; allKid := FALSE; ELSE sqlStmt := 'select count(*) from xdb.xdb$sequence_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter; IF (counter <> 0) THEN sqlStmt := 'select sm.sys_nc_oid$ from xdb.xdb$sequence_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID ; choicekid := FALSE; seqKid := TRUE; allKid := FALSE; ELSE sqlStmt := 'select count(*) from xdb.xdb$all_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter ; IF (counter <> 0) THEN sqlStmt := 'select sm.sys_nc_oid$ from xdb.xdb$all_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID; choicekid := FALSE; seqKid := FALSE; allKid := TRUE; ELSE -- group RETURN getParentIDFromModelID(modelID); END IF; END IF; END IF; END LOOP; RETURN NULL; EXCEPTION WHEN OTHERS THEN RETURN NULL; END; Function getParentID ( elementID IN varchar2 ) RETURN PARENTIDARRAY IS modelID varchar2(200); complexID varchar2(200); counter number(38); sqlStmtBase varchar2(2000); sqlStmt varchar2(2000); seqKid boolean := FALSE; choiceKid boolean := FALSE; allKid boolean := FALSE; kidClause varchar2(100); BEGIN counter := 0; -- choice select count(*) INTO counter from xdb.xdb$element e, xdb.xdb$choice_model sm, table(sm.xmldata.elements)t where ref(e) = t.column_value and e.xmldata.property.prop_number = elementID ; IF ( counter <> 0 ) THEN select sm.sys_nc_oid$ INTO modelID from xdb.xdb$element e, xdb.xdb$choice_model sm, table(sm.xmldata.elements)t where ref(e) = t.column_value and e.xmldata.property.prop_number = elementID ; choiceKid := TRUE; ELSE -- sequence select count(*) INTO counter from xdb.xdb$element e, xdb.xdb$sequence_model sm, table(sm.xmldata.elements)t where ref(e) = t.column_value and e.xmldata.property.prop_number = elementID ; IF ( counter <> 0 ) THEN select sm.sys_nc_oid$ INTO modelID from xdb.xdb$element e, xdb.xdb$sequence_model sm, table(sm.xmldata.elements)t where ref(e) = t.column_value and e.xmldata.property.prop_number = elementID ; seqKid := TRUE; ELSE -- all select count(*) INTO counter from xdb.xdb$element e, xdb.xdb$all_model sm, table(sm.xmldata.elements)t where ref(e) = t.column_value and e.xmldata.property.prop_number = elementID ; IF ( counter <> 0 ) THEN select sm.sys_nc_oid$ INTO modelID from xdb.xdb$element e, xdb.xdb$all_model sm, table(sm.xmldata.elements)t where ref(e) = t.column_value and e.xmldata.property.prop_number = elementID ; allKid := TRUE; ELSE RETURN NULL; END IF; END IF; END IF; WHILE TRUE LOOP IF (seqKid = TRUE) THEN kidClause := 'sequence_kids'; ELSIF (choiceKid = TRUE) THEN kidClause := 'choice_kids'; ELSE RETURN getParentIDFromModelID(modelID); END IF; counter := 0; sqlStmtBase := 'table(sm.xmldata.' || kidClause || ')t where sys_op_r2o(t.column_value) = '; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmt := 'select count(*) from xdb.xdb$choice_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter ; IF (counter <> 0) THEN sqlStmt := 'select sm.sys_nc_oid$ from xdb.xdb$choice_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID ; choicekid := TRUE; seqKid := FALSE; allKid := FALSE; ELSE sqlStmt := 'select count(*) from xdb.xdb$sequence_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter; IF (counter <> 0) THEN sqlStmt := 'select sm.sys_nc_oid$ from xdb.xdb$sequence_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID ; choicekid := FALSE; seqKid := TRUE; allKid := FALSE; ELSE sqlStmt := 'select count(*) from xdb.xdb$all_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter ; IF (counter <> 0) THEN sqlStmt := 'select sm.sys_nc_oid$ from xdb.xdb$all_model sm, ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID; choicekid := FALSE; seqKid := FALSE; allKid := TRUE; ELSE -- group IF (seqKid = TRUE) THEN kidClause := 'sequence_kid'; ELSIF (choiceKid = TRUE) THEN kidClause := 'choice_kid'; ELSE kidClause := 'all_kid'; END IF; sqlStmtBase := ' from xdb.xdb$group_def sm where sys_op_r2o(sm.xmldata. ' || kidClause || ') ='; sqlStmtBase := sqlStmtBase || Dbms_Assert.Enquote_Literal(modelID); sqlStmt := 'select count(*) ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO counter ; IF (counter <> 0) THEN sqlStmt := 'select sm.sys_nc_oid$ ' || sqlStmtBase; EXECUTE IMMEDIATE sqlStmt INTO modelID; RETURN getParentIDFromGroupID(modelID); ELSE RETURN getParentIDFromModelID(modelID); END IF; END IF; END IF; END IF; END LOOP; RETURN NULL; EXCEPTION WHEN OTHERS THEN RETURN NULL; END; Function sizeArray ( elementID IN varchar2 ) RETURN NUMBER IS p parentidarray; BEGIN p := PrvtParentChild.getparentID(elementID); IF (p IS NULL) THEN RETURN 0; ELSE RETURN p.count; END IF; END; END; / /* This view selects all the elements. The properties of the element are selected from the xmldata properties. The prop number assigned to the element is used as the unique identifier for the element. This unique identifier helps us to traverse the xml document. The query is written as union of 4 separate queries. The first three queries helps to select the children whose content model is sequence/choice/all respectively. The final query helps to select the root elements. To select the parent element id, a self join is made with the xdb$element table. For a particular element its type can be determined by the using the type_ref column. Every complex type stores the content model of its children which in turn stores the references of the child element. For each element, its parent element id is determined by joining it with the content model of the parent elements. OWNER - the user who owns the element XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element TYPE_NAME - name of the type of the element GLOBAL - is 1 if the element is global else 0. ELEMENT - the actual xml type of the element SQL_INLINE - xdb annotation value for sqlInline SQL_TYPE - xdb annotation value for sqlType SQL_SCHEMA - xdb annotation value for sqlSchema DEFAULT_TABLE - xdb annotation value for default table SQL_NAME - xdb annotation value for sqlName SQL_COL_TYPE - xdb annotation value for sqlColType MAINTAIN_DOM - xdb annotation for maintain dom MAINTAIN_ORDER - xdb annotation for maintain order ELEMENT_ID - unique identifier for the element. PARENT_ELEMENT_ID - identies the parent of the element */ create or replace view DBA_XML_SCHEMA_ELEMENTS as (select s.xmldata.schema_owner AS OWNER, s.xmldata.schema_url AS SCHEMA_URL, s.xmldata.target_namespace AS TARGET_NAMESPACE, (case when e.xmldata.property.name IS NULL then e.xmldata.property.propref_name.name else e.xmldata.property.name end )AS ELEMENT_NAME, (case when e.xmldata.property.name IS NULL then 1 else 0 end )AS IS_REF, e.xmldata.property.typename.name AS TYPE_NAME, e.xmldata.property.global AS GLOBAL, value(e) AS ELEMENT, e.xmldata.sql_inline AS SQL_INLINE, e.xmldata.property.sqltype AS SQL_TYPE, e.xmldata.property.sqlschema AS SQL_SCHEMA, e.xmldata.default_table AS DEFAULT_TABLE, e.xmldata.property.sqlname AS SQL_NAME, e.xmldata.property.sqlcolltype AS SQL_COL_TYPE, e.xmldata.maintain_dom AS MAINTAIN_DOM, e.xmldata.maintain_order AS MAINTAIN_ORDER, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, t.column_value AS PARENT_ELEMENT_ID from xdb.xdb$schema s, xdb.xdb$element e, table( PrvtParentChild.getParentID(e.xmldata.property.prop_number)) t where sys_op_r2o(e.xmldata.property.parent_schema) = s.sys_nc_oid$ and PrvtParentChild.sizeArray(e.xmldata.property.prop_number) <> 0 UNION ALL select s.xmldata.schema_owner AS OWNER, s.xmldata.schema_url AS SCHEMA_URL, s.xmldata.target_namespace AS TARGET_NAMESPACE, (case when e.xmldata.property.name IS NULL then e.xmldata.property.propref_name.name else e.xmldata.property.name end )AS ELEMENT_NAME, (case when e.xmldata.property.name IS NULL then 1 else 0 end )AS IS_REF, e.xmldata.property.typename.name AS TYPE_NAME, e.xmldata.property.global AS GLOBAL, value(e) AS ELEMENT, e.xmldata.sql_inline AS SQL_INLINE, e.xmldata.property.sqltype AS SQL_TYPE, e.xmldata.property.sqlschema AS SQL_SCHEMA, e.xmldata.default_table AS DEFAULT_TABLE, e.xmldata.property.sqlname AS SQL_NAME, e.xmldata.property.sqlcolltype AS SQL_COL_TYPE, e.xmldata.maintain_dom AS MAINTAIN_DOM, e.xmldata.maintain_order AS MAINTAIN_ORDER, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, NULL AS PARENT_ELEMENT_ID from xdb.xdb$schema s, xdb.xdb$element e where sys_op_r2o(e.xmldata.property.parent_schema) = s.sys_nc_oid$ and PrvtParentChild.sizeArray(e.xmldata.property.prop_number) = 0 ) / grant select on DBA_XML_SCHEMA_ELEMENTS to select_catalog_role / create or replace public synonym DBA_XML_SCHEMA_ELEMENTS for DBA_XML_SCHEMA_ELEMENTS / /* This view selects all the elements accessible to the current user. The properties of the element are selected from the xmldata properties. The prop number assigned to the element is used as the unique identifier for the element. This unique identifier helps us to traverse the xml document. The query is written as union of 4 separate queries. The first three queries helps to select the children whose content model is sequence/choice/all respectively. The final query helps to select the root elements. To select the parent element id, a self join is made with the xdb$element table.For a particular element its type can be determined by the using the type_ref column. Every complex type stores the content model of its children which in turn stores the references of the child element. For each element, its parent element id is determined by joining it with the content model of the parent elements. OWNER - the user who owns the element XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element TYPE_NAME - name of the type of the element GLOBAL - is 1 if the element is global else 0. ELEMENT - the actual xml type of the element SQL_INLINE - xdb annotation value for sqlInline SQL_TYPE - xdb annotation value for sqlType SQL_SCHEMA - xdb annotation value for sqlSchema DEFAULT_TABLE - xdb annotation value for default table SQL_NAME - xdb annotation value for sqlName SQL_COL_TYPE - xdb annotation value for sqlColType MAINTAIN_DOM - xdb annotation for maintain dom MAINTAIN_ORDER - xdb annotation for maintain order ELEMENT_ID - unique identifier for the element. PARENT_ELEMENT_ID - identies the parent of the element */ create or replace view ALL_XML_SCHEMA_ELEMENTS as (select s.xmldata.schema_owner AS OWNER, s.xmldata.schema_url AS SCHEMA_URL, s.xmldata.target_namespace AS TARGET_NAMESPACE, (case when e.xmldata.property.name IS NULL then e.xmldata.property.propref_name.name else e.xmldata.property.name end )AS ELEMENT_NAME, (case when e.xmldata.property.name IS NULL then 1 else 0 end )AS IS_REF, e.xmldata.property.typename.name AS TYPE_NAME, e.xmldata.property.global AS GLOBAL, value(e) AS ELEMENT, e.xmldata.sql_inline AS SQL_INLINE, e.xmldata.property.sqltype AS SQL_TYPE, e.xmldata.property.sqlschema AS SQL_SCHEMA, e.xmldata.default_table AS DEFAULT_TABLE, e.xmldata.property.sqlname AS SQL_NAME, e.xmldata.property.sqlcolltype AS SQL_COL_TYPE, e.xmldata.maintain_dom AS MAINTAIN_DOM, e.xmldata.maintain_order AS MAINTAIN_ORDER, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, t.column_value AS PARENT_ELEMENT_ID from xdb.xdb$schema s, xdb.xdb$element e, all_xml_schemas a, table( PrvtParentChild.getParentID(e.xmldata.property.prop_number)) t where sys_op_r2o(e.xmldata.property.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = a.owner and s.xmldata.schema_url = a.schema_url and PrvtParentChild.sizeArray(e.xmldata.property.prop_number) <> 0 UNION ALL select s.xmldata.schema_owner AS OWNER, s.xmldata.schema_url AS SCHEMA_URL, s.xmldata.target_namespace AS TARGET_NAMESPACE, (case when e.xmldata.property.name IS NULL then e.xmldata.property.propref_name.name else e.xmldata.property.name end )AS ELEMENT_NAME, (case when e.xmldata.property.name IS NULL then 1 else 0 end )AS IS_REF, e.xmldata.property.typename.name AS TYPE_NAME, e.xmldata.property.global AS GLOBAL, value(e) AS ELEMENT, e.xmldata.sql_inline AS SQL_INLINE, e.xmldata.property.sqltype AS SQL_TYPE, e.xmldata.property.sqlschema AS SQL_SCHEMA, e.xmldata.default_table AS DEFAULT_TABLE, e.xmldata.property.sqlname AS SQL_NAME, e.xmldata.property.sqlcolltype AS SQL_COL_TYPE, e.xmldata.maintain_dom AS MAINTAIN_DOM, e.xmldata.maintain_order AS MAINTAIN_ORDER, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, NULL AS PARENT_ELEMENT_ID from xdb.xdb$schema s, xdb.xdb$element e, all_xml_schemas a where sys_op_r2o(e.xmldata.property.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = a.owner and s.xmldata.schema_url = a.schema_url and PrvtParentChild.sizeArray(e.xmldata.property.prop_number) = 0 ) / grant select on ALL_XML_SCHEMA_ELEMENTS to public / create or replace public synonym ALL_XML_SCHEMA_ELEMENTS for ALL_XML_SCHEMA_ELEMENTS / /* This view selects all the elements for the current user XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element TYPE_NAME - name of the type of the element GLOBAL - is 1 if the element is global else 0. ELEMENT - the actual xml type of the element SQL_INLINE - xdb annotation value for sqlInline SQL_TYPE - xdb annotation value for sqlType SQL_SCHEMA - xdb annotation value for sqlSchema DEFAULT_TABLE - xdb annotation value for default table SQL_NAME - xdb annotation value for sqlName SQL_COL_TYPE - xdb annotation value for sqlColType MAINTAIN_DOM - xdb annotation for maintain dom MAINTAIN_ORDER - xdb annotation for maintain order ELEMENT_ID - unique identifier for the element. PARENT_ELEMENT_ID - identies the parent of the element */ create or replace view USER_XML_SCHEMA_ELEMENTS as select SCHEMA_URL, TARGET_NAMESPACE, ELEMENT_NAME,IS_REF, TYPE_NAME, GLOBAL, ELEMENT, SQL_INLINE,SQL_TYPE, SQL_SCHEMA, DEFAULT_TABLE, SQL_NAME, SQL_COL_TYPE,MAINTAIN_DOM,MAINTAIN_ORDER,ELEMENT_ID,PARENT_ELEMENT_ID from DBA_XML_SCHEMA_ELEMENTS where OWNER = USER / grant select on USER_XML_SCHEMA_ELEMENTS to public / create or replace public synonym USER_XML_SCHEMA_ELEMENTS for USER_XML_SCHEMA_ELEMENTS / /* This view selects all members of the substitution group OWNER - the user who owns the element XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element ELEMENT - the actual xml type of the element HEAD_OWNER - the user who owns the head element for the current element HEAD_SCHEMA_URL - the url of schema within which the head element exists HEAD_TARGET_NAMESPACE - the namespace of the head element HEAD_ELEMENT_NAME - name of the head element HEAD_ELEMENT - the actual xml type of the head element */ create or replace view DBA_XML_SCHEMA_SUBSTGRP_MBRS as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, e.xmldata.property.name ELEMENT_NAME, value(e) ELEMENT, hs.xmldata.schema_owner HEAD_OWNER, hs.xmldata.schema_url HEAD_SCHEMA_URL, hs.xmldata.target_namespace HEAD_TARGET_NAMESPACE, he.xmldata.property.name HEAD_ELEMENT_NAME, value(he) HEAD_ELEMENT from xdb.xdb$schema s, xdb.xdb$schema hs, xdb.xdb$element e, xdb.xdb$element he where sys_op_r2o(e.xmldata.property.parent_schema) = s.sys_nc_oid$ and e.xmldata.property.global = hexToRaw('01') and he.sys_nc_oid$ = sys_op_r2o(e.xmldata.HEAD_ELEM_REF) and sys_op_r2o(he.xmldata.property.parent_schema) = hs.sys_nc_oid$; / grant select on DBA_XML_SCHEMA_SUBSTGRP_MBRS to select_catalog_role / create or replace public synonym DBA_XML_SCHEMA_SUBSTGRP_MBRS for DBA_XML_SCHEMA_SUBSTGRP_MBRS / /* This view selects all members of the substitution group accessible to the current user OWNER - the user who owns the element XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element ELEMENT - the actual xml type of the element HEAD_OWNER - the user who owns the head element for the current element HEAD_SCHEMA_URL - the url of schema within which the head element exists HEAD_TARGET_NAMESPACE - the namespace of the head element HEAD_ELEMENT_NAME - name of the head element HEAD_ELEMENT - the actual xml type of the head element */ create or replace view ALL_XML_SCHEMA_SUBSTGRP_MBRS as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, e.xmldata.property.name ELEMENT_NAME, value(e) ELEMENT, hs.xmldata.schema_owner HEAD_OWNER, hs.xmldata.schema_url HEAD_SCHEMA_URL, hs.xmldata.target_namespace HEAD_TARGET_NAMESPACE, he.xmldata.property.name HEAD_ELEMENT_NAME, value(he) HEAD_ELEMENT from xdb.xdb$schema s, xdb.xdb$schema hs, xdb.xdb$element e, xdb.xdb$element he, all_xml_schemas a where sys_op_r2o(e.xmldata.property.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = a.owner and s.xmldata.schema_url = a.schema_url and e.xmldata.property.global = hexToRaw('01') and he.sys_nc_oid$ = sys_op_r2o(e.xmldata.HEAD_ELEM_REF) and sys_op_r2o(he.xmldata.property.parent_schema) = hs.sys_nc_oid$; / grant select on ALL_XML_SCHEMA_SUBSTGRP_MBRS to public / create or replace public synonym ALL_XML_SCHEMA_SUBSTGRP_MBRS for ALL_XML_SCHEMA_SUBSTGRP_MBRS / /* This view selects all members of the substitution group for the current user XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element ELEMENT - the actual xml type of the element HEAD_OWNER - the user who owns the head element for the current element HEAD_SCHEMA_URL - the url of schema within which the head element exists HEAD_TARGET_NAMESPACE - the namespace of the head element HEAD_ELEMENT_NAME - name of the head element HEAD_ELEMENT - the actual xml type of the head element */ create or replace view USER_XML_SCHEMA_SUBSTGRP_MBRS as select SCHEMA_URL, TARGET_NAMESPACE, ELEMENT_NAME, ELEMENT, HEAD_OWNER, HEAD_SCHEMA_URL, HEAD_TARGET_NAMESPACE, HEAD_ELEMENT_NAME, HEAD_ELEMENT from DBA_XML_SCHEMA_SUBSTGRP_MBRS where OWNER = USER / grant select on USER_XML_SCHEMA_SUBSTGRP_MBRS to public / create or replace public synonym USER_XML_SCHEMA_SUBSTGRP_MBRS for USER_XML_SCHEMA_SUBSTGRP_MBRS / /* This view selects the heads of all the substitution groups OWNER - the user who owns the element XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element ELEMENT - the actual xml type of the element */ create or replace view DBA_XML_SCHEMA_SUBSTGRP_HEAD as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, e.xmldata.property.name ELEMENT_NAME, value(e) ELEMENT from xdb.xdb$schema s, xdb.xdb$element e where sys_op_r2o(e.xmldata.property.parent_schema) = s.sys_nc_oid$ and e.xmldata.property.global = hexToRaw('01') and ref(e) in ( select distinct se.xmldata.HEAD_ELEM_REF from xdb.xdb$element se where se.xmldata.HEAD_ELEM_REF is not null) / grant select on DBA_XML_SCHEMA_SUBSTGRP_HEAD to select_catalog_role / create or replace public synonym DBA_XML_SCHEMA_SUBSTGRP_HEAD for DBA_XML_SCHEMA_SUBSTGRP_HEAD / /* This view selects the heads of all the substitution groups accessible to the current user OWNER - the user who owns the element XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element ELEMENT - the actual xml type of the element */ create or replace view ALL_XML_SCHEMA_SUBSTGRP_HEAD as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, e.xmldata.property.name ELEMENT_NAME, value(e) ELEMENT from xdb.xdb$schema s, xdb.xdb$element e, all_xml_schemas a where sys_op_r2o(e.xmldata.property.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = a.owner and s.xmldata.schema_url = a.schema_url and e.xmldata.property.global = hexToRaw('01') and e.sys_nc_oid$ in ( select distinct sys_op_r2o (se.xmldata.HEAD_ELEM_REF) from xdb.xdb$element se where se.xmldata.HEAD_ELEM_REF is not null) / grant select on ALL_XML_SCHEMA_SUBSTGRP_HEAD to public / create or replace public synonym ALL_XML_SCHEMA_SUBSTGRP_HEAD for ALL_XML_SCHEMA_SUBSTGRP_HEAD / /* This view selects the heads of all the substitution groups for the current user XML_SCHEMA_URL - the url of schema within which the element exists TARGET_NAMESPACE - the namespace of the element ELEMENT_NAME - name of the element ELEMENT - the actual xml type of the element */ create or replace view USER_XML_SCHEMA_SUBSTGRP_HEAD as select SCHEMA_URL, TARGET_NAMESPACE, ELEMENT_NAME, ELEMENT from DBA_XML_SCHEMA_SUBSTGRP_HEAD where OWNER = USER / grant select on USER_XML_SCHEMA_SUBSTGRP_HEAD to public / create or replace public synonym USER_XML_SCHEMA_SUBSTGRP_HEAD for USER_XML_SCHEMA_SUBSTGRP_HEAD / /* This view selects all complex type. The properties are derived from xmldata properties. The xdb annotations for the complex type are derived from the complex type using xpath. The base type for the element can be either NULL/Complex Type/Simple Type. The case expression is used to select the appropriate value for the same. OWNER - the user who owns the type XML_SCHEMA_URL - the url of schema within which the type exists TARGET_NAMESPACE - the namespace of the type COMPLEX_TYPE_NAME - name of the complex type COMPLEX_TYPE - the actual xmltype of the type BASE_NAME - Name of the base type to which the complex type refers MAINTAIN_DOM - xdb annotation for maintainDOM MAINTAIN_ORDER - xdb annotation for maintainOrder SQL_TYPE - xdb annotation for sqlType SQL_SCHEMA - xdb annotation for sqlSchema DEFAULT_TABLE - xdb annotation for defaultTable SQL_NAME - xdb annotation for sqlName SQL_COL_TYPE - xdb annotation for sqlColType STORE_VARRAY_AS_TABLE - xdb annotation for storeVarrayAsTable */ create or replace view DBA_XML_SCHEMA_COMPLEX_TYPES as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, ct.xmldata.name COMPLEX_TYPE_NAME, value(ct) COMPLEX_TYPE, (case when ct.xmldata.BASE_TYPE IS NULL then NULL when ( select count(1) from xdb.xdb$simple_type st where ct.xmldata.BASE_TYPE = ref(st) ) != 0 then ( select st.xmldata.name from xdb.xdb$simple_type st where ct.xmldata.BASE_TYPE = ref(st) ) else ( select ctb.xmldata.name from xdb.xdb$complex_type ctm, xdb.xdb$complex_type ctb where ref(ct) = ref(ctm) and ctm.xmldata.BASE_TYPE = ref(ctb) ) end ) BASE_NAME, (case when ct.xmldata.BASE_TYPE IS NULL then NULL when ( select count(1) from xdb.xdb$simple_type st where ct.xmldata.BASE_TYPE = ref(st) ) != 0 then ( select s.xmldata.schema_url from xdb.xdb$simple_type st, xdb.xdb$schema s where ct.xmldata.BASE_TYPE = ref(st) and sys_op_r2o(st.xmldata.parent_schema) = s.sys_nc_oid$) else ( select s.xmldata.schema_url from xdb.xdb$complex_type ctm, xdb.xdb$complex_type ctb, xdb.xdb$schema s where ref(ct) = ref(ctm) and ctm.xmldata.BASE_TYPE = ref(ctb) and sys_op_r2o(ctb.xmldata.parent_schema) = s.sys_nc_oid$ ) end ) BASE_SCHEMA_URL, (case when ct.xmldata.BASE_TYPE IS NULL then NULL when ( select count(1) from xdb.xdb$simple_type st where ct.xmldata.BASE_TYPE = ref(st) ) != 0 then ( select s.xmldata.target_namespace from xdb.xdb$simple_type st, xdb.xdb$schema s where ct.xmldata.BASE_TYPE = ref(st) and sys_op_r2o(st.xmldata.parent_schema) = s.sys_nc_oid$) else ( select s.xmldata.target_namespace from xdb.xdb$complex_type ctm, xdb.xdb$complex_type ctb, xdb.xdb$schema s where ref(ct) = ref(ctm) and ctm.xmldata.BASE_TYPE = ref(ctb) and sys_op_r2o(ctb.xmldata.parent_schema) = s.sys_nc_oid$ ) end ) BASE_TARGET_NAMESPACE, ct.xmldata.maintain_dom MAINTAIN_DOM, ct.xmldata.sqltype SQL_TYPE, ct.xmldata.SQLSCHEMA SQL_SCHEMA from xdb.xdb$schema s, xdb.xdb$complex_type ct where sys_op_r2o(ct.xmldata.parent_schema) = s.sys_nc_oid$ / grant select on DBA_XML_SCHEMA_COMPLEX_TYPES to select_catalog_role / create or replace public synonym DBA_XML_SCHEMA_COMPLEX_TYPES for DBA_XML_SCHEMA_COMPLEX_TYPES / /* This view selects all complex type accessible to the current user. The properties are derived from xmldata properties. The xdb annotations for the complex type are derived from the complex type using xpath. The base type for the element can be either NULL/Complex Type/Simple Type. The case expression is used to select the appropriate value for the same. OWNER - the user who owns the type XML_SCHEMA_URL - the url of schema within which the type exists TARGET_NAMESPACE - the namespace of the type COMPLEX_TYPE_NAME - name of the complex type COMPLEX_TYPE - the actual xmltype of the type BASE_NAME - Name of the base type to which the complex type refers MAINTAIN_DOM - xdb annotation for maintainDOM MAINTAIN_ORDER - xdb annotation for maintainOrder SQL_TYPE - xdb annotation for sqlType SQL_SCHEMA - xdb annotation for sqlSchema DEFAULT_TABLE - xdb annotation for defaultTable SQL_NAME - xdb annotation for sqlName SQL_COL_TYPE - xdb annotation for sqlColType STORE_VARRAY_AS_TABLE - xdb annotation for storeVarrayAsTable */ create or replace view ALL_XML_SCHEMA_COMPLEX_TYPES as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, ct.xmldata.name COMPLEX_TYPE_NAME, value(ct) COMPLEX_TYPE, (case when ct.xmldata.BASE_TYPE IS NULL then NULL when ( select count(1) from xdb.xdb$simple_type st where ct.xmldata.BASE_TYPE = ref(st) ) != 0 then ( select st.xmldata.name from xdb.xdb$simple_type st where ct.xmldata.BASE_TYPE = ref(st) ) else ( select ctb.xmldata.name from xdb.xdb$complex_type ctm, xdb.xdb$complex_type ctb where ref(ct) = ref(ctm) and ctm.xmldata.BASE_TYPE = ref(ctb) ) end ) BASE_NAME, (case when ct.xmldata.BASE_TYPE IS NULL then NULL when ( select count(1) from xdb.xdb$simple_type st where ct.xmldata.BASE_TYPE = ref(st) ) != 0 then ( select s.xmldata.schema_url from xdb.xdb$simple_type st, xdb.xdb$schema s where ct.xmldata.BASE_TYPE = ref(st) and sys_op_r2o(st.xmldata.parent_schema) = s.sys_nc_oid$) else ( select s.xmldata.schema_url from xdb.xdb$complex_type ctm, xdb.xdb$complex_type ctb, xdb.xdb$schema s where ref(ct) = ref(ctm) and ctm.xmldata.BASE_TYPE = ref(ctb) and sys_op_r2o(ctb.xmldata.parent_schema) = s.sys_nc_oid$ ) end ) BASE_SCHEMA_URL, (case when ct.xmldata.BASE_TYPE IS NULL then NULL when ( select count(1) from xdb.xdb$simple_type st where ct.xmldata.BASE_TYPE = ref(st) ) != 0 then ( select s.xmldata.target_namespace from xdb.xdb$simple_type st, xdb.xdb$schema s where ct.xmldata.BASE_TYPE = ref(st) and sys_op_r2o(st.xmldata.parent_schema) = s.sys_nc_oid$) else ( select s.xmldata.target_namespace from xdb.xdb$complex_type ctm, xdb.xdb$complex_type ctb, xdb.xdb$schema s where ref(ct) = ref(ctm) and ctm.xmldata.BASE_TYPE = ref(ctb) and sys_op_r2o(ctb.xmldata.parent_schema) = s.sys_nc_oid$ ) end ) BASE_TARGET_NAMESPACE, ct.xmldata.maintain_dom MAINTAIN_DOM, ct.xmldata.sqltype SQL_TYPE, ct.xmldata.SQLSCHEMA SQL_SCHEMA from xdb.xdb$schema s, xdb.xdb$complex_type ct,all_xml_schemas a where sys_op_r2o(ct.xmldata.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = a.owner and s.xmldata.schema_url = a.schema_url / grant select on ALL_XML_SCHEMA_COMPLEX_TYPES to public / create or replace public synonym ALL_XML_SCHEMA_COMPLEX_TYPES for ALL_XML_SCHEMA_COMPLEX_TYPES / /* This view selects all complex type for the current user XML_SCHEMA_URL - the url of schema within which the type exists TARGET_NAMESPACE - the namespace of the type COMPLEX_TYPE_NAME - name of the complex type COMPLEX_TYPE - the actual xmltype of the type BASE_NAME - Name of the base type to which the complex type refers MAINTAIN_DOM - xdb annotation for maintainDOM MAINTAIN_ORDER - xdb annotation for maintainOrder SQL_TYPE - xdb annotation for sqlType SQL_SCHEMA - xdb annotation for sqlSchema DEFAULT_TABLE - xdb annotation for defaultTable SQL_NAME - xdb annotation for sqlName SQL_COL_TYPE - xdb annotation for sqlColType STORE_VARRAY_AS_TABLE - xdb annotation for storeVarrayAsTable */ create or replace view USER_XML_SCHEMA_COMPLEX_TYPES as select SCHEMA_URL, TARGET_NAMESPACE, COMPLEX_TYPE_NAME, COMPLEX_TYPE, BASE_NAME, BASE_SCHEMA_URL, BASE_TARGET_NAMESPACE, MAINTAIN_DOM, SQL_TYPE, SQL_SCHEMA from DBA_XML_SCHEMA_COMPLEX_TYPES where OWNER = USER / grant select on USER_XML_SCHEMA_COMPLEX_TYPES to public / create or replace public synonym USER_XML_SCHEMA_COMPLEX_TYPES for USER_XML_SCHEMA_COMPLEX_TYPES / /* This view selects all simple type. The properties of the simple element are derived from xmldata properties. The xdb annotations are derived from the simple type using xpath. OWNER - the user who owns the type XML_SCHEMA_URL - the url of schema within which the type exists TARGET_NAMESPACE - the namespace of the type SIMPLE_TYPE_NAME - name of the simple type SIMPLE_TYPE - the actual xmltype of the type MAINTAIN_DOM - xdb annotation for maintainDOM SQL_TYPE - xdb annotation for sqlType (not available on 10.2) SQL_SCHEMA - xdb annotation for sqlSchema DEFAULT_TABLE - xdb annotation for defaultTable SQL_NAME - xdb annotation for sqlName SQL_COL_TYPE - xdb annotation for sqlColType STORE_VARRAY_AS_TABLE - xdb annotation for storeVarrayAsTable */ /* NOTE, For 10.2: View does not contain the column SQLTYPE.*/ DECLARE stmt VARCHAR2(4000); BEGIN stmt := ' create or replace view DBA_XML_SCHEMA_SIMPLE_TYPES as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, st.xmldata.name SIMPLE_TYPE_NAME, value(st) SIMPLE_TYPE from xdb.xdb$schema s, xdb.xdb$simple_type st where sys_op_r2o(st.xmldata.parent_schema) = s.sys_nc_oid$'; execute immediate (stmt); exception when others then raise; END; / grant select on DBA_XML_SCHEMA_SIMPLE_TYPES to select_catalog_role / create or replace public synonym DBA_XML_SCHEMA_SIMPLE_TYPES for DBA_XML_SCHEMA_SIMPLE_TYPES / /* This view selects all simple type accessible to the current user. The properties of the simple element are derived from xmldata properties. The xdb annotations are derived from the simple type using xpath. OWNER - the user who owns the type XML_SCHEMA_URL - the url of schema within which the type exists TARGET_NAMESPACE - the namespace of the type SIMPLE_TYPE_NAME - name of the simple type SIMPLE_TYPE - the actual xmltype of the type MAINTAIN_DOM - xdb annotation for maintainDOM SQL_TYPE - xdb annotation for sqlType SQL_SCHEMA - xdb annotation for sqlSchema DEFAULT_TABLE - xdb annotation for defaultTable SQL_NAME - xdb annotation for sqlName SQL_COL_TYPE - xdb annotation for sqlColType STORE_VARRAY_AS_TABLE - xdb annotation for storeVarrayAsTable */ /* NOTE, For 10.2: View does not contain the column SQLTYPE.*/ DECLARE stmt VARCHAR2(4000); BEGIN stmt := ' create or replace view ALL_XML_SCHEMA_SIMPLE_TYPES as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, st.xmldata.name SIMPLE_TYPE_NAME, value(st) SIMPLE_TYPE from xdb.xdb$schema s, xdb.xdb$simple_type st, all_xml_schemas a where sys_op_r2o(st.xmldata.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = a.owner and s.xmldata.schema_url = a.schema_url'; execute immediate (stmt); exception when others then raise; END; / grant select on ALL_XML_SCHEMA_SIMPLE_TYPES to public / create or replace public synonym ALL_XML_SCHEMA_SIMPLE_TYPES for ALL_XML_SCHEMA_SIMPLE_TYPES / /* This view selects all simple type for current user XML_SCHEMA_URL - the url of schema within which the type exists TARGET_NAMESPACE - the namespace of the type SIMPLE_TYPE_NAME - name of the simple type SIMPLE_TYPE - the actual xmltype of the type MAINTAIN_DOM - xdb annotation for maintainDOM SQL_TYPE - xdb annotation for sqlType SQL_SCHEMA - xdb annotation for sqlSchema DEFAULT_TABLE - xdb annotation for defaultTable SQL_NAME - xdb annotation for sqlName SQL_COL_TYPE - xdb annotation for sqlColType STORE_VARRAY_AS_TABLE - xdb annotation for storeVarrayAsTable */ /* NOTE, For 10.2: View does not contain the column SQLTYPE.*/ DECLARE stmt VARCHAR2(4000); BEGIN stmt := ' create or replace view USER_XML_SCHEMA_SIMPLE_TYPES as select SCHEMA_URL, TARGET_NAMESPACE, SIMPLE_TYPE_NAME, SIMPLE_TYPE from DBA_XML_SCHEMA_SIMPLE_TYPES where OWNER = USER'; execute immediate (stmt); exception when others then raise; END; / grant select on USER_XML_SCHEMA_SIMPLE_TYPES to public / create or replace public synonym USER_XML_SCHEMA_SIMPLE_TYPES for USER_XML_SCHEMA_SIMPLE_TYPES / /* This view selects all the attributes. The properties are derived from xmldata properties. The element id is the unique identifier used to identify the element to which the attribute belongs. The element id relates to the dba_user_elements. This helps in traversing the xml document. OWNER - the user who owns the attribute XML_SCHEMA_URL - the url of schema within which the attribute exists TARGET_NAMESPACE - the namespace of the attribute ATTRIBUTE_NAME - name of the attribute TYPE_NAME - name of type of the attribute GLOBAL - is 1 if attribute is global else 0. ATTRIBUTE - actual xmltype for the attribute ELEMENT_ID - element id of the element to which the attribute belongs */ create or replace view DBA_XML_SCHEMA_ATTRIBUTES as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, (case when a.xmldata.name IS NULL then a.xmldata.propref_name.name else a.xmldata.name end )AS ATTRIBUTE_NAME, (case when a.xmldata.name IS NULL then 1 else 0 end )AS IS_REF, (case when a.xmldata.typename.name IS NULL then (select a1.xmldata.typename.name from xdb.xdb$attribute a1 where ref(a1)=a.xmldata.propref_ref) else a.xmldata.typename.name end )AS TYPE_NAME, a.xmldata.global GLOBAL, value(a) ATTRIBUTE, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, a.xmldata.sqltype AS SQL_TYPE, a.xmldata.sqlname AS SQL_NAME from xdb.xdb$schema s, xdb.xdb$attribute a, xdb.xdb$element e, xdb.xdb$complex_type ct, table(ct.xmldata.attributes) att where sys_op_r2o(a.xmldata.parent_schema) = s.sys_nc_oid$ and ref(ct) = e.xmldata.property.type_ref and att.column_value = ref(a) UNION ALL select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, (case when a.xmldata.name IS NULL then a.xmldata.propref_name.name else a.xmldata.name end )AS ATTRIBUTE_NAME, (case when a.xmldata.name IS NULL then 1 else 0 end )AS IS_REF, (case when a.xmldata.typename.name IS NULL then (select a1.xmldata.typename.name from xdb.xdb$attribute a1 where ref(a1)=a.xmldata.propref_ref) else a.xmldata.typename.name end )AS TYPE_NAME, a.xmldata.global GLOBAL, value(a) ATTRIBUTE, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, a.xmldata.sqltype AS SQL_TYPE, a.xmldata.sqlname AS SQL_NAME from xdb.xdb$schema s, xdb.xdb$attribute a, xdb.xdb$element e, xdb.xdb$complex_type ct, table(ct.xmldata.simplecont.restriction.attributes) att where sys_op_r2o(a.xmldata.parent_schema) = s.sys_nc_oid$ and ref(ct) = e.xmldata.property.type_ref and att.column_value = ref(a) UNION ALL select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, (case when a.xmldata.name IS NULL then a.xmldata.propref_name.name else a.xmldata.name end )AS ATTRIBUTE_NAME, (case when a.xmldata.name IS NULL then 1 else 0 end )AS IS_REF, (case when a.xmldata.typename.name IS NULL then (select a1.xmldata.typename.name from xdb.xdb$attribute a1 where ref(a1)=a.xmldata.propref_ref) else a.xmldata.typename.name end )AS TYPE_NAME, a.xmldata.global GLOBAL, value(a) ATTRIBUTE, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, a.xmldata.sqltype AS SQL_TYPE, a.xmldata.sqlname AS SQL_NAME from xdb.xdb$schema s, xdb.xdb$attribute a, xdb.xdb$element e, xdb.xdb$complex_type ct, table(ct.xmldata.simplecont.extension.attributes) att where sys_op_r2o(a.xmldata.parent_schema) = s.sys_nc_oid$ and ref(ct) = e.xmldata.property.type_ref and att.column_value = ref(a) UNION ALL select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, (case when a.xmldata.name IS NULL then a.xmldata.propref_name.name else a.xmldata.name end )AS ATTRIBUTE_NAME, (case when a.xmldata.name IS NULL then 1 else 0 end )AS IS_REF, (case when a.xmldata.typename.name IS NULL then ( select a1.xmldata.typename.name from xdb.xdb$attribute a1 where ref(a1)=a.xmldata.propref_ref) else a.xmldata.typename.name end )AS TYPE_NAME, a.xmldata.global GLOBAL, value(a) ATTRIBUTE, NULL AS ELEMENT_ID, a.xmldata.sqltype AS SQL_TYPE, a.xmldata.sqlname AS SQL_NAME from xdb.xdb$schema s, xdb.xdb$attribute a where sys_op_r2o(a.xmldata.parent_schema) = s.sys_nc_oid$ and ( ( ref(a) NOT IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.attributes)t) AND ref(a) NOT IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.simplecont.extension.attributes)t) AND ref(a) NOT IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.simplecont.restriction.attributes)t) ) OR ( ( ref(a) IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.attributes)t) OR ref(a) IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.simplecont.extension.attributes)t) OR ref(a) IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.simplecont.restriction.attributes)t) ) and (select ref(ct) from xdb.xdb$complex_type ct,table(ct.xmldata.attributes)t,table(ct.xmldata.simplecont.extension.attributes)t1,table(ct.xmldata.simplecont.restriction.attributes)t2 where ref(a) = t.column_value OR ref(a) = t1.column_value OR ref(a) = t2.column_value ) NOT IN ( select e.xmldata.property.type_ref from xdb.xdb$element e) ) ) / grant select on DBA_XML_SCHEMA_ATTRIBUTES to select_catalog_role / create or replace public synonym DBA_XML_SCHEMA_ATTRIBUTES for DBA_XML_SCHEMA_ATTRIBUTES / /* This view selects all the attributes accessible to the current user. The properties are derived from xmldata properties. The element id is the unique identifier used to identify the element to which the attribute belongs. The element id relates to the dba_user_elements. This helps in traversing the xml document. OWNER - the user who owns the attribute XML_SCHEMA_URL - the url of schema within which the attribute exists TARGET_NAMESPACE - the namespace of the attribute ATTRIBUTE_NAME - name of the attribute TYPE_NAME - name of type of the attribute GLOBAL - is 1 if attribute is global else 0. ATTRIBUTE - actual xmltype for the attribute ELEMENT_ID - element id of the element to which the attribute belongs */ create or replace view ALL_XML_SCHEMA_ATTRIBUTES as select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, (case when a.xmldata.name IS NULL then a.xmldata.propref_name.name else a.xmldata.name end )AS ATTRIBUTE_NAME, (case when a.xmldata.name IS NULL then 1 else 0 end )AS IS_REF, (case when a.xmldata.typename.name IS NULL then (select a1.xmldata.typename.name from xdb.xdb$attribute a1 where ref(a1)=a.xmldata.propref_ref) else a.xmldata.typename.name end )AS TYPE_NAME, a.xmldata.global GLOBAL, value(a) ATTRIBUTE, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, a.xmldata.sqltype AS SQL_TYPE, a.xmldata.sqlname AS SQL_NAME from xdb.xdb$schema s, xdb.xdb$attribute a, all_xml_schemas al, xdb.xdb$element e, xdb.xdb$complex_type ct, table(ct.xmldata.attributes) att where sys_op_r2o(a.xmldata.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = al.owner and s.xmldata.schema_url = al.schema_url and ref(ct) = e.xmldata.property.type_ref and att.column_value = ref(a) UNION ALL select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, (case when a.xmldata.name IS NULL then a.xmldata.propref_name.name else a.xmldata.name end )AS ATTRIBUTE_NAME, (case when a.xmldata.name IS NULL then 1 else 0 end )AS IS_REF, (case when a.xmldata.typename.name IS NULL then (select a1.xmldata.typename.name from xdb.xdb$attribute a1 where ref(a1)=a.xmldata.propref_ref) else a.xmldata.typename.name end )AS TYPE_NAME, a.xmldata.global GLOBAL, value(a) ATTRIBUTE, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, a.xmldata.sqltype AS SQL_TYPE, a.xmldata.sqlname AS SQL_NAME from xdb.xdb$schema s, xdb.xdb$attribute a, all_xml_schemas al, xdb.xdb$element e, xdb.xdb$complex_type ct, table(ct.xmldata.simplecont.restriction.attributes) att where sys_op_r2o(a.xmldata.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = al.owner and s.xmldata.schema_url = al.schema_url and ref(ct) = e.xmldata.property.type_ref and att.column_value = ref(a) UNION ALL select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, (case when a.xmldata.name IS NULL then a.xmldata.propref_name.name else a.xmldata.name end )AS ATTRIBUTE_NAME, (case when a.xmldata.name IS NULL then 1 else 0 end )AS IS_REF, (case when a.xmldata.typename.name IS NULL then (select a1.xmldata.typename.name from xdb.xdb$attribute a1 where ref(a1)=a.xmldata.propref_ref) else a.xmldata.typename.name end )AS TYPE_NAME, a.xmldata.global GLOBAL, value(a) ATTRIBUTE, hextoraw(e.xmldata.property.prop_number) AS ELEMENT_ID, a.xmldata.sqltype AS SQL_TYPE, a.xmldata.sqlname AS SQL_NAME from xdb.xdb$schema s, xdb.xdb$attribute a, all_xml_schemas al, xdb.xdb$element e, xdb.xdb$complex_type ct, table(ct.xmldata.simplecont.extension.attributes) att where sys_op_r2o(a.xmldata.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = al.owner and s.xmldata.schema_url = al.schema_url and ref(ct) = e.xmldata.property.type_ref and att.column_value = ref(a) UNION ALL select s.xmldata.schema_owner OWNER, s.xmldata.schema_url SCHEMA_URL, s.xmldata.target_namespace TARGET_NAMESPACE, (case when a.xmldata.name IS NULL then a.xmldata.propref_name.name else a.xmldata.name end )AS ATTRIBUTE_NAME, (case when a.xmldata.name IS NULL then 1 else 0 end )AS IS_REF, (case when a.xmldata.typename.name IS NULL then (select a1.xmldata.typename.name from xdb.xdb$attribute a1 where ref(a1)=a.xmldata.propref_ref) else a.xmldata.typename.name end )AS TYPE_NAME, a.xmldata.global GLOBAL, value(a) ATTRIBUTE, NULL AS ELEMENT_ID, a.xmldata.sqltype AS SQL_TYPE, a.xmldata.sqlname AS SQL_NAME from xdb.xdb$schema s, xdb.xdb$attribute a, all_xml_schemas al where sys_op_r2o(a.xmldata.parent_schema) = s.sys_nc_oid$ and s.xmldata.schema_owner = al.owner and s.xmldata.schema_url = al.schema_url and ( ( ref(a) NOT IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.attributes)t) AND ref(a) NOT IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.simplecont.extension.attributes)t) AND ref(a) NOT IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.simplecont.restriction.attributes)t) ) OR ( ( ref(a) IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.attributes)t) OR ref(a) IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.simplecont.extension.attributes)t) OR ref(a) IN (select t.column_value from xdb.xdb$complex_type ct,table(ct.xmldata.simplecont.restriction.attributes)t) ) and (select ref(ct) from xdb.xdb$complex_type ct,table(ct.xmldata.attributes)t,table(ct.xmldata.simplecont.extension.attributes)t1,table(ct.xmldata.simplecont.restriction.attributes)t2 where ref(a) = t.column_value OR ref(a) = t1.column_value OR ref(a) = t2.column_value ) NOT IN ( select e.xmldata.property.type_ref from xdb.xdb$element e) ) ) / grant select on ALL_XML_SCHEMA_ATTRIBUTES to public / create or replace public synonym ALL_XML_SCHEMA_ATTRIBUTES for ALL_XML_SCHEMA_ATTRIBUTES / /* This view selects all the attributes for the current user XML_SCHEMA_URL - the url of schema within which the attribute exists TARGET_NAMESPACE - the namespace of the attribute ATTRIBUTE_NAME - name of the attribute TYPE_NAME - name of type of the attribute GLOBAL - is 1 if attribute is global else 0. ATTRIBUTE - actual xmltype for the attribute ELEMENT_ID - element id of the element to which the attribute belongs */ create or replace view USER_XML_SCHEMA_ATTRIBUTES as select SCHEMA_URL, TARGET_NAMESPACE, ATTRIBUTE_NAME, IS_REF,TYPE_NAME, GLOBAL,ATTRIBUTE, ELEMENT_ID, SQL_TYPE, SQL_NAME from DBA_XML_SCHEMA_ATTRIBUTES where OWNER = USER / grant select on USER_XML_SCHEMA_ATTRIBUTES to public / create or replace public synonym USER_XML_SCHEMA_ATTRIBUTES for USER_XML_SCHEMA_ATTRIBUTES / /* This view gives all the out of line tables connected to a given root table for the same schema. --Note, this will give the root_table also as a part of table_name. ROOT_TABLE_NAME Name of the root table ROOT_TABLE_OWNER Owner of the root table. TABLE_NAME Name of out of line table. TABLE_OWNER Owner of the out of line table. */ create or replace view DBA_XML_OUT_OF_LINE_TABLES as select d.xmlschema as SCHEMA_URL, --schema URL d.schema_owner as SCHEMA_OWNER, --schema owner d.table_name as TABLE_NAME, --out of line table name d.owner as TABLE_OWNER --out of line table owner from DBA_XML_TABLES d, sys.obj$ o, sys.opqtype$ op, sys.user$ u where o.owner# = u.user# and d.table_name = o.name and d.owner = u.name and o.obj# = op.obj# and bitand(op.flags,32) = 32 / grant select on DBA_XML_OUT_OF_LINE_TABLES to select_catalog_role / create or replace public synonym DBA_XML_OUT_OF_LINE_TABLES for DBA_XML_OUT_OF_LINE_TABLES / /* This view gives all the out of line tables connected to a given root table for the same schema. --Note, this will give the root_table also as a part of table_name. ROOT_TABLE_NAME Name of the root table ROOT_TABLE_OWNER Owner of the root table. TABLE_NAME Name of out of line table. TABLE_OWNER Owner of the out of line table. */ create or replace view ALL_XML_OUT_OF_LINE_TABLES as select d.xmlschema as SCHEMA_URL, --schema URL d.schema_owner as SCHEMA_OWNER, --schema owner d.table_name as TABLE_NAME, --out of line table name d.owner as TABLE_OWNER --out of line table owner from ALL_XML_TABLES d, sys.obj$ o, sys.opqtype$ op, sys.user$ u where o.owner# = u.user# and d.table_name = o.name and d.owner = u.name and o.obj# = op.obj# and bitand(op.flags,32) = 32 / grant select on ALL_XML_OUT_OF_LINE_TABLES to public / create or replace public synonym ALL_XML_OUT_OF_LINE_TABLES for ALL_XML_OUT_OF_LINE_TABLES / /* This view gives all the out of line tables connected to a given root table for the same schema where table owner is the current user. ROOT_TABLE_NAME Name of the root table ROOT_TABLE_OWNER Owner of the root table. TABLE_NAME Name of out of line table. */ create or replace view USER_XML_OUT_OF_LINE_TABLES as select SCHEMA_URL, --schema URL SCHEMA_OWNER, --schema owner TABLE_NAME --out of line table name from DBA_XML_OUT_OF_LINE_TABLES where TABLE_OWNER = USER / grant select on USER_XML_OUT_OF_LINE_TABLES to public / create or replace public synonym USER_XML_OUT_OF_LINE_TABLES for USER_XML_OUT_OF_LINE_TABLES / -- this view gets all the xmltype columns for all the relational tables --we only allow users owning the schema & tables to enable/disable --indexes in them. So, the definition for ALL_XMLTYPE_COLS below holds good. create or replace view DBA_XMLTYPE_COLS as (select s.sys_nc_oid$ as SCHEMA_ID, s.xmldata.schema_url as SCHEMA_URL, --schema URL for the column c.name as COL_NAME, --name of the relational column (select c1.name from sys.col$ c1 where c1.intcol# = op.objcol and c1.obj# = op.obj#) QUALIFIED_COL_NAME, o.name as TABLE_NAME, --name of the parent table u.name as TABLE_OWNER --parent table owner from xdb.xdb$schema s, sys.opqtype$ op, sys.col$ c, sys.obj$ o, sys.user$ u, dba_tables a where o.type# = 2 and o.obj# = op.obj# and o.obj# = c.obj# and op.schemaoid = s.sys_nc_oid$ and o.owner# = u.user# and c.intcol# = op.intcol# and o.name = a.table_name and u.name = a.owner UNION select NULL as SCHEMA_ID, NULL as SCHEMA_URL, --schema URL for the column c.name as COL_NAME, --name of the relational column (select c1.name from sys.col$ c1 where c1.intcol# = op.objcol and c1.obj# = op.obj#) QUALIFIED_COL_NAME, o.name as TABLE_NAME, --name of the parent table u.name as TABLE_OWNER --parent table owner from sys.opqtype$ op, sys.col$ c, sys.obj$ o, sys.user$ u, dba_tables a where o.type# = 2 and o.obj# = op.obj# and o.obj# = c.obj# and c.intcol# = op.intcol# and o.owner# = u.user# and o.name = a.table_name and u.name = a.owner and op.schemaoid IS NULL); / grant select on DBA_XMLTYPE_COLS to select_catalog_role / create or replace public synonym DBA_XMLTYPE_COLS for DBA_XMLTYPE_COLS / create or replace view ALL_XMLTYPE_COLS as ((select s.sys_nc_oid$ as SCHEMA_ID, s.xmldata.schema_url as SCHEMA_URL, --schema URL for the column c.name as COL_NAME, --name of the relational column (select c1.name from sys.col$ c1 where c1.intcol# = op.objcol and c1.obj# = op.obj#) QUALIFIED_COL_NAME, o.name as TABLE_NAME, --name of the parent table u.name as TABLE_OWNER --parent table owner from xdb.xdb$schema s, sys.opqtype$ op, sys.col$ c, sys.obj$ o, sys.user$ u, all_tables a where o.type# = 2 and o.obj# = op.obj# and o.obj# = c.obj# and op.schemaoid = s.sys_nc_oid$ and o.owner# = u.user# and c.intcol# = op.intcol# and o.name = a.table_name and u.name = a.owner) UNION (select NULL as SCHEMA_ID, NULL as SCHEMA_URL, --schema URL for the column c.name as COL_NAME, --name of the relational column (select c1.name from sys.col$ c1 where c1.intcol# = op.objcol and c1.obj# = op.obj#) QUALIFIED_COL_NAME, o.name as TABLE_NAME, --name of the parent table u.name as TABLE_OWNER --parent table owner from sys.opqtype$ op, sys.col$ c, sys.obj$ o, sys.user$ u, all_tables a where o.type# = 2 and o.obj# = op.obj# and o.obj# = c.obj# and o.owner# = u.user# and c.intcol# = op.intcol# and o.name = a.table_name and u.name = a.owner and op.schemaoid IS NULL)); / grant select on ALL_XMLTYPE_COLS to public / create or replace public synonym ALL_XMLTYPE_COLS for ALL_XMLTYPE_COLS / create or replace view USER_XMLTYPE_COLS as select SCHEMA_ID, SCHEMA_URL, COL_NAME, QUALIFIED_COL_NAME, TABLE_NAME from DBA_XMLTYPE_COLS where TABLE_OWNER = USER; grant select on USER_XMLTYPE_COLS to public / create or replace public synonym USER_XMLTYPE_COLS for USER_XMLTYPE_COLS / /* This view selects all the tables and their corresponding nested tables. OWNER owner of the table TABLE_NAME Name of the table NESTED_TABLE_NAME Name of the nested table. */ create or replace view DBA_XML_NESTED_TABLES as select x.OWNER, x.TABLE_NAME, NESTED_TABLE_NAME from DBA_XML_TABLES x, ( select TABLE_NAME NESTED_TABLE_NAME, connect_by_root PARENT_TABLE_NAME PARENT_TABLE_NAME, OWNER from DBA_NESTED_TABLES nt connect by prior TABLE_NAME = PARENT_TABLE_NAME and OWNER = OWNER ) nt where x.TABLE_NAME = nt.PARENT_TABLE_NAME and x.OWNER = nt.OWNER / grant select on DBA_XML_NESTED_TABLES to select_catalog_role / create or replace public synonym DBA_XML_NESTED_TABLES for DBA_XML_NESTED_TABLES / create or replace view ALL_XML_NESTED_TABLES as select x.OWNER, x.TABLE_NAME, NESTED_TABLE_NAME from ALL_XML_TABLES x, ( select TABLE_NAME NESTED_TABLE_NAME, connect_by_root PARENT_TABLE_NAME PARENT_TABLE_NAME, OWNER from ALL_NESTED_TABLES nt connect by prior TABLE_NAME = PARENT_TABLE_NAME and OWNER = OWNER ) nt where x.TABLE_NAME = nt.PARENT_TABLE_NAME and x.OWNER = nt.OWNER / grant select on ALL_XML_NESTED_TABLES to public / create or replace public synonym ALL_XML_NESTED_TABLES for ALL_XML_NESTED_TABLES / create or replace view USER_XML_NESTED_TABLES as select TABLE_NAME, NESTED_TABLE_NAME from DBA_XML_NESTED_TABLES where OWNER = USER / grant select on USER_XML_NESTED_TABLES to public / create or replace public synonym USER_XML_NESTED_TABLES for USER_XML_NESTED_TABLES / --********************************************************* -- end of view definitions --********************************************************* -- CREATE Constants package -- ******************************************************************* CREATE OR REPLACE PACKAGE XDB.DBMS_XDB_CONSTANTS authid CURRENT_USER AS C_UTF8_ENCODING constant VARCHAR2(32) := 'AL32UTF8'; C_WIN1252_ENCODING constant VARCHAR2(32) := 'WE8MSWIN1252'; C_ISOLATIN1_ENCODING constant VARCHAR2(32) := 'WE8ISO8859P1'; C_DEFAULT_ENCODING constant VARCHAR2(32) := C_UTF8_ENCODING; C_ORACLE_NAMESPACE constant VARCHAR2(128) := 'http://xmlns.oracle.com'; C_ORACLE_XDB_NAMESPACE constant VARCHAR2(128) := C_ORACLE_NAMESPACE || '/xdb'; C_XDBSCHEMA_NAMESPACE constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || '/XDBSchema.xsd'; C_RESOURCE_NAMESPACE constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || '/XDBResource.xsd'; C_ACL_NAMESPACE constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || '/acl.xsd'; C_XMLSCHEMA_NAMESPACE constant VARCHAR2(128) := 'http://www.w3.org/2001/XMLSchema'; C_XMLINSTANCE_NAMESPACE constant VARCHAR2(128) := 'http://www.w3.org/2001/XMLSchema-instance'; C_RESOURCE_PREFIX_R constant VARCHAR2(128) := 'xmlns:r="' || C_RESOURCE_NAMESPACE || '"'; C_ACL_PREFIX_ACL constant VARCHAR2(128) := 'xmlns:acl="' || C_ACL_NAMESPACE || '"'; C_XDBSCHEMA_PREFIX_XDB constant VARCHAR2(128) := 'xmlns:xdb="' || C_ORACLE_XDB_NAMESPACE || '"'; C_XMLSCHEMA_PREFIX_XSD constant VARCHAR2(128) := 'xmlns:xsd="' || C_XMLSCHEMA_NAMESPACE || '"'; C_XMLINSTANCE_PREFIX_XSI constant VARCHAR2(128) := 'xmlns:xsi="' || C_XMLINSTANCE_NAMESPACE || '"'; C_XDBSCHEMA_LOCATION constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || '/XDBSchema.xsd'; C_XDBCONFIG_LOCATION constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || 'xdbconfig.xsd'; C_ACL_LOCATION constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || '/acl.xsd'; C_RESOURCE_LOCATION constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || '/XDBResource.xsd'; C_BINARY_CONTENT constant VARCHAR2(128) := C_XDBSCHEMA_LOCATION || '#binary'; C_TEXT_CONTENT constant VARCHAR2(128) := C_XDBSCHEMA_LOCATION || '#text'; C_ACL_CONTENT constant VARCHAR2(128) := C_ACL_LOCATION || '#acl'; C_XDBSCHEMA_PREFIXES constant VARCHAR2(256) := C_XMLSCHEMA_PREFIX_XSD || ' ' || C_XDBSCHEMA_PREFIX_XDB; C_EXIF_NAMESPACE constant VARCHAR2(128) := C_ORACLE_NAMESPACE || '/meta/exif'; C_IPTC_NAMESPACE constant VARCHAR2(128) := C_ORACLE_NAMESPACE || '/ord/meta/iptc'; C_DICOM_NAMESPACE constant VARCHAR2(128) := C_ORACLE_NAMESPACE || '/ord/meta/dicomImage'; C_ORDIMAGE_NAMESPACE constant VARCHAR2(128) := C_ORACLE_NAMESPACE || '/ord/meta/ordimage'; C_XMP_NAMESPACE constant VARCHAR2(128) := C_ORACLE_NAMESPACE || '/ord/meta/xmp'; C_XDBCONFIG_NAMESPACE constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || 'xdbconfig.xsd'; C_EXIF_PREFIX_EXIF constant VARCHAR2(128) := 'xmlns:exif="' || C_EXIF_NAMESPACE || '"'; C_IPTC_PREFIX_IPTC constant VARCHAR2(128) := 'xmlns:iptc="' || C_IPTC_NAMESPACE || '"'; C_DICOM_PREFIX_DICOM constant VARCHAR2(128) := 'xmlns:dicom="' || C_DICOM_NAMESPACE || '"'; C_ORDIMAGE_PREFIX_ORD constant VARCHAR2(128) := 'xmlns:ord="' || C_ORDIMAGE_NAMESPACE || '"'; C_XMP_PREFIX_XMP constant VARCHAR2(128) := 'xmlns:xmp="' || C_XMP_NAMESPACE || '"'; C_RESOURCE_CONFIG_NAMESPACE constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || '/XDBResConfig.xsd'; C_XMLDIFF_NAMESPACE constant VARCHAR2(128) := C_ORACLE_XDB_NAMESPACE || '/xdiff.xsd'; C_RESOURCE_CONFIG_PREFIX_RC constant VARCHAR2(128) := 'xmlns:rc="' || C_RESOURCE_CONFIG_NAMESPACE || '"'; C_XMLDIFF_PREFIX_XD constant VARCHAR2(128) := 'xmlns:xd="' || C_XMLDIFF_NAMESPACE || '"'; C_NSPREFIX_XDBCONFIG_CFG constant VARCHAR2(128) := 'xmlns:cfg="' || C_XDBCONFIG_NAMESPACE || '"'; C_GROUP constant VARCHAR2(32) := 'group'; C_ELEMENT constant VARCHAR2(32) := 'element'; C_ATTRIBUTE constant VARCHAR2(32) := 'attribute'; C_COMPLEX_TYPE constant VARCHAR2(32) := 'complexType'; function ENCODING_UTF8 return varchar2 deterministic; -- returns 'AL32UTF8' function ENCODING_ISOLATIN1 return varchar2 deterministic; -- returns 'WE8ISO8859P1' function ENCODING_WIN1252 return varchar2 deterministic; -- returns 'WE8MSWIN1252' function ENCODING_DEFAULT return varchar2 deterministic; -- returns 'AL32UTF8' function NAMESPACE_ORACLE_XDB return varchar2 deterministic; -- returns 'http://xmlns.oracle.com/xdb' function NAMESPACE_RESOURCE return varchar2 deterministic; -- returns ' http://xmlns.oracle.com/xdb/XDBResource.xsd function NAMESPACE_XDBSCHEMA return varchar2 deterministic; -- returns ' http://xmlns.oracle.com/xdb/XDBSchema.xsd function NAMESPACE_ACL return varchar2 deterministic; -- returns ' http://xmlns.oracle.com/xdb/acl.xsd' function NAMESPACE_ORACLE return varchar2 deterministic; -- returns 'http://xmlns.oracle.com' function NAMESPACE_XMLSCHEMA return varchar2 deterministic; -- returns 'http://www.w3.org/2001/XMLSchema' function NAMESPACE_XMLINSTANCE return varchar2 deterministic; -- returns 'http://www.w3.org/2001/XMLSchema-instance' function NAMESPACE_RESOURCE_CONFIG return varchar2 deterministic; -- returns 'http://xmlns.oracle.com/xdb/XDBResConfig.xsd' function NAMESPACE_XMLDIFF return varchar2 deterministic; -- returns 'http://xmlns.oracle.com/xdb/xdiff.xsd' function NAMESPACE_XDBCONFIG return varchar2 deterministic; -- returns 'http://xmlns.oracle.com/xdb/xdbconfig.xsd' function SCHEMAURL_XDBCONFIG return varchar2 deterministic; -- returns 'http://xmlns.oracle.com/xdb/xdbconfig.xsd' function NSPREFIX_RESOURCE_R return varchar2 deterministic; -- returns 'xmlns:r="http://xmlns.oracle.com/XDBResource.xsd"' function NSPREFIX_ACL_ACL return varchar2 deterministic; -- returns 'xmlns:acl= 'http://xmlns.oracle.com/acl.xsd"' function NSPREFIX_XDB_XDB return varchar2 deterministic; -- returns 'xmlns:xdb= $B!H(Bhttp://xmlns.oracle.com/xdb" ' function NSPREFIX_XMLSCHEMA_XSD return varchar2 deterministic; -- returns 'xmlns:xsd="http://www.w3.org/2001/XMLSchema"' function NSPREFIX_XMLINSTANCE_XSI return varchar2 deterministic; -- returns 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' function NSPREFIX_RESCONFIG_RC return varchar2 deterministic; -- returns 'xmlns:rc="' || NAMESPACE_RESOURCE_CONFIG function NSPREFIX_XMLDIFF_XD return varchar2 deterministic; -- returns xmlns:xd="' || NAMESPACE_XMLDIFF function NSPREFIX_XDBCONFIG_CFG return varchar2 deterministic; -- returns xmlns:cfg="http://xmlns.oracle.com/xdb/xdbconfig.xsd" function SCHEMAURL_XDBSCHEMA return varchar2 deterministic; -- returns 'http://xmlns.oracle.com/xdb/XDBSchema.xsd'; function SCHEMAURL_ACL return varchar2 deterministic; -- returns 'http://xmlns.oracle.com/xdb/acl.xsd'; function SCHEMAURL_RESOURCE return varchar2 deterministic; -- returns 'http://xmlns.oracle.com/xdb/XDBResource.xsd'; function SCHEMAELEM_RESCONTENT_BINARY return varchar2 deterministic; -- returns SCHEMAURL_XDBSCHEMA || '#binary' function SCHEMAELEM_RESCONTENT_TEXT return varchar2 deterministic; -- returns SCHEMAURL_XDBSCHEMA || '#text' function SCHEMAELEM_RES_ACL return varchar2 deterministic; -- returns SCHEMAURL_XDBSCHEMA || '#acl' function XSD_GROUP return VARCHAR2 deterministic; -- returns 'group' function XSD_ELEMENT return VARCHAR2 deterministic; -- returns 'element' function XSD_ATTRIBUTE return VARCHAR2 deterministic; -- returns 'attribute' function XSD_COMPLEX_TYPE return VARCHAR2 deterministic; -- returns 'complexType' function XDBSCHEMA_PREFIXES return VARCHAR2 deterministic; -- returns DBMS_XDB_CONSTANTS.PREFIX_DEF_XDB || ' ' || -- DBMS_XDB_CONSTANTS.PREFIX_DEF_XMLSCHEMA END DBMS_XDB_CONSTANTS; / SHOW ERRORS; grant execute on XDB.DBMS_XDB_CONSTANTS to public; -- ******************************************************************* CREATE OR REPLACE PACKAGE XDB.DBMS_XMLSCHEMA_ANNOTATE authid CURRENT_USER AS procedure printWarnings(value in BOOLEAN default TRUE); procedure addXDBNamespace(xmlschema in out XMLType); -- Adds the XDB namespace that is required for xdb annotation. -- This procedure is called implicitly by any other procedure that adds a -- schema annotation. Without further annotations the xdb namespace -- annotations does not make sense, therefore this procedure might mostly -- be called by other annotations procedures and not by the user directly. -- The procedure gets an XML Schema as XMLType, performs the annotation and -- returns it. procedure setDefaultTable(xmlschema in out XMLType, globalElementName VARCHAR2, tableName VARCHAR2, overwrite BOOLEAN default TRUE); -- Sets the name of the default table for a given global element that is -- specified by its name procedure removeDefaultTable(xmlschema in out XMLType, globalElementName VARCHAR2); -- Removes the default table attribute for the given element. -- After calling this -- function system generated table names will be used. The procedure will -- always overwrite. procedure setTableProps(xmlschema in out XMLType, globalElementName VARCHAR2, tableProps VARCHAR2, overwrite BOOLEAN default TRUE); -- Specifies the TABLE storage clause that is appended to the default -- CREATE TABLE statement. procedure removeTableProps(xmlschema in out XMLType, globalElementName VARCHAR2); -- removes the table storage props. procedure setTableProps(xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localElementName VARCHAR2, tableProps VARCHAR2, overwrite BOOLEAN default TRUE); -- Specifies the TABLE storage clause that is appended to the -- default CREATE TABLE statement. procedure removeTableProps(xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localElementName VARCHAR2); -- Removes the TABLE storage clause that is appended to the -- default CREATE TABLE statement. procedure disableDefaultTableCreation(xmlschema in out XMLType, globalElementName VARCHAR2); -- Add a default table attribute with an empty value to the -- top level element with the specified name. -- No table will be created for that element. -- The procedure will always overwrite. procedure disableDefaultTableCreation(xmlschema in out XMLType); -- Add a default table attribute with an empty value to ALL top level -- elements that have no defined default table name. -- The procedure will never overwrite existing annotations since this -- would lead to no table creation at all. -- This is the way to prevent XDB from creating many and unused tables -- for elements that are no root elements of -- instance documents. /* TODO This function * This functions should test that at least one default table with a given * name exists. If no default table name is assigned calling this * disableTopLevelTableCreation would lead to no table creation at all. */ procedure enableDefaultTableCreation(xmlschema in out XMLType, globalElementName VARCHAR2); -- Enables the creation of top level tables by removing the empty default -- table name annotation. procedure enableDefaultTableCreation(xmlschema in out XMLType); -- Enables the creation of ALL top level tables by removing the empty -- default table name annotation. procedure setSQLName (xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localObject VARCHAR2, localObjectName VARCHAR2, sqlName VARCHAR2, overwrite BOOLEAN default TRUE); -- assigns a sqlname to an element procedure removeSQLName (xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localObject VARCHAR2, localObjectName VARCHAR2); -- removes a sqlname from a global element procedure setSQLType (xmlschema in out XMLType, globalElementName VARCHAR2, sqlType VARCHAR2, overwrite BOOLEAN default TRUE); -- assigns a sqltype to a global element procedure removeSQLType (xmlschema in out XMLType, globalElementName VARCHAR2); -- removes a sqltype from a global element procedure setSQLType(xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localObject VARCHAR2, localObjectName VARCHAR2, sqlType VARCHAR2, overwrite BOOLEAN default TRUE); -- assigns a sqltype inside a complex type (local) procedure removeSQLType (xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localObject VARCHAR2, localObjectName VARCHAR2); -- removes a sqltype inside a complex type (local) procedure setSQLTypeMapping(xmlschema in out XMLType, schemaTypeName VARCHAR2, sqlTypeName VARCHAR2, overwrite BOOLEAN default TRUE); -- defines a mapping of schema type and sqltype. -- The addSQLType procedure do not have to be called on all instances of -- the schema type instead the schema is traversed and the -- sqltype is assigned automatically. procedure removeSQLTypeMapping(xmlschema in out XMLType, schemaTypeName VARCHAR2); -- removes the sqltype mapping for the given schema type. procedure setTimeStampWithTimeZone(xmlschema in out xmlType, overwrite BOOLEAN default TRUE); -- sets the TimeStampWithTimeZone datatype to dateTime typed element. procedure removeTimeStampWithTimeZone(xmlschema in out xmlType); -- removes the TimeStampWithTimeZone datatype to dateTime typed element. procedure setAnyStorage (xmlschema in out XMLType, complexTypeName VARCHAR2, sqlTypeName VARCHAR2, overwrite BOOLEAN default TRUE); -- sets the sqltype of any procedure removeAnyStorage (xmlschema in out XMLType, complexTypeName VARCHAR2); -- removes the sqltype of any procedure setSQLCollType(xmlschema in out XMLType, elementName VARCHAR2, sqlCollType VARCHAR2, overwrite BOOLEAN default TRUE); -- sets the name of the SQL collection type that corresponds -- to this XML element procedure removeSQLCollType(xmlschema in out XMLType, elementName VARCHAR2); -- removes the sql collection type procedure setSQLCollType(xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localElementName VARCHAR2, sqlCollType VARCHAR2, overwrite BOOLEAN default TRUE ); -- Name of the SQL collection type that corresponds to this -- XML element. inside a complex type. procedure removeSQLCollType(xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localElementName VARCHAR2); -- removes the sql collection type procedure disableMaintainDom(xmlschema in out XMLType, overwrite BOOLEAN default TRUE); -- sets dom fidelity to FALSE to ALL complex types irregardless -- of their names procedure enableMaintainDom(xmlschema in out XMLType, overwrite BOOLEAN default TRUE); -- sets dom fidelity to TRUE to ALL complex types irregardless -- of their names procedure disableMaintainDom(xmlschema in out XMLType, complexTypeName VARCHAR2, overwrite BOOLEAN default TRUE); -- sets the dom fidelity attribute for the given complex type name to FALSE. procedure enableMaintainDom(xmlschema in out XMLType, complexTypeName VARCHAR2, overwrite BOOLEAN default TRUE); -- sets the dom fidelity attribute for the given complex type name to TRUE procedure removeMaintainDom(xmlschema in out XMLType); -- removes all maintain dom annotations from given schema procedure setOutOfLine(xmlschema in out XMLType, elementName VARCHAR2, elementType VARCHAR2, defaultTableName VARCHAR2, overwrite BOOLEAN default TRUE); -- set the sqlInline attribute to false and forces the out of line storage -- for the element specified by its name. procedure removeOutOfLine(xmlschema in out XMLType, elementName VARCHAR2, elementType VARCHAR2); -- removes the sqlInline attribute for the element specified by its name. procedure setOutOfLine (xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localElementName VARCHAR2, defaultTableName VARCHAR2, overwrite BOOLEAN default TRUE); -- set the sqlInline attribute to false and forces the out of line storage -- for the element specified by its local and global name procedure removeOutOfLine (xmlschema in out XMLType, globalObject VARCHAR2, globalObjectName VARCHAR2, localElementName VARCHAR2); -- removes the sqlInline attribute for the element specified by its -- global and local name procedure setOutOfLine(xmlschema in out XMLType, reference VARCHAR2, defaultTableName VARCHAR2, overwrite BOOLEAN default TRUE); -- sets the default table name and sqlinline attribute for all references -- to a particular global Element procedure removeOutOfLine(xmlschema in out XMLType, reference VARCHAR2); -- removes the the sqlInline attribute for the global element $IF DBMS_DB_VERSION.VER_LE_10_2 $THEN -- NOOP $ELSE function getSchemaAnnotations(xmlschema xmlType) return XMLType; -- creates a diff of the annotated xml schema and the -- non-annotated xml schema. -- This diff can be used to apply all annotation again on a -- non-annotated schema. -- A user calls this function to save all annotations in one document. procedure setSchemaAnnotations(xmlschema in out xmlType, annotations XMLTYPE); -- Will take the annotations -- (diff result from call to 'getSchemaAnnotations' -- and will patch in provided XML schema. $END --DBMS_DB_VERSION.VER_LE_10_1 END DBMS_XMLSCHEMA_ANNOTATE; / SHOW ERRORS; grant execute on XDB.DBMS_XMLSCHEMA_ANNOTATE to public; --************************************************** -- Create type required for dbms_manage_xmlstorage -- ************************************************** create or replace TYPE XDB.XMLTYPE_REF_TABLE_T IS TABLE of REF XMLTYPE / grant execute on XDB.XMLTYPE_REF_TABLE_T to public / --************************************************** -- Create package dbms_manage_xmlstorage -- ************************************************** CREATE OR REPLACE PACKAGE XDB.DBMS_XMLSTORAGE_MANAGE authid CURRENT_USER AS $IF DBMS_DB_VERSION.VER_LE_10_2 $THEN procedure renameCollectionTable (owner_name varchar2 default user, tab_name varchar2, col_name varchar2 default NULL, xpath varchar2, collection_table_name varchar2); $ELSIF DBMS_DB_VERSION.VER_LE_11_1 $THEN procedure renameCollectionTable (owner_name varchar2 default user, tab_name varchar2, col_name varchar2 default NULL, xpath varchar2, collection_table_name varchar2); $ELSE --11.2 procedure renameCollectionTable (owner_name varchar2 default user, tab_name varchar2, col_name varchar2 default NULL, xpath varchar2, collection_table_name varchar2, namespaces IN VARCHAR2 default NULL); $END -- Renames a collection table from the system generated name -- to the given table name. -- This function is called AFTER registering the xml schema. -- NOTE: Since there is no direct schema annotation for this purpose -- this post registration -- function has to be used. Because all other functions are used before -- registration this -- function breaks the consistency. In addition, this is the only case -- where we encourage the -- user/dba to change a table/type name after registration. -- Since one goal of the schema annotation is to enable more readable -- query execution plans -- we recommend to derive the name of a collection table by its -- corresponding collection type name. -- Since we have an annotation for collection type we should use this one -- when creating the collection -- table. This might make the renameCollectionTable obsolete. procedure scopeXMLReferences; -- Will scope all XML references. Scoped REF types require -- less storage space and allow more -- efficient access than unscoped REF types. -- Note: This procedure does not need to be exposed -- to customer if called automatically from -- schema registration code. -- In this case we will either move the procedure into a prvt package -- or call the body of scopeXMLReferences from schema registration code -- directly so that the -- procedure would not be published at all. procedure indexXMLReferences( owner_name VARCHAR2 default user, table_name VARCHAR2, column_name VARCHAR2 default NULL, index_name VARCHAR2); -- This procedure creates unique indexes on the ref columns -- of the given XML type tables or XML type column of a given table. -- In case of an XML type table the column name does not -- have to be specified. -- The index_name will be used to name the index- since multiple ref -- columns could be affected the table name gets a iterator concatenated -- at the end. -- For instance if two ref columns are getting indexed they will be named -- index_name_1 and index_name_2. -- The procdure indexXMLReferences will not recursively index refs in child -- tables of the table that this procedure is called on. -- If this is desired we recommend to call the -- procedure from within a loop over the -- DBA|ALL|USER_ XML_OUT_OF_LINE_TABLES or -- DBA|ALL|USER_ XML_NESTED_TABLES view. -- The index_name could then be created from the current -- value of a view's column. -- Indexed refs lead to higher performance when joins between the -- child table and base table -- occur in the query plan. If the selectivity of the child table -- is higher than the join of one -- row in the child table with the base table leads to a full table -- scan of the base table if no indexes are present. -- This is the exact motivation for indexing the refs in the base table. -- If the base table has a higher selectivity than the child table there -- is no need to index the refs. -- Indexing the refs makes only sense if the refs are scoped. -- ** Bulkload functionality procedure disableIndexesAndConstraints(owner_name varchar2 default user, table_name varchar2, column_name varchar2 default NULL, clear Boolean default FALSE); -- This procedure will be used to drop the indexes and disable -- the constraints for both xmltype -- table (no P_COL_NAME) and xmltype columns. -- For xmltype tables, the user needs to pass the xmltype-table -- name on which the bulk load operation is to be performed. -- For xmltype columns, the user needs to pass -- the relational table_name and the corresponding xmltype column name. procedure enableIndexesAndConstraints(owner_name varchar2 default user, table_name varchar2, column_name varchar2 default NULL); -- This procedure will rebuild all indexes and enable the constraints -- on the P_TABLE_NAME including its -- child and out of line tables. -- When P_COL_NAME is passed, it does the same for this xmltype column. $IF DBMS_DB_VERSION.VER_LE_10_2 $THEN -- noop $ELSIF DBMS_DB_VERSION.VER_LE_11_1 $THEN -- noop $ELSE --11.2 -- routine to disable constraints before exchange partition procedure ExchangePreProc(owner_name varchar2 default user, table_name varchar2); -- routine to enable constraints after exchange partition procedure ExchangePostProc(owner_name varchar2 default user, table_name varchar2); $END -- XPath to Tab/Col Mapping $IF DBMS_DB_VERSION.VER_LE_10_2 $THEN -- noop $ELSIF DBMS_DB_VERSION.VER_LE_11_1 $THEN -- noop $ELSE --11.2 function xpath2TabColMapping(owner_name VARCHAR2 default user, table_name IN VARCHAR2, column_name IN VARCHAR2 default NULL, xpath IN VARCHAR2, namespaces IN VARCHAR2 default NULL) RETURN XMLTYPE; $END END DBMS_XMLSTORAGE_MANAGE; / SHOW ERRORS; grant execute on XDB.DBMS_XMLSTORAGE_MANAGE to public;
the_stack
CREATE FUNCTION rumhandler(internal) RETURNS index_am_handler AS 'MODULE_PATHNAME' LANGUAGE C; /* * RUM access method */ CREATE ACCESS METHOD rum TYPE INDEX HANDLER rumhandler; /* * RUM built-in types, operators and functions */ -- Type used in distance calculations with normalization argument CREATE TYPE rum_distance_query AS (query tsquery, method int); CREATE FUNCTION tsquery_to_distance_query(tsquery) RETURNS rum_distance_query AS 'MODULE_PATHNAME', 'tsquery_to_distance_query' LANGUAGE C IMMUTABLE STRICT; CREATE CAST (tsquery AS rum_distance_query) WITH FUNCTION tsquery_to_distance_query(tsquery) AS IMPLICIT; CREATE FUNCTION rum_ts_distance(tsvector,tsquery) RETURNS float4 AS 'MODULE_PATHNAME', 'rum_ts_distance_tt' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_ts_distance(tsvector,tsquery,int) RETURNS float4 AS 'MODULE_PATHNAME', 'rum_ts_distance_ttf' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_ts_distance(tsvector,rum_distance_query) RETURNS float4 AS 'MODULE_PATHNAME', 'rum_ts_distance_td' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( LEFTARG = tsvector, RIGHTARG = tsquery, PROCEDURE = rum_ts_distance ); CREATE OPERATOR <=> ( LEFTARG = tsvector, RIGHTARG = rum_distance_query, PROCEDURE = rum_ts_distance ); CREATE FUNCTION rum_timestamp_distance(timestamp, timestamp) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_timestamp_distance, LEFTARG = timestamp, RIGHTARG = timestamp, COMMUTATOR = <=> ); CREATE FUNCTION rum_timestamp_left_distance(timestamp, timestamp) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_timestamp_left_distance, LEFTARG = timestamp, RIGHTARG = timestamp, COMMUTATOR = |=> ); CREATE FUNCTION rum_timestamp_right_distance(timestamp, timestamp) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_timestamp_right_distance, LEFTARG = timestamp, RIGHTARG = timestamp, COMMUTATOR = <=| ); /* * rum_tsvector_ops operator class */ CREATE FUNCTION rum_extract_tsvector(tsvector,internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_extract_tsquery(tsquery,internal,smallint,internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_tsvector_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_tsquery_consistent(internal, smallint, tsvector, integer, internal, internal, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_tsquery_distance(internal,smallint,tsvector,int,internal,internal,internal,internal,internal) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- To prevent calling from SQL CREATE FUNCTION rum_ts_join_pos(internal, internal) RETURNS bytea AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_tsvector_ops DEFAULT FOR TYPE tsvector USING rum AS OPERATOR 1 @@ (tsvector, tsquery), OPERATOR 2 <=> (tsvector, tsquery) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 gin_cmp_tslexeme(text, text), FUNCTION 2 rum_extract_tsvector(tsvector,internal,internal,internal,internal), FUNCTION 3 rum_extract_tsquery(tsquery,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_tsquery_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 5 gin_cmp_prefix(text,text,smallint,internal), FUNCTION 6 rum_tsvector_config(internal), FUNCTION 7 rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 8 rum_tsquery_distance(internal,smallint,tsvector,int,internal,internal,internal,internal,internal), FUNCTION 10 rum_ts_join_pos(internal, internal), STORAGE text; /* * rum_tsvector_hash_ops operator class. * * Stores hash of entries as keys in index. */ CREATE FUNCTION rum_extract_tsvector_hash(tsvector,internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_extract_tsquery_hash(tsquery,internal,smallint,internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_tsvector_hash_ops FOR TYPE tsvector USING rum AS OPERATOR 1 @@ (tsvector, tsquery), OPERATOR 2 <=> (tsvector, tsquery) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 btint4cmp(integer, integer), FUNCTION 2 rum_extract_tsvector_hash(tsvector,internal,internal,internal,internal), FUNCTION 3 rum_extract_tsquery_hash(tsquery,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_tsquery_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 6 rum_tsvector_config(internal), FUNCTION 7 rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 8 rum_tsquery_distance(internal,smallint,tsvector,int,internal,internal,internal,internal,internal), FUNCTION 10 rum_ts_join_pos(internal, internal), STORAGE integer; /* * rum_timestamp_ops operator class */ -- timestamp operator class CREATE FUNCTION rum_timestamp_extract_value(timestamp,internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_timestamp_compare_prefix(timestamp,timestamp,smallint,internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_timestamp_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION rum_timestamp_extract_query(timestamp,internal,smallint,internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_timestamp_consistent(internal,smallint,timestamp,int,internal,internal,internal,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_timestamp_outer_distance(timestamp, timestamp, smallint) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_timestamp_ops DEFAULT FOR TYPE timestamp USING rum AS OPERATOR 1 <, OPERATOR 2 <=, OPERATOR 3 =, OPERATOR 4 >=, OPERATOR 5 >, --support FUNCTION 1 timestamp_cmp(timestamp,timestamp), FUNCTION 2 rum_timestamp_extract_value(timestamp,internal,internal,internal,internal), FUNCTION 3 rum_timestamp_extract_query(timestamp,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_timestamp_consistent(internal,smallint,timestamp,int,internal,internal,internal,internal), FUNCTION 5 rum_timestamp_compare_prefix(timestamp,timestamp,smallint,internal), FUNCTION 6 rum_timestamp_config(internal), -- support to timestamp disttance in rum_tsvector_timestamp_ops FUNCTION 9 rum_timestamp_outer_distance(timestamp, timestamp, smallint), OPERATOR 20 <=> (timestamp,timestamp) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (timestamp,timestamp) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (timestamp,timestamp) FOR ORDER BY pg_catalog.float_ops, STORAGE timestamp; /* * rum_tsvector_timestamp_ops operator class. * * Stores timestamp with tsvector. */ CREATE FUNCTION rum_tsquery_timestamp_consistent(internal, smallint, tsvector, integer, internal, internal, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; /* * !!!deprecated, use rum_tsvector_hash_addon_ops!!! */ CREATE OPERATOR CLASS rum_tsvector_timestamp_ops FOR TYPE tsvector USING rum AS OPERATOR 1 @@ (tsvector, tsquery), --support function FUNCTION 1 gin_cmp_tslexeme(text, text), FUNCTION 2 rum_extract_tsvector(tsvector,internal,internal,internal,internal), FUNCTION 3 rum_extract_tsquery(tsquery,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_tsquery_timestamp_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 5 gin_cmp_prefix(text,text,smallint,internal), FUNCTION 7 rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), STORAGE text; /* * rum_tsvector_hash_timestamp_ops operator class * !!!deprecated, use rum_tsvector_hash_addon_ops!!! */ CREATE OPERATOR CLASS rum_tsvector_hash_timestamp_ops FOR TYPE tsvector USING rum AS OPERATOR 1 @@ (tsvector, tsquery), --support function FUNCTION 1 btint4cmp(integer, integer), FUNCTION 2 rum_extract_tsvector_hash(tsvector,internal,internal,internal,internal), FUNCTION 3 rum_extract_tsquery_hash(tsquery,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_tsquery_timestamp_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 7 rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), STORAGE integer; /* * rum_timestamptz_ops operator class */ CREATE FUNCTION rum_timestamptz_distance(timestamptz, timestamptz) RETURNS float8 AS 'MODULE_PATHNAME', 'rum_timestamp_distance' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_timestamptz_distance, LEFTARG = timestamptz, RIGHTARG = timestamptz, COMMUTATOR = <=> ); CREATE FUNCTION rum_timestamptz_left_distance(timestamptz, timestamptz) RETURNS float8 AS 'MODULE_PATHNAME', 'rum_timestamp_left_distance' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_timestamptz_left_distance, LEFTARG = timestamptz, RIGHTARG = timestamptz, COMMUTATOR = |=> ); CREATE FUNCTION rum_timestamptz_right_distance(timestamptz, timestamptz) RETURNS float8 AS 'MODULE_PATHNAME', 'rum_timestamp_right_distance' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_timestamptz_right_distance, LEFTARG = timestamptz, RIGHTARG = timestamptz, COMMUTATOR = <=| ); CREATE OPERATOR CLASS rum_timestamptz_ops DEFAULT FOR TYPE timestamptz USING rum AS OPERATOR 1 <, OPERATOR 2 <=, OPERATOR 3 =, OPERATOR 4 >=, OPERATOR 5 >, --support FUNCTION 1 timestamptz_cmp(timestamptz,timestamptz), FUNCTION 2 rum_timestamp_extract_value(timestamp,internal,internal,internal,internal), FUNCTION 3 rum_timestamp_extract_query(timestamp,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_timestamp_consistent(internal,smallint,timestamp,int,internal,internal,internal,internal), FUNCTION 5 rum_timestamp_compare_prefix(timestamp,timestamp,smallint,internal), FUNCTION 6 rum_timestamp_config(internal), -- support to timestamptz distance in rum_tsvector_timestamptz_ops FUNCTION 9 rum_timestamp_outer_distance(timestamp, timestamp, smallint), OPERATOR 20 <=> (timestamptz,timestamptz) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (timestamptz,timestamptz) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (timestamptz,timestamptz) FOR ORDER BY pg_catalog.float_ops, STORAGE timestamptz; /* * rum_tsvector_timestamptz_ops operator class. * * Stores tsvector with timestamptz. */ CREATE OPERATOR CLASS rum_tsvector_timestamptz_ops FOR TYPE tsvector USING rum AS OPERATOR 1 @@ (tsvector, tsquery), --support function FUNCTION 1 gin_cmp_tslexeme(text, text), FUNCTION 2 rum_extract_tsvector(tsvector,internal,internal,internal,internal), FUNCTION 3 rum_extract_tsquery(tsquery,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_tsquery_timestamp_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 5 gin_cmp_prefix(text,text,smallint,internal), FUNCTION 7 rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), STORAGE text; /* * rum_tsvector_hash_timestamptz_ops operator class */ CREATE OPERATOR CLASS rum_tsvector_hash_timestamptz_ops FOR TYPE tsvector USING rum AS OPERATOR 1 @@ (tsvector, tsquery), --support function FUNCTION 1 btint4cmp(integer, integer), FUNCTION 2 rum_extract_tsvector_hash(tsvector,internal,internal,internal,internal), FUNCTION 3 rum_extract_tsquery_hash(tsquery,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_tsquery_timestamp_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 7 rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), STORAGE integer; /* * rum_tsquery_ops operator class. * * Used for inversed text search. */ CREATE FUNCTION ruminv_extract_tsquery(tsquery,internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION ruminv_extract_tsvector(tsvector,internal,smallint,internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION ruminv_tsvector_consistent(internal, smallint, tsvector, integer, internal, internal, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION ruminv_tsquery_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_tsquery_ops DEFAULT FOR TYPE tsquery USING rum AS OPERATOR 1 @@ (tsquery, tsvector), FUNCTION 1 gin_cmp_tslexeme(text, text), FUNCTION 2 ruminv_extract_tsquery(tsquery,internal,internal,internal,internal), FUNCTION 3 ruminv_extract_tsvector(tsvector,internal,smallint,internal,internal,internal,internal), FUNCTION 4 ruminv_tsvector_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 6 ruminv_tsquery_config(internal), STORAGE text; CREATE FUNCTION rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; ALTER FUNCTION rum_tsquery_timestamp_consistent (internal,smallint,tsvector,int,internal,internal,internal,internal) RENAME TO rum_tsquery_addon_consistent; CREATE FUNCTION rum_numeric_cmp(numeric, numeric) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_tsvector_addon_ops FOR TYPE tsvector USING rum AS OPERATOR 1 @@ (tsvector, tsquery), --support function FUNCTION 1 gin_cmp_tslexeme(text, text), FUNCTION 2 rum_extract_tsvector(tsvector,internal,internal,internal,internal), FUNCTION 3 rum_extract_tsquery(tsquery,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_tsquery_addon_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 5 gin_cmp_prefix(text,text,smallint,internal), FUNCTION 7 rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), STORAGE text; CREATE OPERATOR CLASS rum_tsvector_hash_addon_ops FOR TYPE tsvector USING rum AS OPERATOR 1 @@ (tsvector, tsquery), --support function FUNCTION 1 btint4cmp(integer, integer), FUNCTION 2 rum_extract_tsvector_hash(tsvector,internal,internal,internal,internal), FUNCTION 3 rum_extract_tsquery_hash(tsquery,internal,smallint,internal,internal,internal,internal), FUNCTION 4 rum_tsquery_addon_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), FUNCTION 7 rum_tsquery_pre_consistent(internal,smallint,tsvector,int,internal,internal,internal,internal), STORAGE integer; /*--------------------int2-----------------------*/ CREATE FUNCTION rum_int2_extract_value(int2, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int2_compare_prefix(int2, int2, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int2_extract_query(int2, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int2_distance(int2, int2) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_int2_distance, LEFTARG = int2, RIGHTARG = int2, COMMUTATOR = <=> ); CREATE FUNCTION rum_int2_left_distance(int2, int2) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_int2_left_distance, LEFTARG = int2, RIGHTARG = int2, COMMUTATOR = |=> ); CREATE FUNCTION rum_int2_right_distance(int2, int2) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_int2_right_distance, LEFTARG = int2, RIGHTARG = int2, COMMUTATOR = <=| ); CREATE FUNCTION rum_int2_outer_distance(int2, int2, smallint) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int2_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_int2_ops DEFAULT FOR TYPE int2 USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , OPERATOR 20 <=> (int2,int2) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (int2,int2) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (int2,int2) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 btint2cmp(int2,int2), FUNCTION 2 rum_int2_extract_value(int2, internal), FUNCTION 3 rum_int2_extract_query(int2, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_int2_compare_prefix(int2,int2,int2, internal), -- support to int2 distance in rum_tsvector_addon_ops FUNCTION 6 rum_int2_config(internal), FUNCTION 9 rum_int2_outer_distance(int2, int2, smallint), STORAGE int2; /*--------------------int4-----------------------*/ CREATE FUNCTION rum_int4_extract_value(int4, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int4_compare_prefix(int4, int4, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int4_extract_query(int4, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int4_distance(int4, int4) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_int4_distance, LEFTARG = int4, RIGHTARG = int4, COMMUTATOR = <=> ); CREATE FUNCTION rum_int4_left_distance(int4, int4) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_int4_left_distance, LEFTARG = int4, RIGHTARG = int4, COMMUTATOR = |=> ); CREATE FUNCTION rum_int4_right_distance(int4, int4) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_int4_right_distance, LEFTARG = int4, RIGHTARG = int4, COMMUTATOR = <=| ); CREATE FUNCTION rum_int4_outer_distance(int4, int4, smallint) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int4_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_int4_ops DEFAULT FOR TYPE int4 USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , OPERATOR 20 <=> (int4,int4) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (int4,int4) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (int4,int4) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 btint4cmp(int4,int4), FUNCTION 2 rum_int4_extract_value(int4, internal), FUNCTION 3 rum_int4_extract_query(int4, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_int4_compare_prefix(int4,int4,int2, internal), -- support to int4 distance in rum_tsvector_addon_ops FUNCTION 6 rum_int4_config(internal), FUNCTION 9 rum_int4_outer_distance(int4, int4, smallint), STORAGE int4; /*--------------------int8-----------------------*/ CREATE FUNCTION rum_int8_extract_value(int8, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int8_compare_prefix(int8, int8, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int8_extract_query(int8, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int8_distance(int8, int8) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_int8_distance, LEFTARG = int8, RIGHTARG = int8, COMMUTATOR = <=> ); CREATE FUNCTION rum_int8_left_distance(int8, int8) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_int8_left_distance, LEFTARG = int8, RIGHTARG = int8, COMMUTATOR = |=> ); CREATE FUNCTION rum_int8_right_distance(int8, int8) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_int8_right_distance, LEFTARG = int8, RIGHTARG = int8, COMMUTATOR = <=| ); CREATE FUNCTION rum_int8_outer_distance(int8, int8, smallint) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_int8_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_int8_ops DEFAULT FOR TYPE int8 USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , OPERATOR 20 <=> (int8,int8) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (int8,int8) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (int8,int8) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 btint8cmp(int8,int8), FUNCTION 2 rum_int8_extract_value(int8, internal), FUNCTION 3 rum_int8_extract_query(int8, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_int8_compare_prefix(int8,int8,int2, internal), -- support to int8 distance in rum_tsvector_addon_ops FUNCTION 6 rum_int8_config(internal), FUNCTION 9 rum_int8_outer_distance(int8, int8, smallint), STORAGE int8; /*--------------------float4-----------------------*/ CREATE FUNCTION rum_float4_extract_value(float4, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_float4_compare_prefix(float4, float4, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_float4_extract_query(float4, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_float4_distance(float4, float4) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_float4_distance, LEFTARG = float4, RIGHTARG = float4, COMMUTATOR = <=> ); CREATE FUNCTION rum_float4_left_distance(float4, float4) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_float4_left_distance, LEFTARG = float4, RIGHTARG = float4, COMMUTATOR = |=> ); CREATE FUNCTION rum_float4_right_distance(float4, float4) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_float4_right_distance, LEFTARG = float4, RIGHTARG = float4, COMMUTATOR = <=| ); CREATE FUNCTION rum_float4_outer_distance(float4, float4, smallint) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_float4_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_float4_ops DEFAULT FOR TYPE float4 USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , OPERATOR 20 <=> (float4,float4) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (float4,float4) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (float4,float4) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 btfloat4cmp(float4,float4), FUNCTION 2 rum_float4_extract_value(float4, internal), FUNCTION 3 rum_float4_extract_query(float4, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_float4_compare_prefix(float4,float4,int2, internal), -- support to float4 distance in rum_tsvector_addon_ops FUNCTION 6 rum_float4_config(internal), FUNCTION 9 rum_float4_outer_distance(float4, float4, smallint), STORAGE float4; /*--------------------float8-----------------------*/ CREATE FUNCTION rum_float8_extract_value(float8, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_float8_compare_prefix(float8, float8, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_float8_extract_query(float8, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_float8_distance(float8, float8) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_float8_distance, LEFTARG = float8, RIGHTARG = float8, COMMUTATOR = <=> ); CREATE FUNCTION rum_float8_left_distance(float8, float8) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_float8_left_distance, LEFTARG = float8, RIGHTARG = float8, COMMUTATOR = |=> ); CREATE FUNCTION rum_float8_right_distance(float8, float8) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_float8_right_distance, LEFTARG = float8, RIGHTARG = float8, COMMUTATOR = <=| ); CREATE FUNCTION rum_float8_outer_distance(float8, float8, smallint) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_float8_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_float8_ops DEFAULT FOR TYPE float8 USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , OPERATOR 20 <=> (float8,float8) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (float8,float8) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (float8,float8) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 btfloat8cmp(float8,float8), FUNCTION 2 rum_float8_extract_value(float8, internal), FUNCTION 3 rum_float8_extract_query(float8, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_float8_compare_prefix(float8,float8,int2, internal), -- support to float8 distance in rum_tsvector_addon_ops FUNCTION 6 rum_float8_config(internal), FUNCTION 9 rum_float8_outer_distance(float8, float8, smallint), STORAGE float8; /*--------------------money-----------------------*/ CREATE FUNCTION rum_money_extract_value(money, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_money_compare_prefix(money, money, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_money_extract_query(money, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_money_distance(money, money) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_money_distance, LEFTARG = money, RIGHTARG = money, COMMUTATOR = <=> ); CREATE FUNCTION rum_money_left_distance(money, money) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_money_left_distance, LEFTARG = money, RIGHTARG = money, COMMUTATOR = |=> ); CREATE FUNCTION rum_money_right_distance(money, money) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_money_right_distance, LEFTARG = money, RIGHTARG = money, COMMUTATOR = <=| ); CREATE FUNCTION rum_money_outer_distance(money, money, smallint) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_money_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_money_ops DEFAULT FOR TYPE money USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , OPERATOR 20 <=> (money,money) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (money,money) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (money,money) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 cash_cmp(money,money), FUNCTION 2 rum_money_extract_value(money, internal), FUNCTION 3 rum_money_extract_query(money, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_money_compare_prefix(money,money,int2, internal), -- support to money distance in rum_tsvector_addon_ops FUNCTION 6 rum_money_config(internal), FUNCTION 9 rum_money_outer_distance(money, money, smallint), STORAGE money; /*--------------------oid-----------------------*/ CREATE FUNCTION rum_oid_extract_value(oid, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_oid_compare_prefix(oid, oid, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_oid_extract_query(oid, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_oid_distance(oid, oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=> ( PROCEDURE = rum_oid_distance, LEFTARG = oid, RIGHTARG = oid, COMMUTATOR = <=> ); CREATE FUNCTION rum_oid_left_distance(oid, oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <=| ( PROCEDURE = rum_oid_left_distance, LEFTARG = oid, RIGHTARG = oid, COMMUTATOR = |=> ); CREATE FUNCTION rum_oid_right_distance(oid, oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR |=> ( PROCEDURE = rum_oid_right_distance, LEFTARG = oid, RIGHTARG = oid, COMMUTATOR = <=| ); CREATE FUNCTION rum_oid_outer_distance(oid, oid, smallint) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_oid_config(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS rum_oid_ops DEFAULT FOR TYPE oid USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , OPERATOR 20 <=> (oid,oid) FOR ORDER BY pg_catalog.float_ops, OPERATOR 21 <=| (oid,oid) FOR ORDER BY pg_catalog.float_ops, OPERATOR 22 |=> (oid,oid) FOR ORDER BY pg_catalog.float_ops, FUNCTION 1 btoidcmp(oid,oid), FUNCTION 2 rum_oid_extract_value(oid, internal), FUNCTION 3 rum_oid_extract_query(oid, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_oid_compare_prefix(oid,oid,int2, internal), -- support to oid distance in rum_tsvector_addon_ops FUNCTION 6 rum_oid_config(internal), FUNCTION 9 rum_oid_outer_distance(oid, oid, smallint), STORAGE oid; /*--------------------time-----------------------*/ CREATE FUNCTION rum_time_extract_value(time, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_time_compare_prefix(time, time, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_time_extract_query(time, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_time_ops DEFAULT FOR TYPE time USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 time_cmp(time,time), FUNCTION 2 rum_time_extract_value(time, internal), FUNCTION 3 rum_time_extract_query(time, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_time_compare_prefix(time,time,int2, internal), STORAGE time; /*--------------------timetz-----------------------*/ CREATE FUNCTION rum_timetz_extract_value(timetz, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_timetz_compare_prefix(timetz, timetz, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_timetz_extract_query(timetz, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_timetz_ops DEFAULT FOR TYPE timetz USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 timetz_cmp(timetz,timetz), FUNCTION 2 rum_timetz_extract_value(timetz, internal), FUNCTION 3 rum_timetz_extract_query(timetz, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_timetz_compare_prefix(timetz,timetz,int2, internal), STORAGE timetz; /*--------------------date-----------------------*/ CREATE FUNCTION rum_date_extract_value(date, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_date_compare_prefix(date, date, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_date_extract_query(date, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_date_ops DEFAULT FOR TYPE date USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 date_cmp(date,date), FUNCTION 2 rum_date_extract_value(date, internal), FUNCTION 3 rum_date_extract_query(date, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_date_compare_prefix(date,date,int2, internal), STORAGE date; /*--------------------interval-----------------------*/ CREATE FUNCTION rum_interval_extract_value(interval, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_interval_compare_prefix(interval, interval, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_interval_extract_query(interval, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_interval_ops DEFAULT FOR TYPE interval USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 interval_cmp(interval,interval), FUNCTION 2 rum_interval_extract_value(interval, internal), FUNCTION 3 rum_interval_extract_query(interval, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_interval_compare_prefix(interval,interval,int2, internal), STORAGE interval; /*--------------------macaddr-----------------------*/ CREATE FUNCTION rum_macaddr_extract_value(macaddr, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_macaddr_compare_prefix(macaddr, macaddr, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_macaddr_extract_query(macaddr, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_macaddr_ops DEFAULT FOR TYPE macaddr USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 macaddr_cmp(macaddr,macaddr), FUNCTION 2 rum_macaddr_extract_value(macaddr, internal), FUNCTION 3 rum_macaddr_extract_query(macaddr, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_macaddr_compare_prefix(macaddr,macaddr,int2, internal), STORAGE macaddr; /*--------------------inet-----------------------*/ CREATE FUNCTION rum_inet_extract_value(inet, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_inet_compare_prefix(inet, inet, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_inet_extract_query(inet, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_inet_ops DEFAULT FOR TYPE inet USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 network_cmp(inet,inet), FUNCTION 2 rum_inet_extract_value(inet, internal), FUNCTION 3 rum_inet_extract_query(inet, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_inet_compare_prefix(inet,inet,int2, internal), STORAGE inet; /*--------------------cidr-----------------------*/ CREATE FUNCTION rum_cidr_extract_value(cidr, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_cidr_compare_prefix(cidr, cidr, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_cidr_extract_query(cidr, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_cidr_ops DEFAULT FOR TYPE cidr USING rum AS OPERATOR 1 < (inet, inet), OPERATOR 2 <= (inet, inet), OPERATOR 3 = (inet, inet), OPERATOR 4 >= (inet, inet), OPERATOR 5 > (inet, inet), FUNCTION 1 network_cmp(inet,inet), FUNCTION 2 rum_cidr_extract_value(cidr, internal), FUNCTION 3 rum_cidr_extract_query(cidr, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_cidr_compare_prefix(cidr,cidr,int2, internal), STORAGE cidr; /*--------------------text-----------------------*/ CREATE FUNCTION rum_text_extract_value(text, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_text_compare_prefix(text, text, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_text_extract_query(text, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_text_ops DEFAULT FOR TYPE text USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 bttextcmp(text,text), FUNCTION 2 rum_text_extract_value(text, internal), FUNCTION 3 rum_text_extract_query(text, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_text_compare_prefix(text,text,int2, internal), STORAGE text; /*--------------------varchar-----------------------*/ CREATE OPERATOR CLASS rum_varchar_ops DEFAULT FOR TYPE varchar USING rum AS OPERATOR 1 < (text, text), OPERATOR 2 <= (text, text), OPERATOR 3 = (text, text), OPERATOR 4 >= (text, text), OPERATOR 5 > (text, text), FUNCTION 1 bttextcmp(text,text), FUNCTION 2 rum_text_extract_value(text, internal), FUNCTION 3 rum_text_extract_query(text, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_text_compare_prefix(text,text,int2, internal), STORAGE varchar; /*--------------------"char"-----------------------*/ CREATE FUNCTION rum_char_extract_value("char", internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_char_compare_prefix("char", "char", int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_char_extract_query("char", internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_char_ops DEFAULT FOR TYPE "char" USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 btcharcmp("char","char"), FUNCTION 2 rum_char_extract_value("char", internal), FUNCTION 3 rum_char_extract_query("char", internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_char_compare_prefix("char","char",int2, internal), STORAGE "char"; /*--------------------bytea-----------------------*/ CREATE FUNCTION rum_bytea_extract_value(bytea, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_bytea_compare_prefix(bytea, bytea, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_bytea_extract_query(bytea, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_bytea_ops DEFAULT FOR TYPE bytea USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 byteacmp(bytea,bytea), FUNCTION 2 rum_bytea_extract_value(bytea, internal), FUNCTION 3 rum_bytea_extract_query(bytea, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_bytea_compare_prefix(bytea,bytea,int2, internal), STORAGE bytea; /*--------------------bit-----------------------*/ CREATE FUNCTION rum_bit_extract_value(bit, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_bit_compare_prefix(bit, bit, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_bit_extract_query(bit, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_bit_ops DEFAULT FOR TYPE bit USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 bitcmp(bit,bit), FUNCTION 2 rum_bit_extract_value(bit, internal), FUNCTION 3 rum_bit_extract_query(bit, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_bit_compare_prefix(bit,bit,int2, internal), STORAGE bit; /*--------------------varbit-----------------------*/ CREATE FUNCTION rum_varbit_extract_value(varbit, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_varbit_compare_prefix(varbit, varbit, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_varbit_extract_query(varbit, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_varbit_ops DEFAULT FOR TYPE varbit USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 varbitcmp(varbit,varbit), FUNCTION 2 rum_varbit_extract_value(varbit, internal), FUNCTION 3 rum_varbit_extract_query(varbit, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_varbit_compare_prefix(varbit,varbit,int2, internal), STORAGE varbit; /*--------------------numeric-----------------------*/ CREATE FUNCTION rum_numeric_extract_value(numeric, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_numeric_compare_prefix(numeric, numeric, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE FUNCTION rum_numeric_extract_query(numeric, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; CREATE OPERATOR CLASS rum_numeric_ops DEFAULT FOR TYPE numeric USING rum AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 rum_numeric_cmp(numeric,numeric), FUNCTION 2 rum_numeric_extract_value(numeric, internal), FUNCTION 3 rum_numeric_extract_query(numeric, internal, int2, internal, internal), FUNCTION 4 rum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal), FUNCTION 5 rum_numeric_compare_prefix(numeric,numeric,int2, internal), STORAGE numeric;
the_stack
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- With DB2 current schema is equal to the user name on login. CREATE TABLE DST.DEF_SCHEMA_TEST(NAME_USER VARCHAR(128), NAME_SCHEMA VARCHAR(128)); INSERT INTO DST.DEF_SCHEMA_TEST VALUES(USER, CURRENT SCHEMA); SELECT COUNT(*) FROM DST.DEF_SCHEMA_TEST WHERE NAME_USER = NAME_SCHEMA; SET SCHEMA DILBERT; connect 'wombat;user=dilbert'; INSERT INTO DST.DEF_SCHEMA_TEST VALUES(USER, CURRENT SCHEMA); SELECT COUNT(*) FROM DST.DEF_SCHEMA_TEST WHERE NAME_USER = NAME_SCHEMA; VALUES CURRENT SCHEMA; disconnect; SET CONNECTION CONNECTION0; -- still should not be created SET SCHEMA DILBERT; connect 'wombat;user=dilbert'; INSERT INTO DST.DEF_SCHEMA_TEST VALUES(USER, CURRENT SCHEMA); SELECT COUNT(*) FROM DST.DEF_SCHEMA_TEST WHERE NAME_USER = NAME_SCHEMA; VALUES CURRENT SCHEMA; CREATE TABLE SCOTT(i int); insert into SCOTT VALUES(4); disconnect; SET CONNECTION CONNECTION0; SELECT * FROM DILBERT.SCOTT; DROP TABLE DILBERT.SCOTT; DROP TABLE DST.DEF_SCHEMA_TEST; DROP SCHEMA DST RESTRICT; DROP SCHEMA DILBERT RESTRICT; -- Simple Cloudscape specific features. -- CLASS ALIAS; create class alias MyMath for java.lang.Math; drop class alias MyMath; create class alias for java.lang.Math; drop class alias Math; -- METHOD ALIAS; create method alias myabs for java.lang.Math.abs; drop method alias myabs; -- STORED PREPARED STATEMENTS -- create statement no more supported both in db2 and cloudscpae mode. -ve test for that create statement s1 as values 1,2; -- alter, drop and execute statements are still supported for existing stored prepared statements for customers alter statement recompile all; -- following will give error because there is no stored prepared statement s1 in the database drop statement s1; -- clean up DROP TABLE t1; DROP TABLE t2; DROP CLASS ALIAS ExternalInsert; DROP STATEMENT insert1; -- Primary key constraint, DB2 requires NOT null on the columns. create table customer (id int primary key, name char(100)); drop table customer; create table customer (id int NOT NULL, id2 int, name char(100), primary key (id, id2)); drop table customer; -- drop schema requires restrict create schema fred; drop schema fred; drop schema fred restrict; -- create schema not supported for schemas that start with SYS create schema SYS; create schema SYSDJD; create schema "SYSNO"; create schema "sys"; create schema "sysok"; drop schema "sys" restrict; drop schema "sysok" restrict; -- data types not supported create table NOTYPE(i int, b BOOLEAN); create table NOTYPE(i int, b TINYINT); create table NOTYPE(i int, b java.lang.String); create table NOTYPE(i int, b com.acme.Address); create table NOTYPE(i int, b org.apache.derby.vti.VTIEnvironment); -- VTI in the DELETE statement -- beetle 5234 CREATE TABLE testCS (col1 int, col2 char(30), col3 int); INSERT INTO testCS VALUES (100, 'asdf', 732); DELETE FROM NEW org.apache.derbyTesting.functionTests.util.VTIClasses.ExternalTable('jdbc:derby:wombat', 'testCS') WHERE col1 = 100 and col3 = 732; -- VTI in the INSERT statement -- beetle 5234 INSERT INTO NEW org.apache.derbyTesting.functionTests.util.serializabletypes.ExternalTable('jdbc:derby:wombat', 'testCS') VALUES (100, 'asdf', 732); -- VTI in the SELECT statement -- beetle 5234 select * from testCS, new org.apache.derbyTesting.functionTests.util.VTIClasses.PositiveInteger_VTICosting_SI(col1, 1) a; select * from new com.acme.myVTI() as T; select * from new org.apache.derbyTesting.not.myVTI() as T; select * from syscs_diag.lock_table; -- VTI in CREATE TRIGGER statement -- beetle 5234 CREATE TABLE tb1(a int); CREATE TRIGGER testtrig1 AFTER DELETE ON tb1 FOR EACH ROW MODE DB2SQL INSERT INTO NEW org.apache.derbyTesting.functionTests.util.VTIClasses.ExternalTable('jdbc:derby:wombat', 'testCS') VALUES (1000); -- VTI in CREATE TRIGGER statement -- beetle 5234 CREATE TRIGGER testtrig2 AFTER DELETE ON tb1 FOR EACH ROW MODE DB2SQL DELETE FROM NEW org.apache.derbyTesting.functionTests.util.VTIClasses.ExternalTable('jdbc:derby:wombat', 'testCS') WHERE col1 = 100 and col3 = 732; -- VTI in CREATE TRIGGER statement -- beetle 5234 CREATE TRIGGER testtrig3 AFTER DELETE ON tb1 FOR EACH ROW MODE DB2SQL SELECT * FROM testCS, NEW org.apache.derbyTesting.functionTests.util.VTIClasses.PositiveInteger_VTICosting_SI(col1, 1) a; -- clean up DROP TABLE tb1; DROP TABLE testCS; -- beetle 5177 create table maps2 (country_ISO_code char(2)); -- BTREE not supported in both Cloudscape and DB2 mode and that is why rather than getting feature not implemented, we will get syntax error in DB2 mode create btree index map_idx2 on maps2(country_ISO_code); create unique btree index map_idx2 on maps2(country_ISO_code); drop table maps2; -- SET LOCKING clause in DB2 mode -- beetle 5208 create table maps1 (country_ISO_code char(2)) set locking = table; create table maps2 (country_ISO_code char(2)) set locking = row; drop table maps1; drop table maps2; -- ALTER TABLE statement -- beetle 5201 -- Locking syntax -- negative tests create table tb1 (country_ISO_code char(2)); alter table tb1 set locking = table; alter table tb1 set locking = row; -- Locking syntax -- positive tests -- beetle 5201 create table tb2 (country_ISO_code char(2)); alter table tb2 locksize table; alter table tb2 locksize row; -- clean up drop table tb1; drop table tb2; -- VTI in the DELETE statement -- beetle 5234 CREATE TABLE testCS (col1 int, col2 char(30), col3 int); INSERT INTO testCS VALUES (100, 'asdf', 732); DELETE FROM NEW org.apache.derbyTesting.functionTests.util.VTIClasses.ExternalTable('jdbc:derby:wombat', 'testCS') WHERE col1 = 100 and col3 = 732; -- VTI in the INSERT statement -- beetle 5234 INSERT INTO NEW org.apache.derbyTesting.functionTests.util.VTIClasses.ExternalTable('jdbc:derby:wombat', 'testCS') VALUES (100, 'asdf', 732); -- VTI in the SELECT statement -- beetle 5234 select * from testCS, new org.apache.derbyTesting.functionTests.util.VTIClasses.PositiveInteger_VTICosting_SI(col1, 1) a; -- VTI in CREATE TRIGGER statement -- beetle 5234 CREATE TABLE tb1(a int); CREATE TRIGGER testtrig1 AFTER DELETE ON tb1 FOR EACH ROW MODE DB2SQL INSERT INTO NEW org.apache.derbyTesting.functionTests.util.VTIClasses.ExternalTable('jdbc:derby:wombat', 'testCS') VALUES (1000); -- VTI in CREATE TRIGGER statement -- beetle 5234 CREATE TRIGGER testtrig2 AFTER DELETE ON tb1 FOR EACH ROW MODE DB2SQL DELETE FROM NEW org.apache.derbyTesting.functionTests.util.VTIClasses.ExternalTable('jdbc:derby:wombat', 'testCS') WHERE col1 = 100 and col3 = 732; -- VTI in CREATE TRIGGER statement -- beetle 5234 CREATE TRIGGER testtrig3 AFTER DELETE ON tb1 FOR EACH ROW MODE DB2SQL SELECT * FROM testCS, NEW org.apache.derbyTesting.functionTests.util.VTIClasses.PositiveInteger_VTICosting_SI(col1, 1) a; -- clean up DROP TABLE tb1; DROP TABLE testCS; -- RENAME/DROP COLUMN -- ALTER RENAME TABLE/COLUMN -- beetle 5205 create table table tt (a int, b int, c int); -- alter table tt drop column b; This is now supported by Derby alter table tt rename to ttnew; alter table tt rename c to d; rename column tt.c to tt.d; drop table tt; -- CASCADE/RESTRICT on DROP CONSTRAINT -- beetle 5204 ALTER TABLE TT DROP CONSTRAINT ABC CASCADE; ALTER TABLE TT DROP CONSTRAINT ABC2 RESTRICT; -- CASCADE/RESTRICT on DROP TABLE -- beetle 5206 DROP TABLE TT CASCADE; DROP TABLE TT RESTRICT; -- beetle 5216 -- there should only be one autoincrement column per table CREATE TABLE T1 (C1 INT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1)); -- this statement should raise an error because it has more than one auto increment column in a table CREATE TABLE T2 (C1 INT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), C2 INT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1)); -- clean up DROP TABLE t1; DROP TABLE t2; -- limit to 16 columns in an index key -- beetle 5181 -- this create index statement should be successful in db2 compat mode because ix2 specifies 16 columns create table testindex1 (a int,b int,c int,d int ,e int ,f int,g int,h int,i int,j int,k int,l int,m int,n int,o int,p int); create unique index ix1 on testindex1(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); -- this create index statement should fail in db2 compat mode because ix2 specifies more than 16 columns create table testindex2 (a int,b int,c int,d int ,e int ,f int,g int,h int,i int,j int,k int,l int,m int,n int,o int,p int,q int); create unique index ix2 on testindex2(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q); --clean up drop table testindex1; drop table testindex2; -- insert into a lob column using explicit cast -- positive test -- beetle 5221 CREATE TABLE testblob(col1 BLOB(1M)); INSERT INTO testblob (col1) VALUES cast(X'11' as blob(1M)); CREATE TABLE testclob(col1 CLOB(1M)); INSERT INTO testclob (col1) VALUES cast('asdf' as clob(1M)); -- ALTER INDEX -- beetle 5222 CREATE TABLE TT (A INT); CREATE INDEX TTIDX ON TT(A); ALTER INDEX TTIDX RENAME TTIDXNEW; -- clean up drop table tt; -- CREATE and DROP AGGREGATE -- beetle 5222 CREATE AGGREGATE STDEV FOR org.apache.derbyTesting.functionTests.util.aggregates.StandardDeviation; DROP AGGREGATE STDEV; CREATE AGGREGATE MAXBUTONE FOR org.apache.derbyTesting.functionTests.util.aggregates.MaxButOneDef; DROP AGGREGATE MAXBUTONE; -- CREATE and DROP CLASS ALIAS -- beetle 5222 create class alias for java.util.Hashtable; drop class alias Hashtable; -- CREATE and DROP METHOD ALIAS -- beetle 5222 create method alias hashtable for java.lang.Math.sin; drop method alias hashtable; -- RENAME COLUMN -- beetle 5222 create table TT(col1 int, col2 int); rename column TT.col2 to newcolumn2; drop table TT; -- SET TRIGGERS -- beetle 5222 CREATE TABLE tb1 (col1 int, col2 int, col3 int, constraint chk1 check (col1 > 0)); CREATE TABLE tb2 (col1 char(30), c2 int, c3 int); CREATE TRIGGER testtrig2 AFTER UPDATE on tb1 REFERENCING OLD as oldtable FOR EACH ROW MODE DB2SQL INSERT INTO tb2 VALUES ('tb', oldtable.col1, oldtable.col2); SET TRIGGERS FOR tb1 ENABLED; SET TRIGGERS FOR tb1 DISABLED; SET TRIGGERS testtrig2 ENABLED; SET TRIGGERS testtrig2 DISABLED; -- clean up DROP TRIGGER testtrig1; DROP TRIGGER testtrig2; DROP TRIGGER testtrig3; DROP TABLE tb1; DROP TABLE tb2; -- INSTANCEOF in where clause of select, delete, update, -- beetle 5224 create table t1 (i int, s smallint, c10 char(10), vc30 varchar(30), b boolean); create table mm (x org.apache.derbyTesting.functionTests.util.ManyMethods); create table sc (x org.apache.derbyTesting.functionTests.util.SubClass); select i from t1 where i instanceof java.lang.Integer; select i from t1 where i instanceof java.lang.Number; select i from t1 where i instanceof java.lang.Object; select s from t1 where s instanceof java.lang.Integer; select b from t1 where b instanceof java.lang.Boolean; select c10 from t1 where c10 instanceof java.lang.String; select vc30 from t1 where vc30 instanceof java.lang.String; -- following are negative test cases because boolean values disallowed in select clause select x instanceof org.apache.derbyTesting.functionTests.util.ManyMethods from mm; select x instanceof org.apache.derbyTesting.functionTests.util.SubClass from mm; select x instanceof org.apache.derbyTesting.functionTests.util.SubSubClass from mm; select (i + i) instanceof java.lang.Integer from t1; select (i instanceof java.lang.Integer) = true from t1; DELETE FROM t1 where i INSTANCEOF org.apache.derbyTesting.functionTests.util.serializabletypes.City; UPDATE t1 SET s = NULL WHERE i INSTANCEOF org.apache.derbyTesting.functionTests.util.serializabletypes.City; -- clean up drop table t1; drop table mm; drop table sc; -- datatypes -- beetle 5233 create table testtype1(col1 bit); create table testtype2(col1 bit varying(10)); --- boolean datatype already disabled create table testtype3(col1 boolean); create table testtype4(col1 LONG NVARCHAR); create table testtype5(col1 LONG VARBINARY); create table testtype6(col1 LONG BIT VARYING); create table testtype7(col1 LONG BINARY); create table testtype8(col1 NCHAR); create table testtype9(col1 NVARCHAR(10)); -- tinyint datatype already disabled create table testtype10(col1 TINYINT); create table testtype11 (a national character large object (1000)); -- beetle5426 -- disable nclob create table beetle5426 (a nclob (1M)); create table testtype12 (a national char(100)); CREATE CLASS ALIAS FOR org.apache.derbyTesting.functionTests.util.serializabletypes.Tour; create table testtype13 (a Tour); -- clean up drop table testtype1; drop table testtype2; drop table testtype3; drop table testtype4; drop table testtype5; drop table testtype6; drop table testtype7; drop table testtype8; drop table testtype9; drop table testtype10; drop table testtype11; drop table beetle5426; drop table testtype12; drop class alias Tours; drop table testtype13; -- limit char to 254 and varchar to 32672 columns in db2 mode -- beetle 5552 -- following will fail because char length > 254 create table test1(col1 char(255)); -- following will pass because char length <= 254 create table test1(col1 char(254), col2 char(23)); -- try truncation error with the 2 chars -- the trailing blanks will not give error insert into test1 values('a','abcdefghijklmnopqrstuvw '); -- the trailing non-blank characters will give error insert into test1 values('a','abcdefghijklmnopqrstuvwxyz'); insert into test1 values('12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890','a'); drop table test1; -- following will fail because varchar length > 32672 create table test1(col1 varchar(32673)); -- following will pass because varchar length <= 32672 create table test1(col1 varchar(32672), col2 varchar(1234)); drop table test1; -- SET CONSTRAINTS statement -- beetle 5251 CREATE TABLE testsetconst1 (col1 CHAR(7) NOT NULL, PRIMARY KEY(col1)); CREATE TABLE testsetconst2 (col1 char(7) NOT NULL, CONSTRAINT fk FOREIGN KEY(col1) REFERENCES testsetconst1(col1)); SET CONSTRAINTS fk DISABLED; SELECT STATE FROM SYS.SYSCONSTRAINTS; SET CONSTRAINTS fk ENABLED; SELECT STATE FROM SYS.SYSCONSTRAINTS; SET CONSTRAINTS ALL DISABLED; SELECT STATE FROM SYS.SYSCONSTRAINTS; SET CONSTRAINTS FOR testsetconst1 ENABLED; SELECT STATE FROM SYS.SYSCONSTRAINTS; -- clean up DROP TABLE testsetconst1; DROP TABLE testsetconst2; -- CALL statement -- beetle 5252 call org.apache.derby.iapi.db.Factory::getDatabaseOfConnection().dropAllJDBCMetaDataSPSes(); -- Beetle 5203: DB2 restricts what can be used for default clauses, and enforces -- constraints on the default clause that Cloudscape does not. -- Following should be okay: create table deftest1 (i int default 1); create table deftest2 (vc varchar(30) default 'howdy'); create table deftest21 (vc clob(10) default 'okie'); create table deftest3 (d date default current date); create table deftest31 (d date default '2004-02-08'); create table deftest5 (vc char(130) default current schema); create table deftest4 (c char(130) default user); create table deftest6 (d decimal(5,2) default null); create table deftest7 (d decimal(5,2) default 123.450); create table deftest8 (f float default 1.234); -- make sure they actually work @ insertion. insert into deftest1 values (default); insert into deftest2 values (default); insert into deftest21 values (default); insert into deftest3 values (default); insert into deftest31 values (default); insert into deftest4 values (default); insert into deftest5 values (default); insert into deftest6 values (default); insert into deftest7 values (default); insert into deftest8 values (default); -- cleanup. drop table deftest1; drop table deftest2; drop table deftest21; drop table deftest3; drop table deftest31; drop table deftest4; drop table deftest5; drop table deftest6; drop table deftest7; drop table deftest8; -- Beetle 5203, con't: following should all fail (though they'd pass in Cloudscape mode). -- expressions: create table deftest1 (vc varchar(30) default java.lang.Integer::toBinaryString(3)); create table deftest2 (i int default 3+4); -- floating point assignment to non-float column. create table deftest3 (i int default 1.234); -- decimal value with too much precision. create table deftest4 (d decimal(5,2) default 1.2234); -- function calls (built-in and other) should fail with error 42894 (NOT with 42X01), to match DB2. create table t1 (i int default abs(0)); create table t1 (i int default someFunc('hi')); -- Type mismatches should fail with 42894 (NOT with 42821), to match DB2. create table t1 (i int default 'hi'); -- Beetle 5281: <cast-function> for a default. -- Date-time functions (DATE, TIME, and TIMESTAMP) create table t1a (d date default date(current date)); create table t1b (d date default date('1978-03-22')); create table t2a (t time default time(current time)); create table t2b (t time default time('08:28:08')); create table t3a (ch timestamp default timestamp(current timestamp)); create table t3b (ts timestamp default timestamp('2004-04-27 08:59:02.91')); -- BLOB function (not yet supported). create table t4 (b blob default blob('nope')); -- cleanup. drop table t1a; drop table t1b; drop table t2a; drop table t2b; drop table t3a; drop table t3b; -- DROP constraint syntax that should be supported in db2 compat mode: -- beetle 5204 CREATE TABLE testconst1 (col1 CHAR(7) NOT NULL, col2 int CONSTRAINT cc CHECK(col2 > 1), PRIMARY KEY(col1)); CREATE TABLE testconst2 (col1 char(7) NOT NULL, col2 char(7) NOT NULL, col3 int, CONSTRAINT fk FOREIGN KEY(col1) REFERENCES testconst1(col1), CONSTRAINT uk UNIQUE (col2)); -- DROP FOREIGN KEY syntax should be supported in DB2 compat mode insert into testconst1( col1, col2) values( 'a', 2); insert into testconst1( col1, col2) values( 'a', 2); insert into testconst1( col1, col2) values( 'b', 0); insert into testconst2( col1, col2, col3) values( 'a', 'a', 1); insert into testconst2( col1, col2, col3) values( 'z', 'b', 1); insert into testconst2( col1, col2, col3) values( 'a', 'a', 1); -- beetle 5204 ALTER TABLE testconst1 DROP FOREIGN KEY cc; ALTER TABLE testconst2 DROP UNIQUE fk; ALTER TABLE testconst2 DROP CHECK fk; ALTER TABLE testconst2 DROP FOREIGN KEY fk; -- DROP PRIMARY KEY syntax should be supported in DB2 compat mode -- beetle 5204 ALTER TABLE testconst1 DROP PRIMARY KEY; -- DROP UNIQUE KEY syntax should be supported in DB2 compat mode -- beetle 5204 ALTER TABLE testconst2 DROP UNIQUE uk; -- DROP CHECK condition syntax should be supported in DB2 compat mode -- beetle 5204 ALTER TABLE testconst1 DROP CHECK cc; insert into testconst1( col1, col2) values( 'a', 2); insert into testconst1( col1, col2) values( 'b', 0); insert into testconst2( col1, col2, col3) values( 'z', 'b', 1); insert into testconst2( col1, col2, col3) values( 'a', 'a', 1); ALTER TABLE testconst2 DROP FOREIGN KEY noSuchConstraint; ALTER TABLE testconst2 DROP CHECK noSuchConstraint; ALTER TABLE testconst2 DROP UNIQUE noSuchConstraint; ALTER TABLE testconst1 DROP PRIMARY KEY; -- clean up DROP TABLE testconst1; DROP TABLE testconst2; -- CREATE TRIGGERS -- beetle 5253 CREATE TABLE tb1 (col1 int, col2 int, col3 int, constraint chk1 check (col1 > 0)); CREATE TABLE tb2 (col1 char(30), c2 int, c3 int); -- change syntax of before to "NO CASCADE BEFORE" CREATE TRIGGER testtrig1 NO CASCADE BEFORE UPDATE OF col1,col2 on tb1 FOR EACH ROW MODE DB2SQL VALUES 1; CREATE TRIGGER testtrig2 AFTER UPDATE on tb1 REFERENCING OLD as oldtable FOR EACH ROW MODE DB2SQL INSERT INTO tb2 VALUES ('tb', oldtable.col1, oldtable.col2); CREATE TRIGGER testtrig3 AFTER UPDATE on tb1 REFERENCING OLD as oldtable FOR EACH ROW MODE DB2SQL INSERT INTO tb2 VALUES ('tb', oldtable.col1, oldtable.col2); -- clean up DROP TRIGGER testtrig1; DROP TRIGGER testtrig2; DROP TRIGGER testtrig3; DROP TABLE tb1; DROP TABLE tb2; -- SET TRANSACTION ISOLATION LEVEL -- beetle 5254 -- these SET TRANSACTION ISOLATION statements fail in db2 compat mode because it has cloudscape specific syntax create table t1(c1 int not null constraint asdf primary key); insert into t1 values 1; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; SET TRANSACTION ISOLATION LEVEL READ COMMITTED; SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -- clean up drop table t1; -- statements should pass in db2 compat mode -- beetle 5260 autocommit off; create table t1(c1 int not null constraint asdf primary key); commit; insert into t1 values 1; -- verify SET TRANSACTION ISOLATION commits and changes isolation level set isolation serializable; -- rollback should find nothing to undo rollback; select * from t1; values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS(); -- verify SET TRANSACTION ISOLATION commits and changes isolation level set isolation read committed; -- rollback should find nothing to undo rollback; select * from t1; values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS(); -- verify SET TRANSACTION ISOLATION commits and changes isolation level set isolation repeatable read; -- rollback should find nothing to undo rollback; select * from t1; values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS(); -- verify SET TRANSACTION ISOLATION commits and changes isolation level set isolation read uncommitted; -- rollback should find nothing to undo rollback; select * from t1; values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS(); drop table t1; -- SET ISOLATION statement -- beetle 5260 -- set isolation statement that are supported in db2 create table t1(c1 int not null constraint asdf primary key); insert into t1 values 1; set isolation serializable; set isolation read committed; set isolation repeatable read; set isolation read uncommitted; -- clean up drop table t1; -- SELECT statement testing -- beetle 5255 CREATE TABLE t1(col1 int, col2 int); CREATE TABLE t2(col1 int, col2 int); INSERT INTO t1 VALUES(3,4); INSERT INTO t2 VALUES(3,4); -- (5) TRUE and FALSE constants are no longer disabled in WHERE clause of SELECT statement SELECT * FROM t1 INNER JOIN t2 ON t1.col1 = t2.col1 WHERE true; SELECT * FROM t1 INNER JOIN t2 ON t1.col1 = t2.col1 WHERE false; -- (5) TRUE and FALSE constants are no longer disabled in WHERE clause of DELETE statement DELETE FROM t1 where true; DELETE FROM t1 where false; -- (5) TRUE and FALSE constants are no longer disabled in WHERE clause of DELETE statement UPDATE t2 SET col1 = NULL WHERE true; UPDATE t2 SET col1 = NULL WHERE false; -- (6) AT ISOLATION clause should be disabled in SELECT statement -- AT ISOLATION not supported in both Cloudscape and DB2 mode and that is why rather than getting feature not implemented, we will get syntax error SELECT * FROM t1 AT ISOLATION READ UNCOMMITTED; SELECT * FROM t1 AT ISOLATION READ COMMITTED; SELECT * FROM t1 AT ISOLATION SERIALIZABLE; SELECT * FROM t1 AT ISOLATION REPEATABLE READ; -- clean up DROP TABLE t1; DROP TABLE t2; -- DEFAULT CAST not supported in both Cloudscape and DB2 mode and that is why rather than getting feature not implemented, we will get syntax error create table testuser(col1 BLOB(3K) default cast(user as blob(3k))); create table testsessionuser(col1 BLOB(3K) default cast(session_user as blob(3k))); create table testcurrentuser(col1 BLOB(3K) default cast(current_user as blob(3k))); create table testschema(col1 BLOB(3K) default cast(current schema as blob(3k))); -- alter table syntax that should be supported in db2 compat mode -- beetle 5267 create table testmodify (col1 varchar(30), col2 int generated always as identity); -- increasing the length of the varchar column alter table testmodify alter col1 set data type varchar(60); -- specifying the interval between consecutive values of col2, the identity column alter table testmodify alter col2 set increment by 2; -- clean up drop table testmodify; -- (1) adding more than one column -- beetle 5268 -- db2 compat mode should support the following statements create table testaddcol (col1 int); alter table testaddcol add column col2 int add col3 int; drop table testaddcol; -- (2) adding more than one unique, referential, or check constraint -- beetle 5268 -- db2 compat mode should support the following statements create table testaddconst1 (col1 int not null primary key, col2 int not null unique); create table testaddconst2 (col1 int not null primary key, col2 int not null unique); create table testaddconst3 (col1 int not null, col2 int not null, col3 int not null, col4 int not null, col5 int, col6 int); create table testaddconst4 (col1 int not null, col2 int not null, col3 int not null, col4 int not null, col5 int, col6 int); -- adding more than one unique-constraint alter table testaddconst3 add primary key (col1) add unique (col2); alter table testaddconst3 add unique (col3) add unique (col4); -- adding more than one referential-constraint alter table testaddconst3 add foreign key (col1) references testaddconst1(col1) add foreign key (col2) references testaddconst2(col2); -- adding more than one check-constraint alter table testaddconst3 add check (col5 is null) add check (col6 is null); -- adding a primary, unique, foreign key, and check-constraint alter table testaddconst4 add primary key(col1) add unique(col2) add foreign key (col1) references testaddconst1(col1) add check (col2 is null); -- clean up drop table testaddconst1; drop table testaddconst2; drop table testaddconst3; drop table testaddconst4; -- (3) adding more than one unique, referential, or check constraints -- beetle 5268 -- syntax that will be supported in db2 compat mode (beetle 5204) CREATE TABLE testdropconst1 (col1 CHAR(7) NOT NULL, col2 int not null CONSTRAINT uk1 UNIQUE , PRIMARY KEY(col1)); CREATE TABLE testdropconst2 (col1 CHAR(7) NOT NULL, col2 int not null CONSTRAINT uk2 UNIQUE, col3 CHAR(5) not null CONSTRAINT uk3 UNIQUE, PRIMARY KEY(col1)); CREATE TABLE testdropconst3 (col1 CHAR(7) NOT NULL, col2 int not null CONSTRAINT uk4 UNIQUE , PRIMARY KEY(col1)); CREATE TABLE testdropconst4 (col1 CHAR(7) NOT NULL, col2 int not null CONSTRAINT uk5 UNIQUE , PRIMARY KEY(col1)); CREATE TABLE testdropconst5 (col1 CHAR(7) NOT NULL, col2 int, col3 CHAR(5) not null, CONSTRAINT fk1 FOREIGN KEY (col1) REFERENCES testdropconst3(col1), CONSTRAINT fk2 FOREIGN KEY (col1) REFERENCES testdropconst4(col1)); CREATE TABLE testdropconst6 (col1 CHAR(7) CONSTRAINT ck1 CHECK (col1 is null), col2 int CONSTRAINT ck2 CHECK (col2 is null)); -- dropping more than one unique-constraint alter table testdropconst1 drop primary key drop constraint uk1; alter table testdropconst2 drop primary key drop constraint uk2 drop constraint uk3; -- dropping more than one foreign key constraint alter table testdropconst5 drop constraint fk1 drop constraint fk2; -- dropping more than one check constraint alter table testdropconst6 drop constraint ck1 drop constraint ck2; --clean up drop table testdropconst1; drop table testdropconst2; drop table testdropconst3; drop table testdropconst4; drop table testdropconst5; drop table testdropconst6; -- (4) altering more than one column -- beetle 5268 -- syntax that will be supported in db2 compat mode (beetle 5267) -- db2 compat mode should support create table testmodify (col1 varchar(30), col2 varchar(30)); alter table testmodify alter col1 set data type varchar(60) alter col2 set data type varchar(60); -- clean up drop table testmodify; -- number of values assigned in an INSERT statement should be the same as the number of specified or implied columns -- beetle 5269 create table t1(a int, b int, c char(10)); -- this statement should throw an error in db2 compat mode, but it does not insert into t1 values(1); -- clean up drop table t1; -- beetle 5281 -- These statements are successful in DB2 UDB v8, but not in Cloudscape -- Cloudscape does not support cast-functions such as blob, timestamp, time, and date -- DB2 does support cast functions such as these below: create table t1 (ch blob(10)); insert into t1 values (blob('hmm')); create table t2 (ch timestamp); insert into t2 values (timestamp(current timestamp)); create table t3 (ch time); insert into t3 values (time(current time)); create table t4 (ch date); insert into t4 values (date(current date)); drop table t1; drop table t2; drop table t3; drop table t4; -- test operands -- beetle 5282 -- <,> =, !=, <=, >= operands are not supported in db2 but supported in cloudscape CREATE TABLE testoperatorclob (colone clob(1K)); INSERT INTO testoperatorclob VALUES (CAST('50' AS CLOB(1K))); select * from testoperatorclob; -- these select statements should raise an error but are successful in cloudscape select * from testoperatorclob where colone > 10; select * from testoperatorclob where colone < 70; select * from testoperatorclob where colone = 50; select * from testoperatorclob where colone != 10; select * from testoperatorclob where colone <= 70; select * from testoperatorclob where colone >= 10; select * from testoperatorclob where colone <> 10; drop table testoperatorclob; -- beetle 5282 CREATE TABLE testoperatorblob (colone clob(1K)); INSERT INTO testoperatorblob VALUES (CAST('50' AS BLOB(1K))); select * from testoperatorblob; -- these select statements should raise an error but are successful in cloudscape select * from testoperatorblob where colone > 10; select * from testoperatorblob where colone < 999999; select * from testoperatorblob where colone = 00350030; select * from testoperatorblob where colone != 10; select * from testoperatorblob where colone <= 999999; select * from testoperatorblob where colone >= 10; select * from testoperatorblob where colone <> 10; drop table testoperatorblob; -- beetle 5283 -- casting using "X" for hex constant, "B" literal is not allowed in DB2 -- db2 raises ERROR 56098, cloudscape should raise error msg?a values cast(B'1' as char(100)); values cast(B'1' as clob(1M)); values cast(B'1' as blob(1M)); values cast(X'11' as char(100)); values cast(X'11' as clob(1M)); values cast(X'11' as blob(1M)); -- beetle 5284 -- minor difference in outputs when casting to blob in Cloudscape and DB2. values cast(' ' as blob(1M)); values cast('a' as blob(1M)); -- Test removed: DERBY-2147 -- beetle 5294 -- diable column names in the characterExpression and escape clause of a LIKE predicate -- create table likeable (match_me varchar(10), pattern varchar(10), esc varchar(1)); -- insert into likeable values ('foo%bar3', 'fooZ%bar3', 'Z'); -- select match_me from likeable where match_me like pattern escape esc; -- select match_me from likeable where match_me like pattern escape 'Z'; -- drop table likeable; -- beetle 5298 -- disable Field Access VALUES java.lang.Integer::MAX_VALUE; VALUES (1)->noSuchField; -- beetle 5299 -- disable Method Invocations VALUES (1)->toString(); VALUES 1.->toString(); VALUES 1..getClass()->toString(); create table m5299 (i int, s varchar(10)); insert into m5299 values(1, 'hello'); select i.hashCode(), s.indexOf('ll') from m5299; select s.indexOf('ll') from m5299; drop table m5299; -- beetle 5307 -- scale of the resulting data type for division values(11.0/1111.33); values (11111111111111111111111111111.10/1.11); values (11111111111111111111111111111.10/1.1); -- beetle 5346 -- positive test -- NULLs sort low in Cloudscape, but sort high in DB2 create table testOrderBy(c1 int); insert into testOrderBy values (1); insert into testOrderBy values (2); insert into testOrderBy values (null); select * from testOrderBy order by c1; drop table testOrderBy; create table likeable (match_me varchar(10), pattern varchar(10), esc varchar(1), e varchar(1)); insert into likeable values ('foo%bar3', 'fooZ%bar3', 'Z', 'Z'); select match_me from likeable where match_me like 'fooZ%bar3' escape 'Z'; select match_me from likeable where 'foo%bar3' like 'fooZ%bar3' escape 'Z'; select match_me from likeable where 'foo%bar3' like 'foo%'; -- Test removed: DERBY-2147 -- SQLSTATE=42824 -- select match_me from likeable where match_me like pattern escape esc; -- select match_me from likeable where match_me like pattern escape e; -- select match_me from likeable where match_me like pattern escape 'Z'; -- select match_me from likeable where match_me like pattern; -- select match_me from likeable where match_me like e; -- Test removed: DERBY-2147 -- SQLSTATE=22019 -- select match_me from likeable where match_me like 'fooZ%bar3' escape esc; -- select match_me from likeable where match_me like 'fooZ%bar3' escape e; -- SQLSTATE=42884 select match_me from likeable where match_me like 'fooZ%bar3' escape 1; select match_me from likeable where match_me like 'fooZ%bar3' escape 1; select match_me from likeable where 'foo%bar3' like 1; select match_me from likeable where 1 like 1; select match_me from likeable where match_me like 1; -- beetle 5845 select match_me from likeable where match_me like CURRENT_DATE; create table likes (dt date, tm time, ts timestamp); insert into likes values (current_date, current_time, current_timestamp); insert into likes values ('2004-03-03', current_time, current_timestamp); select * from likes where dt like '2004-03-0_'; select * from likes where tm like '_8:%:1%'; select * from likes where ts like '2004-04-09 08:5%'; drop table likeable; drop table likes; -- READ ONLY not allowed in "FOR" clause of a select. create table roTable (i int); insert into roTable values (8); select * from roTable for update; select * from roTable for update of i; select * from roTable for fetch only; select * from roTable for read only; drop table roTable; -- No support for Java types in CAST statements; values CAST (NULL AS CLASS java.lang.Integer); values CAST (NULL AS CLASS com.acme.SomeClass); values CAST (NULL AS CLASS java.sql.Date); values CAST (NULL AS java.lang.Integer); values CAST (NULL AS com.acme.SomeClass); values CAST (NULL AS java.sql.Date); values CAST (? AS CLASS java.lang.Integer); values CAST (? AS CLASS com.acme.SomeClass); values CAST (? AS CLASS java.sql.Date); values CAST (? AS java.lang.Integer); values CAST (? AS com.acme.SomeClass); values CAST (? AS java.sql.Date); -- No support for BIT_LENGTH, OCTET_LENGTH, TRIP and SUBSTRING in DB2 compatibility mode values BIT_LENGTH(X'55'); values OCTET_LENGTH('asdfasdfasdf'); values TRIM('x' FROM 'xasdf x'); values SUBSTRING('12345' FROM 3 FOR 2); -- Tests for explicit nulls. Not allowed in DB2, defect 5589 -- Should fail. create table t1 ( i int null); -- Should pass. create table t1 (i int); insert into t1 values null; -- Alter table add explict null column should also fail. alter table t1 add column j int null; -- Should pass alter table t1 add column j int; insert into t1 values (null, null); drop table t1; -- Beetle 5538: Match DB2 trigger restrictions. -- Part I) SQL-Procedure-Statement restrictions: -- 1) BEFORE triggers: can't have INSERT, UPDATE, or DELETE as action; when beetle 5253 is resolved, thsese should be changed to "no cascade before", instead of just "before". create table t1 (i int, j int); create table t2 (i int); create trigger trig1a NO CASCADE before insert on t1 for each row mode db2sql insert into t2 values(1); create trigger trig1b NO CASCADE before insert on t1 for each row mode db2sql update t2 set i=1 where i=2; create trigger trig1c NO CASCADE before insert on t1 for each row mode db2sql delete from t2 where i=8; -- 2) AFTER triggers create trigger trig2a after insert on t1 for each row mode db2sql insert into t2 values(1); create trigger trig2b after insert on t1 for each row mode db2sql update t2 set i=1 where i=2; create trigger trig2c after insert on t1 for each row mode db2sql delete from t2 where i=8; -- Part II) Verify applicable restrictions on the "REFERENCES" clause (should be the same as in DB2). -- 3) NEW, NEW_TABLE only valid with insert and update triggers; OLD, OLD_TABLE -- only valid with delete and update triggers. -- Next 8 should succeed. create trigger trig3a after insert on t1 referencing new as ooga for each row mode db2sql values(1); create trigger trig3b after update on t1 referencing old as ooga for each row mode db2sql values(1); create trigger trig3c after update on t1 referencing new as ooga for each row mode db2sql values(1); create trigger trig3d after delete on t1 referencing old as ooga for each row mode db2sql values(1); create trigger trig3e after insert on t1 referencing new_table as ooga for each statement mode db2sql values(1); create trigger trig3f after update on t1 referencing old_table as ooga for each statement mode db2sql values(1); create trigger trig3g after update on t1 referencing new_table as ooga for each statement mode db2sql values(1); create trigger trig3h after delete on t1 referencing old_table as ooga for each statement mode db2sql values(1); -- Next 4 should fail. create trigger trig3i after insert on t1 referencing old as ooga for each row mode db2sql values(1); create trigger trig3j after delete on t1 referencing new as ooga for each row mode db2sql values(1); create trigger trig3k after insert on t1 referencing old_table as ooga for each statement mode db2sql values(1); create trigger trig3m after delete on t1 referencing new_table as ooga for each statement mode db2sql values(1); -- 4) NEW_TABLE, OLD_TABLE not valid with BEFORE triggers (these will throw syntax errors until beetle 5253 is resolved). create trigger trig4a no cascade before update on t1 referencing old_table as ooga for each statement mode db2sql values(1); create trigger trig4b no cascade before update on t1 referencing new_table as ooga for each statement mode db2sql values(1); -- 5) OLD, NEW not valid with FOR EACH STATEMENT. create trigger trig5a after update on t1 referencing old as ooga for each statement mode db2sql values(1); create trigger trig5b after update on t1 referencing new as ooga for each statement mode db2sql values(1); -- cleanup for 5538: drop table t1; drop table t2; -- Beetle 5637: Require FOR EACH clause in DB2 mode. Optional in Cloudscape mode. create table t1(i int); -- DERBY-1953: The following statement will fail in DB2 LUW since it currently does -- not allow the FOR EACH part to be optional but DB2 iSeries allows both FOR EACH and -- MODE part to be optional. So this test is commented out for reference since it is -- not relevant after DERBY-1953 is applied (allow FOR EACH and MODE part to be optional). -- create trigger trig1 after insert on t1 mode db2sql values (8); -- Should pass create trigger trig1 after insert on t1 for each row mode db2sql values (8); create trigger trig2 after insert on t1 for each statement mode db2sql values (8); drop table t1; -- match SUBSTR builtin function out of range handling (5570). create table x1 (c char(10)); insert into x1 values ('foo'); -- DB2: Raises ERROR 22011: out of range, Cloudscape doesn't select substr('foo', -2,1) from x1; -- DB2: Raises ERROR 22011: out of range, Cloudscape return NULL select substr('foo', 1,-1) from x1; select substr('foo', 2,-1) from x1; select substr('foo', 3,-2) from x1; select substr('foo', -2,-3) from x1; -- DB2: ERROR 22011 out of range, Cloudscape returns empty string select substr('foo', 5) from x1; select substr('foo', 6,3) from x1; -- DB2: Raises ERROR 22011: out of range, Cloudscape returns 'f' select substr('foo', 0,1) from x1; -- DB2: ERROR 22011 out of range, Cloudscape return 'foo' select substr('foo', 1,4) from x1; -- DB2: ERROR 22011 out of range, Cloudscape return 'foo' select substr('foo', -5) from x1; -- DB2: ERROR 22011 out of range select substr('foo', -6,3) from x1; -- DB2: Returns an empty value, Cloudscape returns NULL select substr('foo', 1,0) from x1; select substr('foo', 2,0) from x1; select substr('foo', 3,0) from x1; -- DB2: Raises ERROR 22011: out of range, Cloudscape returns NULL select substr('foo', 4,0) from x1; select substr('foo', 5,0) from x1; select substr('foo', 6,0) from x1; -- Beetle 5630: A column check constraint can only refer to that column in DB2 create table t1(c1 int, c2 int check (c1 > 5)); -- check constraint ck1 in the column-definition of c2 can not refer to column c1 create table t1(c1 int, c2 int constraint ck1 check(c1 > c2)); -- Same test with alter table create table t1(c1 int); alter table t1 add column c2 int constraint ck2 check(c2 > c1); -- These should pass, uses table constraints create table t2(c1 int, c2 int, check (c1 > 5)); create table t3(i int, j int, check (j > 5)); alter table t1 add column c2 int; alter table t1 add constraint t1con check(c2 > c1); drop table t1; drop table t2; drop table t3; -- Beetle 5638: DB2 requires matching target and result columns for insert create table t1 ( i int, j int); create table t2 ( i int, j int); insert into t1 values (1, 1); insert into t2 values (2, 2); -- negative tests, mismatch of columns insert into t1 select i from t2; insert into t1(i) select * from t2; insert into t1(i, j) select j from t2; insert into t1 select * from t2 union select i from t2; insert into t1 select j from t2 union select j from t2; insert into t1(i) select * from t2 union all select * from t2; insert into t1(i, j) select i, j from t2 union all i from t2; -- positive cases insert into t1 select * from t2; select * from t1; insert into t1(i,j) select * from t2 union select i, j from t2; insert into t1(i) select i from t2 union all select j from t2; select * from t1; drop table t1; drop table t2; -- Beetle 5667: DB2 requires non-nullable columns to have a default in ALTER TABLE create table t1( i int); -- Negative cases alter table t1 add column j int not null; alter table t1 add column j int not null default null; -- positive cases alter table t1 add column j int; alter table t1 add column k int not null default 5; drop table t1; -- IS [NOT] TRUE/FALSE/UNKNOWN not supported in both Cloudscape and DB2 mode and that is why rather than getting feature not implemented, we will get syntax error -- create table t1( i int); select * from t1 where ((1=1) IS TRUE); select * from t1 where ((1=1) IS NOT TRUE); select * from t1 where ((1=0) IS FALSE); select * from t1 where ((1=0) IS NOT FALSE); select * from t1 where (null IS UNKNOWN); drop table t1; -- Beetle 5635, 5645 and 5633: Generated column name issues create table t1(i int, j int); create table t2(c1 int, c2 int); insert into t1 values (1, 1); insert into t2 values (2, 2); -- Cloudscape should generate column names when both sides of union don't match select i,j from t1 union all select c1,c2 from t2 order by 1; select i as c1, j as c2 from t1 union all select c1, c2 from t2 order by 1; -- Prevent Cloudscape from using generated column names for ordering select i+1 from t1 order by "SQLCol1"; select i+1 from t1 order by SQLCol1; values (1,2,3),(4,5,6),(7,8,9) order by "SQLCol1"; -- Column names for a CREATE VIEW should be specified when result table has unnamed columns. create view v1 as values 1; create view v1 as select i+1 from t1; create view v1 as select i+1 as i from t1; create view v2(c) as select i+1 from t1; drop view v1; drop view v2; drop table t1; drop table t2; -- ALTER TABLE COMPRESS statement is cloudscape specific, disable in db2 mode -- beetle 5553 -- TODO - not working yet -- negative tests create table tb1 (country_ISO_code char(2)); alter table tb1 compress; alter table tb1 compress sequential; -- clean up drop table tb1; -- Beetle 5717: Disable adding primary or unique constraints on non-nullable columns -- negative tests create table t1 (c1 int, c2 int); alter table t1 add constraint pk1 primary key (c1); alter table t1 add constraint uc1 unique (c2); -- positive tests create table t2 (c1 int not null, c2 char(10) not null); alter table t2 add constraint pk2 primary key (c1); alter table t2 add constraint uc2 unique (c2); drop table t1; drop table t2; -- SET STATISTICS TIMING ON stmt is cloudscape specific, disabled in db2 mode -- Once we have rewritten our functions to not use following sql, SET STATISTICS TIMING can be completely removed from the parser. set statistics timing on; -- SET RUNTIMESTATISTICS ON stmt is cloudscape specific, disabled in db2 mode -- Once we have rewritten our functions to not use following sql, SET RUNTIMESTATISTICS can be completely removed from the parser. set runtimestatistics on; -- following runtime statistics related sql will fail in db2 mode but will run fine in Cloudscape mode create table t1 (c1 int, c2 int); call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1); select * from t1; values runtimestatistics()->getScanStatisticsText(); values runtimestatistics()->toString(); -- following runtime statistics related sql is not supported anymore and will not run in any mode UPDATE STATISTICS FOR TABLE T1; DROP STATISTICS FOR TABLE T1; drop table t1;
the_stack
-- 2017-10-04T16:31:03.187 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557362,287,0,28,135,720,'DocAction',TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'CO','Der zukünftige Status des Belegs','D',2,'You find the current status in the Document Status field. The options are listed in a popup','Y','N','N','N','N','Y','N','N','N','N','Y','Belegverarbeitung',0,TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-10-04T16:31:03.188 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557362 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-10-04T16:31:03.266 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557363,289,0,17,131,720,'DocStatus',TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'DR','The current status of the document','D',2,'The Document Status indicates the status of a document at this time. If you want to change the document status, use the Document Action field','Y','N','N','N','N','Y','N','N','N','N','Y','Belegstatus',0,TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-10-04T16:31:03.268 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557363 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-10-04T16:31:03.347 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557364,1047,0,20,720,'Processed',TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'N','Checkbox sagt aus, ob der Beleg verarbeitet wurde. ','D',1,'Verarbeitete Belege dürfen in der Regel nich mehr geändert werden.','Y','N','N','N','N','Y','N','N','N','N','N','Verarbeitet',0,TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-10-04T16:31:03.348 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557364 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-10-04T16:31:03.453 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Workflow (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Workflow_ID,Author,Cost,Created,CreatedBy,DocumentNo,Duration,DurationUnit,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsValid,Name,PublishStatus,Updated,UpdatedBy,Value,Version,WaitingTime,WorkflowType,WorkingTime) VALUES ('1',0,0,720,540100,'metasfresh ERP',0,TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'10000010',1,'D','D','Y','N','N','N','Process_M_Forecast','R',TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'Process_M_Forecast',0,0,'P',0) ; -- 2017-10-04T16:31:03.455 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Workflow_Trl (AD_Language,AD_Workflow_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Workflow_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Workflow t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Workflow_ID=540100 AND NOT EXISTS (SELECT 1 FROM AD_Workflow_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Workflow_ID=t.AD_Workflow_ID) ; -- 2017-10-04T16:31:03.544 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_Node (Action,AD_Client_ID,AD_Org_ID,AD_WF_Node_ID,AD_Workflow_ID,Cost,Created,CreatedBy,Description,Duration,DurationLimit,EntityType,IsActive,IsCentrallyMaintained,JoinElement,Name,SplitElement,Updated,UpdatedBy,Value,WaitingTime,XPosition,YPosition) VALUES ('Z',0,0,540211,540100,0,TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'(Standard Node)',0,0,'D','Y','Y','X','(Start)','X',TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'(Start)',0,0,0) ; -- 2017-10-04T16:31:03.549 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_Node_Trl (AD_Language,AD_WF_Node_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_WF_Node_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_WF_Node t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_WF_Node_ID=540211 AND NOT EXISTS (SELECT 1 FROM AD_WF_Node_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_WF_Node_ID=t.AD_WF_Node_ID) ; -- 2017-10-04T16:31:03.561 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Workflow SET AD_WF_Node_ID=540211, IsValid='Y',Updated=TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=540100 ; -- 2017-10-04T16:31:03.914 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_Node (Action,AD_Client_ID,AD_Org_ID,AD_WF_Node_ID,AD_Workflow_ID,Cost,Created,CreatedBy,Description,DocAction,Duration,DurationLimit,EntityType,IsActive,IsCentrallyMaintained,JoinElement,Name,SplitElement,Updated,UpdatedBy,Value,WaitingTime,XPosition,YPosition) VALUES ('D',0,0,540212,540100,0,TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'(Standard Node)','--',0,0,'D','Y','Y','X','(DocAuto)','X',TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'(DocAuto)',0,0,0) ; -- 2017-10-04T16:31:03.915 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_Node_Trl (AD_Language,AD_WF_Node_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_WF_Node_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_WF_Node t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_WF_Node_ID=540212 AND NOT EXISTS (SELECT 1 FROM AD_WF_Node_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_WF_Node_ID=t.AD_WF_Node_ID) ; -- 2017-10-04T16:31:03.987 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_Node (Action,AD_Client_ID,AD_Org_ID,AD_WF_Node_ID,AD_Workflow_ID,Cost,Created,CreatedBy,Description,DocAction,Duration,DurationLimit,EntityType,IsActive,IsCentrallyMaintained,JoinElement,Name,SplitElement,Updated,UpdatedBy,Value,WaitingTime,XPosition,YPosition) VALUES ('D',0,0,540213,540100,0,TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'(Standard Node)','PR',0,0,'D','Y','Y','X','(DocPrepare)','X',TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'(DocPrepare)',0,0,0) ; -- 2017-10-04T16:31:03.989 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_Node_Trl (AD_Language,AD_WF_Node_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_WF_Node_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_WF_Node t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_WF_Node_ID=540213 AND NOT EXISTS (SELECT 1 FROM AD_WF_Node_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_WF_Node_ID=t.AD_WF_Node_ID) ; -- 2017-10-04T16:31:04.078 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_Node (Action,AD_Client_ID,AD_Org_ID,AD_WF_Node_ID,AD_Workflow_ID,Cost,Created,CreatedBy,Description,DocAction,Duration,DurationLimit,EntityType,IsActive,IsCentrallyMaintained,JoinElement,Name,SplitElement,Updated,UpdatedBy,Value,WaitingTime,XPosition,YPosition) VALUES ('D',0,0,540214,540100,0,TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'(Standard Node)','CO',0,0,'D','Y','Y','X','(DocComplete)','X',TO_TIMESTAMP('2017-10-04 16:31:03','YYYY-MM-DD HH24:MI:SS'),100,'(DocComplete)',0,0,0) ; -- 2017-10-04T16:31:04.082 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_Node_Trl (AD_Language,AD_WF_Node_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_WF_Node_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_WF_Node t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_WF_Node_ID=540214 AND NOT EXISTS (SELECT 1 FROM AD_WF_Node_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_WF_Node_ID=t.AD_WF_Node_ID) ; -- 2017-10-04T16:31:04.167 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_NodeNext (AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,AD_WF_Node_ID,AD_WF_NodeNext_ID,Created,CreatedBy,Description,EntityType,IsActive,IsStdUserWorkflow,SeqNo,Updated,UpdatedBy) VALUES (0,0,540213,540211,540148,TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),100,'Standard Transition','D','Y','N',10,TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-04T16:31:04.175 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WF_NodeNext SET Description='(Standard Approval)', IsStdUserWorkflow='Y',Updated=TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_WF_NodeNext_ID=540148 ; -- 2017-10-04T16:31:04.258 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_NodeNext (AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,AD_WF_Node_ID,AD_WF_NodeNext_ID,Created,CreatedBy,Description,EntityType,IsActive,IsStdUserWorkflow,SeqNo,Updated,UpdatedBy) VALUES (0,0,540212,540211,540149,TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),100,'Standard Transition','D','Y','N',100,TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-04T16:31:04.331 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_WF_NodeNext (AD_Client_ID,AD_Org_ID,AD_WF_Next_ID,AD_WF_Node_ID,AD_WF_NodeNext_ID,Created,CreatedBy,Description,EntityType,IsActive,IsStdUserWorkflow,SeqNo,Updated,UpdatedBy) VALUES (0,0,540214,540213,540150,TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),100,'Standard Transition','D','Y','N',100,TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-04T16:31:04.410 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Workflow_ID,Created,CreatedBy,EntityType,IsActive,IsReport,IsUseBPartnerLanguage,Name,Type,Updated,UpdatedBy,Value) VALUES ('1',0,0,540866,540100,TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','Y','Process_M_Forecast','Java',TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),100,'Process_M_Forecast') ; -- 2017-10-04T16:31:04.413 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=540866 AND NOT EXISTS (SELECT 1 FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) ; -- 2017-10-04T16:31:04.442 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Process_ID=540866,Updated=TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11916 ; -- 2017-10-04T16:31:04.446 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Process_ID=540866,Updated=TO_TIMESTAMP('2017-10-04 16:31:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=557362 ; -- 2017-10-04T17:09:37.660 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,557362,560388,0,653,TO_TIMESTAMP('2017-10-04 17:09:37','YYYY-MM-DD HH24:MI:SS'),100,'Der zukünftige Status des Belegs',2,'D','You find the current status in the Document Status field. The options are listed in a popup','Y','Y','Y','N','N','N','N','N','Belegverarbeitung',TO_TIMESTAMP('2017-10-04 17:09:37','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-04T17:09:37.674 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=560388 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-10-04T17:09:37.804 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,557363,560389,0,653,TO_TIMESTAMP('2017-10-04 17:09:37','YYYY-MM-DD HH24:MI:SS'),100,'The current status of the document',2,'D','The Document Status indicates the status of a document at this time. If you want to change the document status, use the Document Action field','Y','Y','Y','N','N','N','N','N','Belegstatus',TO_TIMESTAMP('2017-10-04 17:09:37','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-04T17:09:37.809 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=560389 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-10-04T17:09:37.908 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,557364,560390,0,653,TO_TIMESTAMP('2017-10-04 17:09:37','YYYY-MM-DD HH24:MI:SS'),100,'Checkbox sagt aus, ob der Beleg verarbeitet wurde. ',1,'D','Verarbeitete Belege dürfen in der Regel nich mehr geändert werden.','Y','Y','Y','N','N','N','N','N','Verarbeitet',TO_TIMESTAMP('2017-10-04 17:09:37','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-04T17:09:37.913 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=560390 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-10-04T17:11:34.865 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2017-10-04 17:11:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560390 ; -- 2017-10-04T17:11:34.884 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2017-10-04 17:11:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10298 ; -- 2017-10-04T17:11:34.905 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110,Updated=TO_TIMESTAMP('2017-10-04 17:11:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560389 ; -- 2017-10-04T17:11:34.914 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120,Updated=TO_TIMESTAMP('2017-10-04 17:11:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560388 ; -- 2017-10-04T17:11:34.922 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=130,Updated=TO_TIMESTAMP('2017-10-04 17:11:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10300 ; -- 2017-10-04T17:11:44.758 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2017-10-04 17:11:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560389 ; -- 2017-10-04T17:11:51.272 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2017-10-04 17:11:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560388 ; -- 2017-10-04T17:11:59.724 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-04 17:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10298 ; -- 2017-10-04T17:11:59.728 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=130,Updated=TO_TIMESTAMP('2017-10-04 17:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10300 ; -- 2017-10-04T17:11:59.731 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=120,Updated=TO_TIMESTAMP('2017-10-04 17:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560388 ; -- 2017-10-04T17:11:59.734 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2017-10-04 17:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560389 ; -- 2017-10-04T17:11:59.738 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-04 17:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=560390 ; -- 2017-10-04T17:16:48.462 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('M_Forecast','ALTER TABLE public.M_Forecast ADD COLUMN DocAction CHAR(2) DEFAULT ''CO'' NOT NULL') ; -- 2017-10-04T17:16:59.727 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('M_Forecast','ALTER TABLE public.M_Forecast ADD COLUMN DocStatus VARCHAR(2) DEFAULT ''DR'' NOT NULL') ; -- 2017-10-04T17:17:15.204 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('M_Forecast','ALTER TABLE public.M_Forecast ADD COLUMN Processed CHAR(1) DEFAULT ''N'' CHECK (Processed IN (''Y'',''N'')) NOT NULL') ;
the_stack
/* --RUN ONCE ONLY!!! CREATE SCHEMA acs2010_5yr; */ SET search_path = acs2010_5yr, public; SET client_encoding = 'LATIN1'; --CREATE TABLE TO HOLD FIELD DEFINITIONS FOR geoheader CREATE TABLE geoheader_schema ( line_number serial, Name varchar, Descr varchar, Field_Size int, Starting_Position int, sumlevels varchar, PRIMARY KEY (name) ); --INSERT FIELD DEFINITIONS INTO geoheader_schema INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('fileid', 'Always equal to ACS Summary File identification', 6, 1, 'All Summary Levels'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('stusab', 'State Postal Abbreviation', 2, 7, 'All Summary Levels'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('sumlevel', 'Summary Level', 3, 9, 'All Summary Levels'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('component', 'Geographic Component', 2, 12, 'All Summary Levels'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('logrecno', 'Logical Record Number', 7, 14, 'All Summary Levels'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('us', 'US', 1, 21, '10'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('region', 'Census Region', 1, 22, '20'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('division', 'Census Division', 1, 23, '30'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('statece', 'State (Census Code)', 2, 24, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('state', 'State (FIPS Code)', 2, 26, '040, 050, 060, 160, 230, 312, 352,500, 795, 950, 960, 970'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('county', 'County of current residence', 3, 28, '050, 060'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('cousub', 'County Subdivision (FIPS)', 5, 31, '60'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('place', 'Place (FIPS Code)', 5, 36, '160, 312, 352'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('tract', 'Census Tract', 6, 41, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blkgrp', 'Block Group', 1, 47, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('concit', 'Consolidated City', 5, 48, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('aianhh', 'American Indian Area/Alaska Native Area/ Hawaiian Home Land (Census)', 4, 53, '250'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('aianhhfp', 'American Indian Area/Alaska Native Area/ Hawaiian Home Land (FIPS)', 5, 57, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('aihhtli', 'American Indian Trust Land/ Hawaiian Home Land Indicator', 1, 62, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('aitsce', 'American Indian Tribal Subdivision (Census)', 3, 63, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('aits', 'American Indian Tribal Subdivision (FIPS)', 5, 66, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('anrc', 'Alaska Native Regional Corporation (FIPS)', 5, 71, '230'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('cbsa', 'Metropolitan and Micropolitan Statistical Area', 5, 76, '310, 312, 314'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('csa', 'Combined Statistical Area', 3, 81, '330'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('metdiv', 'Metropolitan Statistical Area-Metropolitan Division', 5, 84, '314'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('macc', 'Metropolitan Area Central City', 1, 89, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('memi', 'Metropolitan/Micropolitan Indicator Flag', 1, 90, '010, 020, 030, 040, 314'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('necta', 'New England City and Town Area', 5, 91, '335, 350, 352'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('cnecta', 'New England City and Town Combined Statistical Area', 3, 96, '335'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('nectadiv', 'New England City and Town Area Division', 5, 99, '355'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('ua', 'Urban Area', 5, 104, '400'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blank1', NULL, 5, 109, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('cdcurr', 'Current Congressional District ***', 2, 114, '500'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('sldu', 'State Legislative District Upper', 3, 116, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('sldl', 'State Legislative District Lower', 3, 119, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blank2', NULL, 6, 122, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blank3', NULL, 3, 128, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blank4', NULL, 5, 131, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('submcd', 'Subminor Civil Division (FIPS)', 5, 136, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('sdelm', 'State-School District (Elementary)', 5, 141, '950'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('sdsec', 'State-School District (Secondary)', 5, 146, '960'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('sduni', 'State-School District (Unified)', 5, 151, '970'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('ur', 'Urban/Rural', 1, 156, '010, 020, 030, 040'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('pci', 'Principal City Indicator', 1, 157, '010, 020, 030, 040, 312, 352'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blank5', NULL, 6, 158, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blank6', NULL, 5, 164, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('puma5', 'Public Use Microdata Area - 5% File', 5, 169, '795'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blank7', NULL, 5, 174, 'Reserved for future use'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('geoid', 'Geographic Identifier', 40, 179, 'All Summary Levels'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('name', 'Area Name', 200, 219, 'All Summary Levels'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('bttr', 'Tribal Tract', 6, 419, '256, 258, 291, 292, 293, 294'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('btbg', 'Tribal Block Group', 1, 425, '258, 293, 294'); INSERT INTO geoheader_schema (name, descr, field_size, starting_position, sumlevels) VALUES ('blank8', NULL, 50, 426, 'Reserved for future use'); /*IMPORT DATA DICTIONARY. DICTIONARY FILE CAN BE DOWNLOADED FROM http://www2.census.gov/acs2010_5yr/summaryfile/ AS TEXT OR EXCEL FILE. CHANGE NAME OF UPLOAD FOLDER.*/ CREATE TABLE data_dictionary ( File_ID varchar, Table_ID varchar, Sequence_Number int, Line_Number double precision, Start_Position int, Total_Cells_in_Table varchar, Total_Cells_in_Sequence int, Table_Title varchar, Subject_Area varchar ); --Will fail if table structure doesn't match imported file SELECT sql_import_data_dictionary(); --DETERMINE SEQUENCES FROM DATA DICTIONARY. NOTE US/PR-ONLY SEQUENCES. CREATE VIEW vw_sequence AS SELECT sequence_number AS seq, 'seq' || lpad(sequence_number::varchar, 4, '0') AS seq_id, subject_area, total_cells_in_sequence AS seq_cells, CASE WHEN sequence_number IN (1, 2, 17, 18, 20, 21, 22, 23, 24, 107) THEN 'us' WHEN sequence_number IN (109, 110, 111, 112, 113, 114, 115, 116, 117, 118) THEN 'pr' ELSE NULL END AS coverage FROM data_dictionary WHERE total_cells_in_sequence IS NOT NULL ; --DETERMINE SUBJECT TABLES FROM DATA DICTIONARY CREATE VIEW vw_subject_table AS SELECT Subject_Area, Table_ID, initcap(Table_Title) AS table_title, universe, Sequence_Number AS seq, 'seq' || lpad(sequence_number::varchar, 4, '0') AS seq_id, Start_Position, split_part(Total_Cells_in_Table, ' ', 1)::int AS table_cells FROM data_dictionary d JOIN ( SELECT table_id, sequence_number, table_title AS universe FROM data_dictionary WHERE table_title LIKE 'Universe%' ) u USING (table_id, sequence_number) WHERE Total_Cells_in_Table != '' ; --DETERMINE DATA CELLS FROM DATA DICTIONARY CREATE VIEW vw_cell AS SELECT table_id, table_id || lpad(line_number::varchar, 3, '0') AS cell_id, seq, seq_id, line_number AS table_position, start_position + line_number - min(line_number) OVER (PARTITION BY seq) - 6 AS seq_position, descr FROM (SELECT table_id, sequence_number AS seq, line_number, table_title AS descr FROM data_dictionary WHERE line_number = round(line_number)) d JOIN vw_subject_table USING (table_id, seq) ;
the_stack
-- 06.10.2015 12:20 -- URL zum Konzept INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,542897,0,'Season',TO_TIMESTAMP('2015-10-06 12:20:47','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Jahreszeit','Jahreszeit',TO_TIMESTAMP('2015-10-06 12:20:47','YYYY-MM-DD HH24:MI:SS'),100) ; -- 06.10.2015 12:20 -- URL zum Konzept INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=542897 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 06.10.2015 12:21 -- URL zum Konzept INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540588,TO_TIMESTAMP('2015-10-06 12:21:58','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','Season',TO_TIMESTAMP('2015-10-06 12:21:58','YYYY-MM-DD HH24:MI:SS'),100,'L') ; -- 06.10.2015 12:21 -- URL zum Konzept INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540588 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 06.10.2015 12:22 -- URL zum Konzept INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,540588,541125,TO_TIMESTAMP('2015-10-06 12:22:17','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Winter',TO_TIMESTAMP('2015-10-06 12:22:17','YYYY-MM-DD HH24:MI:SS'),100,'WI','Winter') ; -- 06.10.2015 12:22 -- URL zum Konzept INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541125 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) ; -- 06.10.2015 12:22 -- URL zum Konzept INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,540588,541126,TO_TIMESTAMP('2015-10-06 12:22:44','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Frühling',TO_TIMESTAMP('2015-10-06 12:22:44','YYYY-MM-DD HH24:MI:SS'),100,'SP','Spring') ; -- 06.10.2015 12:22 -- URL zum Konzept INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541126 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) ; -- 06.10.2015 12:23 -- URL zum Konzept INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,540588,541127,TO_TIMESTAMP('2015-10-06 12:23:00','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Sommer',TO_TIMESTAMP('2015-10-06 12:23:00','YYYY-MM-DD HH24:MI:SS'),100,'SU','Summer') ; -- 06.10.2015 12:23 -- URL zum Konzept INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541127 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) ; -- 06.10.2015 12:23 -- URL zum Konzept INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,540588,541128,TO_TIMESTAMP('2015-10-06 12:23:35','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Herbst',TO_TIMESTAMP('2015-10-06 12:23:35','YYYY-MM-DD HH24:MI:SS'),100,'AU','Autumn') ; -- 06.10.2015 12:23 -- URL zum Konzept INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541128 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) ; -- 06.10.2015 12:24 -- URL zum Konzept INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,552766,542897,0,17,540588,540610,'N','Season',TO_TIMESTAMP('2015-10-06 12:24:25','YYYY-MM-DD HH24:MI:SS'),100,'N','de.metas.materialtracking',2,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','Y','N','Jahreszeit',0,TO_TIMESTAMP('2015-10-06 12:24:25','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 06.10.2015 12:24 -- URL zum Konzept INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=552766 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 06.10.2015 12:24 -- URL zum Konzept ALTER TABLE M_Material_Tracking ADD Season VARCHAR(2) DEFAULT NULL ; -- 06.10.2015 12:25 -- URL zum Konzept INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,Updated,UpdatedBy) VALUES (0,552766,556347,0,540610,0,TO_TIMESTAMP('2015-10-06 12:25:28','YYYY-MM-DD HH24:MI:SS'),100,0,'de.metas.materialtracking',0,'Y','Y','Y','Y','N','N','N','N','Y','Jahreszeit',73,130,0,TO_TIMESTAMP('2015-10-06 12:25:28','YYYY-MM-DD HH24:MI:SS'),100) ; -- 06.10.2015 12:25 -- URL zum Konzept INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556347 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 06.10.2015 12:26 -- URL zum Konzept UPDATE AD_Field SET SeqNoGrid=83,Updated=TO_TIMESTAMP('2015-10-06 12:26:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556347 ; -- 06.10.2015 12:28 -- URL zum Konzept UPDATE AD_Reference SET IsOrderByValue='Y',Updated=TO_TIMESTAMP('2015-10-06 12:28:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540588 ; -- 06.10.2015 12:28 -- URL zum Konzept UPDATE AD_Ref_List SET Value='1',Updated=TO_TIMESTAMP('2015-10-06 12:28:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=541126 ; -- 06.10.2015 12:28 -- URL zum Konzept UPDATE AD_Ref_List SET Value='3',Updated=TO_TIMESTAMP('2015-10-06 12:28:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=541128 ; -- 06.10.2015 12:28 -- URL zum Konzept UPDATE AD_Ref_List SET Value='2',Updated=TO_TIMESTAMP('2015-10-06 12:28:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=541127 ; -- 06.10.2015 12:28 -- URL zum Konzept UPDATE AD_Ref_List SET Value='4',Updated=TO_TIMESTAMP('2015-10-06 12:28:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=541125 ; -- 06.10.2015 12:30 -- URL zum Konzept UPDATE AD_Field SET Description='Optionales Feld zur Abgrenzung und Orientierung. Hat keine Auswirkungen auf die Verarbeitung des Material-Vorgangs', IsCentrallyMaintained='N',Updated=TO_TIMESTAMP('2015-10-06 12:30:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556347 ; -- 06.10.2015 12:30 -- URL zum Konzept UPDATE AD_Field_Trl SET IsTranslated='N' WHERE AD_Field_ID=556347 ;
the_stack
create table partition_truncate_table_0000 ( c1 int , c2 int ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); insert into partition_truncate_table_0000 select generate_series(0,100), generate_series(0,100); alter table partition_truncate_table_0000 drop partition for (99); select count(*) from partition_truncate_table_0000; --51 rows truncate table partition_truncate_table_0000; select count(*) from partition_truncate_table_0000; -- 0 rows drop table partition_truncate_table_0000; --14-------------------------------------------------------------------- --sytax test, missing partition key word create table partition_truncate_table_0000 ( c1 int , c2 int ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); alter table partition_truncate_table_0000 truncate partition_truncate_table_0000_p1; --error, missing partition key word --missing the partition name alter table partition_truncate_table_0000 truncate partition ; --error ,missing the partition name -- /* skip the case for pgxc */ -- /*using partition for , the values is out of boundary of partitioned table , or the partition is not exist */ --alter table partition_truncate_table_0000 truncate partition for (151); --alter table partition_truncate_table_0000 truncate partition p1; drop table partition_truncate_table_0000; create table partition_truncate_table_0000 ( c1 int , c2 int ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (200) ); --using partition for , the values is out of boundary of partitioned table , or the partition is not exist -- /* skip the case for pgxc */ alter table partition_truncate_table_0000 truncate partition for (151); -- /* skip the case for pgxc */ -- /* error ,the partiiton is not exist */ --insert into partition_truncate_table_0000 values(152,0); --alter table partition_truncate_table_0000 truncate partition for (151); --select * from partition_truncate_table_0000 order by 1, 2; -- 0 row insert into partition_truncate_table_0000 values(152,0); select count(*) from partition_truncate_table_0000; -- 1 rows --multy action test alter table partition_truncate_table_0000 truncate partition for (151), truncate partition for (251); --error ,out of boundary alter table partition_truncate_table_0000 truncate partition for (151), truncate partition partition_truncate_table_0000_p3; --error no partition p3 alter table partition_truncate_table_0000 truncate partition for (151), truncate partition partition_truncate_table_0000_p1; --succeed select * from partition_truncate_table_0000 order by 1, 2; --0 row drop table partition_truncate_table_0000; --15-------------------------------------------------------------------- --cross test with index add/drop partition, toast table, transaction create table partition_truncate_table_0000 ( c1 int , c2 int ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; insert into partition_truncate_table_0000 select generate_series(0,99),0; select count(*) from partition_truncate_table_0000; alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p0; select count(*) from partition_truncate_table_0000; --50 rows alter table partition_truncate_table_0000 truncate partition for (99); select count(*) from partition_truncate_table_0000; -- 0 rows -- /*skip the case for pgxc*/ --truncate interval partition --insert into partition_truncate_table_0000 values (151,0); --alter table partition_truncate_table_0000 truncate partition for (152); --select count(*) from partition_truncate_table_0000; -- 0 rows drop table partition_truncate_table_0000; --16-------------------------------------------------------------------- --partitioned table has toast table partition create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; insert into partition_truncate_table_0000 select generate_series(0,99),0; --truncate added partition alter table partition_truncate_table_0000 add partition partition_truncate_table_0000_p3 values less than (200); insert into partition_truncate_table_0000 values (151,0); alter table partition_truncate_table_0000 truncate partition for (151); select count(*) from partition_truncate_table_0000; -- 100 rows --drop the truncated partition alter table partition_truncate_table_0000 drop partition for (151); drop table partition_truncate_table_0000; --17-------------------------------------------------------------------- --truncate command and create table in same transaction start transaction ; create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; insert into partition_truncate_table_0000 select generate_series(0,99),0; alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p1; select count(*) from partition_truncate_table_0000; --50 rows rollback; select count(*) from partition_truncate_table_0000; --can not find the partitioned table start transaction ; create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; insert into partition_truncate_table_0000 select generate_series(0,99),0; alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p1; select count(*) from partition_truncate_table_0000; --50 rows commit; select count(*) from partition_truncate_table_0000; --50 rows drop table partition_truncate_table_0000; --18-------------------------------------------------------------------- --truncate partiton and drop parttion in same transaction create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; insert into partition_truncate_table_0000 select generate_series(0,99),0; start transaction ; alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p1; select count(*) from partition_truncate_table_0000; --50 rows alter table partition_truncate_table_0000 drop partition partition_truncate_table_0000_p1; rollback; select count(*) from partition_truncate_table_0000; --100 rows start transaction ; alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p1; select count(*) from partition_truncate_table_0000; --50 rows alter table partition_truncate_table_0000 drop partition partition_truncate_table_0000_p1; commit ; select count(*) from partition_truncate_table_0000; --50 rows drop table partition_truncate_table_0000; --19-------------------------------------------------------------------- -- fk/pk constraint -- create table partition_truncate_table_0000 -- ( -- c1 int unique, -- c2 text -- ) -- partition by range (c1) -- ( -- partition p0 values less than (50), -- partition p1 values less than (100), -- partition p2 values less than (150) -- ); -- create table partition_truncate_table_00001 -- ( -- c1 int references partition_truncate_table_0000(c1), -- c2 text -- ); -- insert into partition_truncate_table_0000 select generate_series(0,99),0; -- insert into partition_truncate_table_00001 select generate_series(0,99),0; -- alter table partition_truncate_table_0000 truncate partition p1; ----error , partition_truncate_table_00001 references to partition_truncate_table_0000 -- -- drop table partition_truncate_table_00001; -- drop table partition_truncate_table_0000; --20-------------------------------------------------------------------- --partiton for multy column create table partition_truncate_table_0000 ( c1 int , c2 int , c3 int , c4 int ) partition by range (c1,c2,c3) ( partition partition_truncate_table_0000_p0 values less than (50,20,30), partition partition_truncate_table_0000_p1 values less than (100,40,50), partition partition_truncate_table_0000_p2 values less than (100,100,50), partition partition_truncate_table_0000_p3 values less than (150,60,200) ); insert into partition_truncate_table_0000 select generate_series(0,149),generate_series(0,149),generate_series(0,149); select count(*) from partition_truncate_table_0000; --150 rows alter table partition_truncate_table_0000 truncate partition for(100); --error , too few column -- alter table partition_truncate_table_0000 truncate partition for(100,100,100,100); --error ,too manay column alter table partition_truncate_table_0000 truncate partition for(100,101,100); --succeed select count(*) from partition_truncate_table_0000; --100 rows drop table partition_truncate_table_0000; --21-------------------------------------------------------------------- --add partition, create a new interval partition,truncate in same transsaction create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; -- skip the case for pgxc --start transaction; --insert into partition_truncate_table_0000 values (201,100); --alter table partition_truncate_table_0000 truncate partition for(201); --select count(*) from partition_truncate_table_0000; --rollback; select count(*) from partition_truncate_table_0000; --0 drop table partition_truncate_table_0000; create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; -- skip the case for pgxc --start transaction; --insert into partition_truncate_table_0000 values (201,100); --alter table partition_truncate_table_0000 truncate partition for(201); --select count(*) from partition_truncate_table_0000; --commit; select count(*) from partition_truncate_table_0000; --0 drop table partition_truncate_table_0000; create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; start transaction; alter table partition_truncate_table_0000 add partition partition_truncate_table_0000_p3 values less than(200); insert into partition_truncate_table_0000 select generate_series(150,199); select count(*) from partition_truncate_table_0000; --50 alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p3; select count(*) from partition_truncate_table_0000; -- 0 rollback; select count(*) from partition_truncate_table_0000; -- 0 rows drop table partition_truncate_table_0000; create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); create index on partition_truncate_table_0000(c1,c2) local; start transaction; alter table partition_truncate_table_0000 add partition partition_truncate_table_0000_p3 values less than(200); insert into partition_truncate_table_0000 select generate_series(150,199); select count(*) from partition_truncate_table_0000; --50 rows alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p3; select count(*) from partition_truncate_table_0000; -- 0 rows commit; select count(*) from partition_truncate_table_0000 partition (partition_truncate_table_0000_p3); --0 drop table partition_truncate_table_0000; --22-------------------------------------------------------------------- --truncate same partition in a command create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); insert into partition_truncate_table_0000 select generate_series(0,149); select count(*) from partition_truncate_table_0000; --150 rows alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p0, truncate partition for(49); select count(*) from partition_truncate_table_0000; --100 rows truncate partition_truncate_table_0000; --in same transaction start transaction; alter table partition_truncate_table_0000 add partition partition_truncate_table_0000_p3 values less than (200); insert into partition_truncate_table_0000 select generate_series(150,199); alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p3, truncate partition for(199),truncate partition partition_truncate_table_0000_p3; select count(*) from partition_truncate_table_0000 partition (partition_truncate_table_0000_p3); --0 rollback; select count(*) from partition_truncate_table_0000 partition (partition_truncate_table_0000_p3); --p3 not exist start transaction; alter table partition_truncate_table_0000 add partition partition_truncate_table_0000_p3 values less than (200); insert into partition_truncate_table_0000 select generate_series(150,199); alter table partition_truncate_table_0000 truncate partition partition_truncate_table_0000_p3, truncate partition for(199),truncate partition partition_truncate_table_0000_p3; select count(*) from partition_truncate_table_0000 partition (partition_truncate_table_0000_p3); --0 commit; select count(*) from partition_truncate_table_0000 partition (partition_truncate_table_0000_p3); --0 drop table partition_truncate_table_0000; --23-------------------------------------------------------------------- --test for truncate parititon for null, maxvalue create table partition_truncate_table_0000 ( c1 int , c2 text ) partition by range (c1) ( partition partition_truncate_table_0000_p0 values less than (50), partition partition_truncate_table_0000_p1 values less than (100), partition partition_truncate_table_0000_p2 values less than (150) ); alter table partition_truncate_table_0000 truncate partition for (null); -- out of range alter table partition_truncate_table_0000 truncate partition for (maxvalue); --out of range drop table partition_truncate_table_0000; create table partition_truncate_table_0000 ( c1 int , c2 int , c3 int , c4 int ) partition by range (c1,c2,c3) ( partition partition_truncate_table_0000_p0 values less than (50,20,30), partition partition_truncate_table_0000_p1 values less than (100,40,50), partition partition_truncate_table_0000_p2 values less than (100,100,50), partition partition_truncate_table_0000_p3 values less than (150,60,200) ); alter table partition_truncate_table_0000 truncate partition for (100,null,null); --succeed alter table partition_truncate_table_0000 truncate partition for (149,maxvalue,50); --succeed drop table partition_truncate_table_0000;
the_stack
-- -- PostgreSQL database dump -- -- Dumped from database version 13.0 (Debian 13.0-1.pgdg100+1) -- Dumped by pg_dump version 13.0 (Debian 13.0-1.pgdg100+1) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; SET default_tablespace = ''; SET default_table_access_method = heap; -- -- Name: _sc_config; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_config ( key text NOT NULL, value jsonb NOT NULL ); ALTER TABLE public._sc_config OWNER TO postgres; -- -- Name: _sc_errors; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_errors ( id integer NOT NULL, stack text NOT NULL, message text NOT NULL, occur_at timestamp without time zone NOT NULL, tenant text NOT NULL, user_id integer, url text NOT NULL, headers jsonb NOT NULL, body jsonb ); ALTER TABLE public._sc_errors OWNER TO postgres; -- -- Name: _sc_errors_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public._sc_errors_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public._sc_errors_id_seq OWNER TO postgres; -- -- Name: _sc_errors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public._sc_errors_id_seq OWNED BY public._sc_errors.id; -- -- Name: _sc_fields; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_fields ( id integer NOT NULL, table_id integer NOT NULL, name text NOT NULL, label text, type text, reftable_name text, attributes jsonb, required boolean DEFAULT false NOT NULL, is_unique boolean DEFAULT false NOT NULL, calculated boolean DEFAULT false NOT NULL, stored boolean DEFAULT false NOT NULL, expression text ); ALTER TABLE public._sc_fields OWNER TO postgres; -- -- Name: _sc_fields_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public._sc_fields_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public._sc_fields_id_seq OWNER TO postgres; -- -- Name: _sc_fields_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public._sc_fields_id_seq OWNED BY public._sc_fields.id; -- -- Name: _sc_files; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_files ( id integer NOT NULL, filename text NOT NULL, location text NOT NULL, uploaded_at timestamp without time zone NOT NULL, size_kb integer NOT NULL, user_id integer, mime_super text NOT NULL, mime_sub text NOT NULL, min_role_read integer NOT NULL ); ALTER TABLE public._sc_files OWNER TO postgres; -- -- Name: _sc_files_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public._sc_files_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public._sc_files_id_seq OWNER TO postgres; -- -- Name: _sc_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public._sc_files_id_seq OWNED BY public._sc_files.id; -- -- Name: _sc_migrations; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_migrations ( migration text NOT NULL ); ALTER TABLE public._sc_migrations OWNER TO postgres; -- -- Name: _sc_pages; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_pages ( id integer NOT NULL, name text NOT NULL, title text NOT NULL, description text NOT NULL, min_role integer NOT NULL, layout jsonb NOT NULL, fixed_states jsonb NOT NULL ); ALTER TABLE public._sc_pages OWNER TO postgres; -- -- Name: _sc_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public._sc_pages_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public._sc_pages_id_seq OWNER TO postgres; -- -- Name: _sc_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public._sc_pages_id_seq OWNED BY public._sc_pages.id; -- -- Name: _sc_plugins; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_plugins ( id integer NOT NULL, name character varying(128), source character varying(128), location character varying(128), version text DEFAULT 'latest'::text, configuration jsonb ); ALTER TABLE public._sc_plugins OWNER TO postgres; -- -- Name: _sc_plugins_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public._sc_plugins_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public._sc_plugins_id_seq OWNER TO postgres; -- -- Name: _sc_plugins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public._sc_plugins_id_seq OWNED BY public._sc_plugins.id; -- -- Name: _sc_roles; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_roles ( id integer NOT NULL, role character varying(50) ); ALTER TABLE public._sc_roles OWNER TO postgres; -- -- Name: _sc_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public._sc_roles_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public._sc_roles_id_seq OWNER TO postgres; -- -- Name: _sc_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public._sc_roles_id_seq OWNED BY public._sc_roles.id; -- -- Name: _sc_session; Type: TABLE; Schema: public; Owner: postgres -- CREATE UNLOGGED TABLE public._sc_session ( sid character varying NOT NULL, sess json NOT NULL, expire timestamp(6) without time zone NOT NULL ); ALTER TABLE public._sc_session OWNER TO postgres; -- -- Name: _sc_tables; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_tables ( id integer NOT NULL, name text NOT NULL, min_role_read integer DEFAULT 1 NOT NULL, min_role_write integer DEFAULT 1 NOT NULL, versioned boolean DEFAULT false NOT NULL ); ALTER TABLE public._sc_tables OWNER TO postgres; -- -- Name: _sc_tables_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public._sc_tables_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public._sc_tables_id_seq OWNER TO postgres; -- -- Name: _sc_tables_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public._sc_tables_id_seq OWNED BY public._sc_tables.id; -- -- Name: _sc_tenants; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_tenants ( subdomain text NOT NULL, email text NOT NULL ); ALTER TABLE public._sc_tenants OWNER TO postgres; -- -- Name: _sc_views; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public._sc_views ( id integer NOT NULL, viewtemplate text NOT NULL, name text NOT NULL, table_id integer, configuration jsonb NOT NULL, on_root_page boolean DEFAULT false NOT NULL, min_role integer DEFAULT 10 NOT NULL ); ALTER TABLE public._sc_views OWNER TO postgres; -- -- Name: _sc_views_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public._sc_views_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public._sc_views_id_seq OWNER TO postgres; -- -- Name: _sc_views_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public._sc_views_id_seq OWNED BY public._sc_views.id; -- -- Name: users; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public.users ( id integer NOT NULL, email character varying(128), password character varying(60), role_id integer NOT NULL, reset_password_token text, reset_password_expiry timestamp without time zone, language text, disabled boolean DEFAULT false NOT NULL ); ALTER TABLE public.users OWNER TO postgres; -- -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public.users_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.users_id_seq OWNER TO postgres; -- -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id; -- -- Name: _sc_errors id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_errors ALTER COLUMN id SET DEFAULT nextval('public._sc_errors_id_seq'::regclass); -- -- Name: _sc_fields id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_fields ALTER COLUMN id SET DEFAULT nextval('public._sc_fields_id_seq'::regclass); -- -- Name: _sc_files id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_files ALTER COLUMN id SET DEFAULT nextval('public._sc_files_id_seq'::regclass); -- -- Name: _sc_pages id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_pages ALTER COLUMN id SET DEFAULT nextval('public._sc_pages_id_seq'::regclass); -- -- Name: _sc_plugins id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_plugins ALTER COLUMN id SET DEFAULT nextval('public._sc_plugins_id_seq'::regclass); -- -- Name: _sc_roles id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_roles ALTER COLUMN id SET DEFAULT nextval('public._sc_roles_id_seq'::regclass); -- -- Name: _sc_tables id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_tables ALTER COLUMN id SET DEFAULT nextval('public._sc_tables_id_seq'::regclass); -- -- Name: _sc_views id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_views ALTER COLUMN id SET DEFAULT nextval('public._sc_views_id_seq'::regclass); -- -- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass); -- -- Data for Name: _sc_config; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_config (key, value) FROM stdin; \. -- -- Data for Name: _sc_errors; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_errors (id, stack, message, occur_at, tenant, user_id, url, headers, body) FROM stdin; \. -- -- Data for Name: _sc_fields; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_fields (id, table_id, name, label, type, reftable_name, attributes, required, is_unique, calculated, stored, expression) FROM stdin; \. -- -- Data for Name: _sc_files; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_files (id, filename, location, uploaded_at, size_kb, user_id, mime_super, mime_sub, min_role_read) FROM stdin; \. -- -- Data for Name: _sc_migrations; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_migrations (migration) FROM stdin; 202005141503 202005241712 202005251037 202005282134 202006022156 202006051507 202006240906 202007091707 202007202144 202008031500 202008051415 202008121149 202009112140 202009181655 202009221105 202009231331 202009301531 202010231444 \. -- -- Data for Name: _sc_pages; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_pages (id, name, title, description, min_role, layout, fixed_states) FROM stdin; \. -- -- Data for Name: _sc_plugins; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_plugins (id, name, source, location, version, configuration) FROM stdin; 1 base npm @saltcorn/base-plugin latest \N 2 sbadmin2 npm @saltcorn/sbadmin2 latest \N \. -- -- Data for Name: _sc_roles; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_roles (id, role) FROM stdin; 1 admin 10 public 8 user 4 staff \. -- -- Data for Name: _sc_session; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_session (sid, sess, expire) FROM stdin; \. -- -- Data for Name: _sc_tables; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_tables (id, name, min_role_read, min_role_write, versioned) FROM stdin; \. -- -- Data for Name: _sc_tenants; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_tenants (subdomain, email) FROM stdin; \. -- -- Data for Name: _sc_views; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public._sc_views (id, viewtemplate, name, table_id, configuration, on_root_page, min_role) FROM stdin; \. -- -- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public.users (id, email, password, role_id, reset_password_token, reset_password_expiry, language, disabled) FROM stdin; \. -- -- Name: _sc_errors_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public._sc_errors_id_seq', 1, false); -- -- Name: _sc_fields_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public._sc_fields_id_seq', 1, false); -- -- Name: _sc_files_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public._sc_files_id_seq', 1, false); -- -- Name: _sc_pages_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public._sc_pages_id_seq', 1, false); -- -- Name: _sc_plugins_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public._sc_plugins_id_seq', 2, true); -- -- Name: _sc_roles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public._sc_roles_id_seq', 1, false); -- -- Name: _sc_tables_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public._sc_tables_id_seq', 1, false); -- -- Name: _sc_views_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public._sc_views_id_seq', 1, false); -- -- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres -- SELECT pg_catalog.setval('public.users_id_seq', 1, false); -- -- Name: _sc_config _sc_config_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_config ADD CONSTRAINT _sc_config_pkey PRIMARY KEY (key); -- -- Name: _sc_errors _sc_errors_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_errors ADD CONSTRAINT _sc_errors_pkey PRIMARY KEY (id); -- -- Name: _sc_fields _sc_fields_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_fields ADD CONSTRAINT _sc_fields_pkey PRIMARY KEY (id); -- -- Name: _sc_files _sc_files_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_files ADD CONSTRAINT _sc_files_pkey PRIMARY KEY (id); -- -- Name: _sc_migrations _sc_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_migrations ADD CONSTRAINT _sc_migrations_pkey PRIMARY KEY (migration); -- -- Name: _sc_pages _sc_pages_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_pages ADD CONSTRAINT _sc_pages_pkey PRIMARY KEY (id); -- -- Name: _sc_plugins _sc_plugins_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_plugins ADD CONSTRAINT _sc_plugins_pkey PRIMARY KEY (id); -- -- Name: _sc_roles _sc_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_roles ADD CONSTRAINT _sc_roles_pkey PRIMARY KEY (id); -- -- Name: _sc_session _sc_session_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_session ADD CONSTRAINT _sc_session_pkey PRIMARY KEY (sid); -- -- Name: _sc_tables _sc_tables_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_tables ADD CONSTRAINT _sc_tables_name_key UNIQUE (name); -- -- Name: _sc_tables _sc_tables_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_tables ADD CONSTRAINT _sc_tables_pkey PRIMARY KEY (id); -- -- Name: _sc_tenants _sc_tenants_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_tenants ADD CONSTRAINT _sc_tenants_pkey PRIMARY KEY (subdomain); -- -- Name: _sc_views _sc_views_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_views ADD CONSTRAINT _sc_views_pkey PRIMARY KEY (id); -- -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public.users ADD CONSTRAINT users_pkey PRIMARY KEY (id); -- -- Name: users users_unique_email; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public.users ADD CONSTRAINT users_unique_email UNIQUE (email); -- -- Name: _sc_IDX_session_expire; Type: INDEX; Schema: public; Owner: postgres -- CREATE INDEX "_sc_IDX_session_expire" ON public._sc_session USING btree (expire); -- -- Name: _sc_idx_field_table; Type: INDEX; Schema: public; Owner: postgres -- CREATE INDEX _sc_idx_field_table ON public._sc_fields USING btree (table_id); -- -- Name: _sc_idx_table_name; Type: INDEX; Schema: public; Owner: postgres -- CREATE INDEX _sc_idx_table_name ON public._sc_tables USING btree (name); -- -- Name: _sc_idx_view_name; Type: INDEX; Schema: public; Owner: postgres -- CREATE INDEX _sc_idx_view_name ON public._sc_views USING btree (name); -- -- Name: _sc_fields _sc_fields_table_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_fields ADD CONSTRAINT _sc_fields_table_id_fkey FOREIGN KEY (table_id) REFERENCES public._sc_tables(id); -- -- Name: _sc_files _sc_files_min_role_read_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_files ADD CONSTRAINT _sc_files_min_role_read_fkey FOREIGN KEY (min_role_read) REFERENCES public._sc_roles(id); -- -- Name: _sc_files _sc_files_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_files ADD CONSTRAINT _sc_files_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id); -- -- Name: _sc_pages _sc_pages_min_role_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_pages ADD CONSTRAINT _sc_pages_min_role_fkey FOREIGN KEY (min_role) REFERENCES public._sc_roles(id); -- -- Name: _sc_tables _sc_tables_min_role_read_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_tables ADD CONSTRAINT _sc_tables_min_role_read_fkey FOREIGN KEY (min_role_read) REFERENCES public._sc_roles(id); -- -- Name: _sc_tables _sc_tables_min_role_write_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_tables ADD CONSTRAINT _sc_tables_min_role_write_fkey FOREIGN KEY (min_role_write) REFERENCES public._sc_roles(id); -- -- Name: _sc_views _sc_views_min_role_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_views ADD CONSTRAINT _sc_views_min_role_fkey FOREIGN KEY (min_role) REFERENCES public._sc_roles(id); -- -- Name: _sc_views _sc_views_table_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public._sc_views ADD CONSTRAINT _sc_views_table_id_fkey FOREIGN KEY (table_id) REFERENCES public._sc_tables(id); -- -- Name: users users_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public.users ADD CONSTRAINT users_role_id_fkey FOREIGN KEY (role_id) REFERENCES public._sc_roles(id); -- -- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres -- GRANT ALL ON SCHEMA public TO PUBLIC; -- -- PostgreSQL database dump complete --
the_stack
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com -- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions. -------------------------------------------------------------------------------- -- File name: exafriendly.sql (report non-exadata-friendly SQL and their stats) -- -- Purpose: This script is a collection of queries against ASH, which will -- report and drill down into workloads which don't use Exadata smart -- scanning and are doing buffered full table scans or random single -- block reads instead. It uses the 11g new ASH columns -- (SQL_PLAN_OPERATION, SQL_PLAN_OPTIONS) which give SQL plan line -- level activity breakdown. -- -- Note that this script is not a single SQL performance diagnosis tool, -- for looking into a single SQL, use the SQL Monitoring report. This -- exafriendly.sql script is aimed for giving you a high-level -- bird's-eye view of "exadata-friendiness" of your workloads, so you'd -- detect systemic problems and drill down where needed. -- -- Usage: @exafriendly.sql <ash_data_source> -- -- Examples: @exafriendly.sql gv$active_session_history -- -- @exafriendly.sql "dba_hist_active_sess_history WHERE snap_time > SYSDATE-1" -- -- Author: Tanel Poder ( http://blog.tanelpoder.com | tanel@tanelpoder.com ) -- -- Copyright: (c) 2012 All Rights Reserved -- -- -- Other: I strongly recommend you to read through the script to understand -- what it's doing and how the drilldown happens. You likely need -- to customize things (or at least adjust filters) when you diagnose -- stuff in your environment. -- -------------------------------------------------------------------------------- set timing on tab off verify off linesize 999 pagesize 5000 trimspool on trimout on null "" COL wait_class FOR A20 COL event FOR A40 COL plan_line FOR A40 COL command_name FOR A15 COL pct FOR 999.9 define ash=&1 SELECT MAX(sample_time) - MIN(sample_time) FROM &ash / PROMPT Report the top active SQL statements regardless of their CPU usage/wait event breakdown SELECT * FROM ( SELECT sql_id , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash WHERE session_type = 'FOREGROUND' GROUP BY sql_id ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report the top session state/wait class breakdown SELECT * FROM ( SELECT session_state,wait_class , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash GROUP BY session_state,wait_class ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report the top session state/wait event breakdown (just like TOP-5 Timed Events in AWR) SELECT * FROM ( SELECT session_state,wait_class,event , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash GROUP BY session_state,wait_class,event ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report the top SQL waiting for buffered single block reads SELECT * FROM ( SELECT session_state,wait_class,event,sql_id , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash WHERE session_state = 'WAITING' AND event = 'cell single block physical read' GROUP BY session_state,wait_class,event,sql_id ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report the top SQL waiting for buffered single block reads the most (with sampled execution count) SELECT * FROM ( SELECT sql_plan_operation||' '||sql_plan_options plan_line,event,sql_id , COUNT(DISTINCT(sql_exec_id)) noticed_executions , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash WHERE session_state = 'WAITING' AND event = 'cell single block physical read' GROUP BY sql_plan_operation||' '||sql_plan_options,event,sql_id ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report what kind of SQL execution plan operations, executed by which user wait for buffered single block reads the most SELECT * FROM ( SELECT sql_plan_operation||' '||sql_plan_options plan_line,u.username,event , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash a , dba_users u WHERE a.user_id = u.user_id AND session_state = 'WAITING' AND event = 'cell single block physical read' GROUP BY sql_plan_operation||' '||sql_plan_options,event,u.username ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report what kind of execution plan operations wait for buffered single block reads SELECT * FROM ( SELECT sql_plan_operation||' '||sql_plan_options plan_line,event , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash WHERE session_state = 'WAITING' AND event = 'cell single block physical read' GROUP BY sql_plan_operation||' '||sql_plan_options,event ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report what kind of execution plan operations wait for buffered single block reads - against which schemas SELECT * FROM ( SELECT sql_plan_operation||' '||sql_plan_options plan_line,p.object_owner,event , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM v$active_session_history a , v$sql_plan p WHERE a.sql_id = p.sql_id AND a.sql_child_number = p.child_number AND a.sql_plan_line_id = p.id AND session_state = 'WAITING' AND event = 'cell single block physical read' GROUP BY sql_plan_operation||' '||sql_plan_options,p.object_owner,event ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report what kind of execution plan operations wait for buffered single block reads - against which objects SELECT * FROM ( SELECT sql_plan_operation||' '||sql_plan_options plan_line,p.object_owner,p.object_name,event , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM v$active_session_history a , v$sql_plan p WHERE a.sql_id = p.sql_id AND a.sql_child_number = p.child_number AND a.sql_plan_line_id = p.id AND session_state = 'WAITING' AND event = 'cell single block physical read' GROUP BY sql_plan_operation||' '||sql_plan_options,p.object_owner,p.object_name,event ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report which SQL command type consumes the most time (broken down by wait class) SELECT * FROM ( SELECT command_name,session_state,wait_class , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash, v$sqlcommand WHERE &ash..sql_opcode = v$sqlcommand.command_type GROUP BY command_name,session_state,wait_class ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report what kind of execution plan operations wait for buffered multiblock reads the most SELECT * FROM ( SELECT sql_plan_operation||' '||sql_plan_options plan_line,event , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash WHERE session_state = 'WAITING' AND event = 'cell multiblock physical read' GROUP BY sql_plan_operation||' '||sql_plan_options,event ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report what kind of execution plan operations wait for buffered multiblock reads - against which objects SELECT * FROM ( SELECT sql_plan_operation||' '||sql_plan_options plan_line,p.object_owner,p.object_name,event , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM v$active_session_history a , v$sql_plan p WHERE a.sql_id = p.sql_id AND a.sql_child_number = p.child_number AND a.sql_plan_line_id = p.id AND session_state = 'WAITING' AND event = 'cell multiblock physical read' GROUP BY sql_plan_operation||' '||sql_plan_options,p.object_owner,p.object_name,event ORDER BY seconds DESC ) WHERE rownum <= 10 / PROMPT Report any PARALLEL full table scans which use buffered reads (in-memory PX) SELECT * FROM ( SELECT sql_id , sql_plan_operation||' '||sql_plan_options plan_line , CASE WHEN qc_session_id IS NULL THEN 'SERIAL' ELSE 'PARALLEL' END is_parallel -- , px_flags , session_state , wait_class , event , COUNT(*) , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash WHERE sql_plan_operation = 'TABLE ACCESS' AND sql_plan_options = 'STORAGE FULL' AND session_state = 'WAITING' AND event IN ('cell single block physical read', 'cell multiblock physical read', 'cell list of blocks physical read') AND qc_session_id IS NOT NULL -- is a px session GROUP BY sql_id , sql_plan_operation||' '||sql_plan_options , CASE WHEN qc_session_id IS NULL THEN 'SERIAL' ELSE 'PARALLEL' END --is_parallel -- , px_flags , session_state , wait_class , event ORDER BY COUNT(*) DESC ) WHERE rownum <= 20 / DEF sqlid=4mpjt2rhwd1p4 PROMPT Report a single SQL_ID &sqlid SELECT * FROM ( SELECT sql_plan_operation||' '||sql_plan_options plan_line,session_state,event , SUM(1) seconds , ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1) pct FROM &ash WHERE sql_id = '&sqlid' GROUP BY sql_plan_operation||' '||sql_plan_options,session_state,event ORDER BY seconds DESC ) WHERE rownum <= 10 /
the_stack
-- alter session set current_schema = XDBPM / create or replace view DATABASE_SUMMARY as select d.NAME, p.VALUE "SERVICE_NAME", i.HOST_NAME, n.VALUE "DB_CHARACTERSET" from v$system_parameter p, v$database d, v$instance i, nls_database_parameters n where p.name = 'service_names' and n.parameter='NLS_CHARACTERSET'; / show errors -- create or replace package XDBPM_CONFIGURATION AUTHID CURRENT_USER as function getDatabaseSummary return XMLType; procedure folderDatabaseSummary; procedure addSchemaMapping(P_NAMESPACE VARCHAR2, P_ROOT_ELEMENT VARCHAR2, P_SCHEMA_URL VARCHAR2); procedure addMimeMapping(P_EXTENSION VARCHAR2, P_MAPPING VARCHAR2); procedure registerXMLExtension(P_EXTENSION VARCHAR2); procedure addServletMapping( P_PATTERN VARCHAR2, P_SERVLET_NAME VARCHAR2, P_DISP_NAME VARCHAR2, P_SERVLET_CLASS VARCHAR2, P_SERVLET_SCHEMA VARCHAR2, P_LANGUAGE VARCHAR2 DEFAULT 'Java', P_DESCRIPTION VARCHAR2 DEFAULT '', P_SECURITY_ROLE XMLType DEFAULT NULL ); procedure deleteservletMapping(P_SERVLET_NAME VARCHAR2); procedure setAnonymousAccess(P_STATE VARCHAR2); end XDBPM_CONFIGURATION; / show errors -- create or replace synonym XDB_CONFIGURATION for XDBPM_CONFIGURATION / grant execute on XDBPM_CONFIGURATION to public / create or replace view DATABASE_SUMMARY_XML of XMLType with object id ( 'DATABASE_SUMMARY' ) as select XDBPM_CONFIGURATION.getDatabaseSummary() from dual / create or replace trigger NO_DML_DATABASE_SUMMARY_XML instead of insert or update or delete on DATABASE_SUMMARY_XML begin null; end; / grant select on DATABASE_SUMMARY_XML to public / create or replace package body XDBPM_CONFIGURATION as -- function getDatabaseSummary return XMLType as V_SUMMARY XMLType; V_DUMMY XMLType; begin select DBMS_XDB.cfg_get() into V_DUMMY from dual; select xmlElement ( "Database", XMLAttributes ( x.NAME as "Name", extractValue(config,'/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port') as "HTTP", extractValue(config,'/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port') as "FTP" ), xmlElement ( "Services", ( xmlForest(SERVICE_NAME as "ServiceName") ) ), xmlElement ( "NLS", ( XMLForest(DB_CHARACTERSET as "DatabaseCharacterSet") ) ), xmlElement ( "Hosts", ( XMLForest(HOST_NAME as "HostName") ) ), xmlElement ( "VersionInformation", ( XMLCONCAT ( (select XMLAGG(XMLElement ( "ProductVersion", BANNER ) )from V$VERSION), (select XMLAGG(XMLElement ( "ProductVersion", BANNER ) ) from ALL_REGISTRY_BANNERS) ) ) ) ) into V_SUMMARY from DATABASE_SUMMARY x, (select DBMS_XDB.cfg_get() config from dual); V_SUMMARY := XMLType(V_SUMMARY.getClobVal()); return V_SUMMARY; end; -- procedure folderDatabaseSummary as resource_not_found exception; PRAGMA EXCEPTION_INIT( resource_not_found , -31001 ); V_TARGET_RESOURCE VARCHAR2(256) := '/sys/databaseSummary.xml'; V_RESULT boolean; V_XMLREF ref XMLType; begin begin DBMS_XDB.deleteResource(V_TARGET_RESOURCE,DBMS_XDB.DELETE_FORCE); exception when resource_not_found then null; end; select make_ref(XDBPM.DATABASE_SUMMARY_XML,'DATABASE_SUMMARY') into V_XMLREF from dual; V_RESULT := DBMS_XDB.createResource(V_TARGET_RESOURCE,V_XMLREF); DBMS_XDB.setAcl(V_TARGET_RESOURCE,'/sys/acls/bootstrap_acl.xml'); end; -- procedure addServletMapping( P_PATTERN VARCHAR2, P_SERVLET_NAME VARCHAR2, P_DISP_NAME VARCHAR2, P_SERVLET_CLASS VARCHAR2, P_SERVLET_SCHEMA VARCHAR2, P_LANGUAGE VARCHAR2 DEFAULT 'Java', P_DESCRIPTION VARCHAR2 DEFAULT '', P_SECURITY_ROLE XMLType DEFAULT NULL ) as V_XDB_CONFIG XMLType; begin V_XDB_CONFIG := DBMS_XDB.cfg_get(); select deleteXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet[servlet-name="' || P_SERVLET_NAME || '"]' ) into V_XDB_CONFIG from dual; if (P_LANGUAGE = 'C') then select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list', 'servlet', xmlElement ( "servlet", xmlAttributes('http://xmlns.oracle.com/xdb/xdbconfig.xsd' as "xmlns"), xmlForest ( P_SERVLET_NAME as "servlet-name", P_LANGUAGE as "servlet-language", P_DISP_NAME as "display-name", P_DESCRIPTION as "description" ), P_SECURITY_ROLE ) ) into V_XDB_CONFIG from dual; else select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list', 'servlet', xmlElement ( "servlet", xmlAttributes('http://xmlns.oracle.com/xdb/xdbconfig.xsd' as "xmlns"), xmlForest ( P_SERVLET_NAME as "servlet-name", P_LANGUAGE as "servlet-language", P_DISP_NAME as "display-name", P_DESCRIPTION as "description", P_SERVLET_CLASS as "servlet-class", P_SERVLET_SCHEMA as "servlet-schema" ), P_SECURITY_ROLE ) ) into V_XDB_CONFIG from dual; end if; select deleteXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings/servlet-mapping[servlet-name="' || P_SERVLET_NAME || '"]' ) into V_XDB_CONFIG from dual; select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings', 'servlet-mapping', XMLType ( '<servlet-mapping xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"> <servlet-pattern>'||P_PATTERN||'</servlet-pattern> <servlet-name>'||P_SERVLET_NAME||'</servlet-name> </servlet-mapping>' ) ) into V_XDB_CONFIG from dual; DBMS_XDB.cfg_update(V_XDB_CONFIG); end; -- procedure deleteservletMapping (P_SERVLET_NAME VARCHAR2) as V_XDB_CONFIG XMLType; begin V_XDB_CONFIG := DBMS_XDB.cfg_get(); select deleteXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet[servlet-name="' || P_SERVLET_NAME || '"]' ) into V_XDB_CONFIG from dual; select deleteXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings/servlet-mapping[servlet-name="' || P_SERVLET_NAME || '"]' ) into V_XDB_CONFIG from dual; DBMS_XDB.cfg_update(V_XDB_CONFIG); end; -- procedure addSchemaMapping(P_NAMESPACE VARCHAR2, P_ROOT_ELEMENT VARCHAR2, P_SCHEMA_URL VARCHAR2) is V_XDB_CONFIG XMLType; begin V_XDB_CONFIG := DBMS_XDB.cfg_get(); if (V_XDB_CONFIG.existsNode('/xdbconfig/sysconfig/schemaLocation-mappings','xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"') = 0) then select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig', 'schemaLocation-mappings', XMLType('<schemaLocation-mappings xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"/>'), 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; end if; if (V_XDB_CONFIG.existsNode('/xdbconfig/sysconfig/schemaLocation-mappings/schemaLocation-mapping[namespace="'|| P_NAMESPACE ||'" and element="'|| P_ROOT_ELEMENT ||'"]','xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"') = 0) then select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/schemaLocation-mappings', 'schemaLocation-mapping', XMLType('<schemaLocation-mapping xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"><namespace>' || P_NAMESPACE || '</namespace><element>' || P_ROOT_ELEMENT || '</element><schemaURL>'|| P_SCHEMA_URL ||'</schemaURL></schemaLocation-mapping>'), 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; else select updateXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/schemaLocation-mappings/schemaLocation-mapping[namespace="'|| P_NAMESPACE ||'" and element="'|| P_ROOT_ELEMENT ||'"]/schemaURL/text()', P_SCHEMA_URL, 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; end if; DBMS_XDB.cfg_update(V_XDB_CONFIG); end; -- procedure addMimeMapping(P_EXTENSION VARCHAR2, P_MAPPING VARCHAR2) is V_XDB_CONFIG XMLType; begin V_XDB_CONFIG := DBMS_XDB.cfg_get(); if (V_XDB_CONFIG.existsNode('/xdbconfig/sysconfig/protocolconfig/common/extension-mappings/mime-mappings/mime-mapping[extension="' || P_EXTENSION || '"]','xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"') = 0) then select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/common/extension-mappings/mime-mappings', 'mime-mapping', XMLType('<mime-mapping xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"> <extension>' || P_EXTENSION || '</extension> <mime-type>' || P_MAPPING || '</mime-type> </mime-mapping>'), 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; else select updateXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/common/extension-mappings/mime-mappings/mime-mapping[extension="' || P_EXTENSION || '"]/mime-type/text()', P_MAPPING, 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; end if; DBMS_XDB.cfg_update(V_XDB_CONFIG); end; -- procedure registerXMLExtension(P_EXTENSION VARCHAR2) is V_XDB_CONFIG XMLType; begin V_XDB_CONFIG := DBMS_XDB.cfg_get(); if (V_XDB_CONFIG.existsNode('/xdbconfig/sysconfig/protocolconfig/common/extension-mappings/xml-extensions','xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"') = 0) then select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/common/extension-mappings', 'xml-extensions', XMLType('<xml-extensions xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"/>'), 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; end if; if (V_XDB_CONFIG.existsNode('/xdbconfig/sysconfig/protocolconfig/common/extension-mappings/xml-extensions[extension="' || P_EXTENSION || '"]','xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"') = 0) then select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/common/extension-mappings/xml-extensions', 'extension', XMLType('<extension xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">' || P_EXTENSION || '</extension>'), 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; end if; DBMS_XDB.cfg_update(V_XDB_CONFIG); end; -- procedure setAnonymousAccess(P_STATE VARCHAR2) is V_XDB_CONFIG XMLType; begin V_XDB_CONFIG := DBMS_XDB.cfg_get(); if (V_XDB_CONFIG.existsNode('/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access') = 0) then select insertChildXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig', 'allow-repository-anonymous-access', XMLType('<allow-repository-anonymous-access xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">' || lower(P_STATE) || '</allow-repository-anonymous-access>'), 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; else select updateXML ( V_XDB_CONFIG, '/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access/text()', lower(P_STATE), 'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"' ) into V_XDB_CONFIG from dual; end if; DBMS_XDB.cfg_update(V_XDB_CONFIG); end; -- end XDBPM_CONFIGURATION; / show errors -- call XDBPM_CONFIGURATION.folderDatabaseSummary() / set echo on set pages 100 set long 10000 -- select xdburitype('/sys/databaseSummary.xml').getXML() from dual / -- alter session set current_schema = SYS /
the_stack
-- Regression tests for UPDATE/DELETE single row operations. -- -- Test that single-row UPDATE/DELETEs bypass scan. -- CREATE TABLE single_row (k int primary key, v1 int, v2 int); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k = 1 RETURNING k; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k IN (1); -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k = 1 and v1 = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE v1 = 1 and v2 = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k = 1 RETURNING v1; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k > 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k != 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k IN (1, 2); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k = 1 RETURNING k, v1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1, v2 = 1 + 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1, v2 = 2 WHERE k = 1 RETURNING k, v1, v2; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1, v2 = 2 WHERE k = 1 RETURNING *; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = v1 + 1, v2 = 2 WHERE k = 1 RETURNING v2; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k IN (1); EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 3 + 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = power(2, 3 - 1) WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = v1 + 3 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = v1 * 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k = 1 RETURNING v2; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = v1 + 1 WHERE k = 1 RETURNING v1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k = 1 RETURNING *; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = v1 + v2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = v2 + 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1, v2 = v1 + v2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = v2 + 1, v2 = 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k = 1 and v2 = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k > 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k != 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k IN (1, 2); EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = power(2, 3 - k) WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 1 WHERE k % 2 = 0; -- -- Test single-row UPDATE/DELETE execution. -- INSERT INTO single_row VALUES (1, 1, 1); UPDATE single_row SET v1 = 2 WHERE k = 1; SELECT * FROM single_row; UPDATE single_row SET v1 = v1 * 2 WHERE k = 1; SELECT * FROM single_row; DELETE FROM single_row WHERE k = 1; SELECT * FROM single_row; -- -- Test UPDATE/DELETEs of non-existent data return no rows. -- UPDATE single_row SET v1 = 1 WHERE k = 100 RETURNING k; DELETE FROM single_row WHERE k = 100 RETURNING k; SELECT * FROM single_row; -- -- Test prepared statements. -- INSERT INTO single_row VALUES (1, 1, 1); PREPARE single_row_update (int, int, int) AS UPDATE single_row SET v1 = $2, v2 = $3 WHERE k = $1; PREPARE single_row_delete (int) AS DELETE FROM single_row WHERE k = $1; EXPLAIN (COSTS FALSE) EXECUTE single_row_update (1, 2, 2); EXECUTE single_row_update (1, 2, 2); SELECT * FROM single_row; EXPLAIN (COSTS FALSE) EXECUTE single_row_delete (1); EXECUTE single_row_delete (1); SELECT * FROM single_row; -- -- Test returning clauses. -- INSERT INTO single_row VALUES (1, 1, 1); UPDATE single_row SET v1 = 2, v2 = 2 WHERE k = 1 RETURNING v1, v2, k; SELECT * FROM single_row; UPDATE single_row SET v1 = 3, v2 = 3 WHERE k = 1 RETURNING *; SELECT * FROM single_row; UPDATE single_row SET v1 = v1 + 1 WHERE k = 1 RETURNING v1; SELECT * FROM single_row; UPDATE single_row SET v1 = v1 + 1, v2 = 4 WHERE k = 1 RETURNING v2; SELECT * FROM single_row; DELETE FROM single_row WHERE k = 1 RETURNING k; SELECT * FROM single_row; --- --- Test in transaction block. --- INSERT INTO single_row VALUES (1, 1, 1); BEGIN; EXPLAIN (COSTS FALSE) DELETE FROM single_row WHERE k = 1; DELETE FROM single_row WHERE k = 1; END; SELECT * FROM single_row; -- Test UPDATE/DELETE of non-existing rows. BEGIN; DELETE FROM single_row WHERE k = 1; UPDATE single_row SET v1 = 2 WHERE k = 1; END; SELECT * FROM single_row; --- --- Test WITH clause. --- INSERT INTO single_row VALUES (1, 1, 1); EXPLAIN (COSTS FALSE) WITH temp AS (UPDATE single_row SET v1 = 2 WHERE k = 1) UPDATE single_row SET v1 = 2 WHERE k = 1; WITH temp AS (UPDATE single_row SET v1 = 2 WHERE k = 1) UPDATE single_row SET v1 = 2 WHERE k = 1; SELECT * FROM single_row; -- Update row that doesn't exist. WITH temp AS (UPDATE single_row SET v1 = 2 WHERE k = 2) UPDATE single_row SET v1 = 2 WHERE k = 2; SELECT * FROM single_row; -- Adding secondary index should force re-planning, which would -- then not choose single-row plan due to the secondary index. EXPLAIN (COSTS FALSE) EXECUTE single_row_delete (1); CREATE INDEX single_row_index ON single_row (v1); EXPLAIN (COSTS FALSE) EXECUTE single_row_delete (1); DROP INDEX single_row_index; -- Same as above but for UPDATE. EXPLAIN (COSTS FALSE) EXECUTE single_row_update (1, 1, 1); CREATE INDEX single_row_index ON single_row (v1); EXPLAIN (COSTS FALSE) EXECUTE single_row_update (1, 1, 1); DROP INDEX single_row_index; -- Adding BEFORE DELETE row triggers should do the same as secondary index. EXPLAIN (COSTS FALSE) EXECUTE single_row_delete (1); CREATE TRIGGER single_row_delete_trigger BEFORE DELETE ON single_row FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); EXPLAIN (COSTS FALSE) EXECUTE single_row_delete (1); -- UPDATE should still use single-row since trigger does not apply to it. EXPLAIN (COSTS FALSE) EXECUTE single_row_update (1, 1, 1); DROP TRIGGER single_row_delete_trigger ON single_row; -- Adding BEFORE UPDATE row triggers should do the same as secondary index. EXPLAIN (COSTS FALSE) EXECUTE single_row_update (1, 1, 1); CREATE TRIGGER single_row_update_trigger BEFORE UPDATE ON single_row FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); EXPLAIN (COSTS FALSE) EXECUTE single_row_update (1, 1, 1); -- DELETE should still use single-row since trigger does not apply to it. EXPLAIN (COSTS FALSE) EXECUTE single_row_delete (1); DROP TRIGGER single_row_update_trigger ON single_row; -- -- Test table with composite primary key. -- CREATE TABLE single_row_comp_key (v int, k1 int, k2 int, PRIMARY KEY (k1 HASH, k2 ASC)); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key WHERE k1 = 1 and k2 = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key WHERE k1 = 1 and k2 = 1 RETURNING k1, k2; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key; EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key WHERE k1 = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key WHERE k2 = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key WHERE v = 1 and k1 = 1 and k2 = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key WHERE k1 = 1 and k2 = 1 RETURNING v; EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key WHERE k1 = 1 AND k2 < 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_comp_key WHERE k1 = 1 AND k2 != 1; -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_comp_key SET v = 1 WHERE k1 = 1 and k2 = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_comp_key SET v = 1 WHERE k1 = 1 and k2 = 1 RETURNING k1, k2, v; EXPLAIN (COSTS FALSE) UPDATE single_row_comp_key SET v = 1 + 2 WHERE k1 = 1 and k2 = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_comp_key SET v = v + 1 WHERE k1 = 1 and k2 = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 3 - 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = ceil(3 - 2.5) WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 3 - v1 WHERE k = 1; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_comp_key SET v = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_comp_key SET v = k1 + 1 WHERE k1 = 1 and k2 = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_comp_key SET v = 1 WHERE k1 = 1 and k2 = 1 and v = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = 3 - k WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = v1 - k WHERE k = 1; -- Random is not a stable function so it should NOT USE single-row. -- TODO However it technically does not read/write data so later on it could be allowed. EXPLAIN (COSTS FALSE) UPDATE single_row SET v1 = ceil(random()) WHERE k = 1; -- Test execution. INSERT INTO single_row_comp_key VALUES (1, 2, 3); UPDATE single_row_comp_key SET v = 2 WHERE k1 = 2 and k2 = 3; SELECT * FROM single_row_comp_key; -- try switching around the order, reversing value/key DELETE FROM single_row_comp_key WHERE 2 = k2 and 3 = k1; SELECT * FROM single_row_comp_key; DELETE FROM single_row_comp_key WHERE 3 = k2 and 2 = k1; SELECT * FROM single_row_comp_key; -- -- Test table with non-standard const type. -- CREATE TABLE single_row_complex (k bigint PRIMARY KEY, v float); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_complex WHERE k = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_complex WHERE k = 1 RETURNING k; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_complex; EXPLAIN (COSTS FALSE) DELETE FROM single_row_complex WHERE k = 1 and v = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_complex WHERE v = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_complex WHERE k = 1 RETURNING v; -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_complex SET v = 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_complex SET v = 1 WHERE k = 1 RETURNING k, v; EXPLAIN (COSTS FALSE) UPDATE single_row_complex SET v = 1 + 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_complex SET v = v + 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_complex SET v = 3 * (v + 3 - 2) WHERE k = 1; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_complex SET v = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_complex SET v = k + 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_complex SET v = 1 WHERE k = 1 and v = 1; -- Test execution. INSERT INTO single_row_complex VALUES (1, 1); UPDATE single_row_complex SET v = 2 WHERE k = 1; SELECT * FROM single_row_complex; UPDATE single_row_complex SET v = 3 * (v + 3 - 2) WHERE k = 1; SELECT * FROM single_row_complex; DELETE FROM single_row_complex WHERE k = 1; SELECT * FROM single_row_complex; -- -- Test table with non-const type. -- CREATE TABLE single_row_array (k int primary key, arr int []); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_array WHERE k = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_array WHERE k = 1 RETURNING k; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_array; EXPLAIN (COSTS FALSE) DELETE FROM single_row_array WHERE k = 1 and arr[1] = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_array WHERE arr[1] = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_array WHERE k = 1 RETURNING arr; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_array SET arr[1] = 1 WHERE k = 1; -- Test execution. INSERT INTO single_row_array VALUES (1, ARRAY [1, 2, 3]); DELETE FROM single_row_array WHERE k = 1; SELECT * FROM single_row_array; -- -- Test update with complex returning clause expressions -- CREATE TYPE two_int AS (first integer, second integer); CREATE TYPE two_text AS (first_text text, second_text text); CREATE TABLE single_row_complex_returning (k int primary key, v1 int, v2 text, v3 two_text, array_int int[], v5 int); CREATE FUNCTION assign_one_plus_param_to_v1(integer) RETURNS integer AS 'UPDATE single_row_complex_returning SET v1 = $1 + 1 WHERE k = 1 RETURNING $1 * 2;' LANGUAGE SQL; CREATE FUNCTION assign_one_plus_param_to_v1_hard(integer) RETURNS two_int AS 'UPDATE single_row_complex_returning SET v1 = $1 + 1 WHERE k = 1 RETURNING $1 * 2, v5 + 1;' LANGUAGE SQL; -- Below statements should all USE single-row. -- (1) Constant EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING 1; -- (2) Column reference EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING v2, v3, array_int; -- (3) Subscript EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING array_int[1]; -- (4) Field selection EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING (v3).first_text; -- (5) Immutable Operator Invocation EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING v2||'abc'; -- (6) Immutable Function Call EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING power(v5, 2); -- (7) Type Cast EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING v5::text; -- (8) Collation Expression EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING v2 COLLATE "C"; -- (9) Array Constructor EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING ARRAY[[v1,2,v5], [2,3,v5+1]]; -- (10) Row Constructor EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING ROW(1,v2,v3,v5); -- Below statements should all NOT USE single-row. -- (1) Scalar Subquery EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING (SELECT MAX(v5)+1 from single_row_complex_returning); -- (2) Mutable function EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING assign_one_plus_param_to_v1(1); EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING assign_one_plus_param_to_v1(v1); EXPLAIN (COSTS FALSE) UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING assign_one_plus_param_to_v1_hard(v1); -- Test execution INSERT INTO single_row_complex_returning VALUES (1, 1, 'xyz', ('a','b'), '{11, 11, 11}', 1); UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING 1, v2, array_int[1], (v3).first_text; SELECT * FROM single_row_complex_returning; UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING v2||'abc', power(v5, 2), v5::text, v2 COLLATE "C"; SELECT * FROM single_row_complex_returning; UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING ARRAY[[v1,2,v5], [2,3,v5+1]]; SELECT * FROM single_row_complex_returning; UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING ROW(1,v2,v3,v5); SELECT * FROM single_row_complex_returning; UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING (SELECT MAX(v5)+1 from single_row_complex_returning); SELECT * FROM single_row_complex_returning; UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING assign_one_plus_param_to_v1(1); SELECT * FROM single_row_complex_returning; UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING assign_one_plus_param_to_v1(v1); SELECT * FROM single_row_complex_returning; UPDATE single_row_complex_returning SET v1 = v1 + 1 WHERE k = 1 RETURNING assign_one_plus_param_to_v1_hard(v1); SELECT * FROM single_row_complex_returning; -- -- Test table without a primary key. -- CREATE TABLE single_row_no_primary_key (a int, b int); -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_no_primary_key; EXPLAIN (COSTS FALSE) DELETE FROM single_row_no_primary_key WHERE a = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_no_primary_key WHERE a = 1 and b = 1; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_no_primary_key SET a = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_no_primary_key SET b = 1 WHERE a = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_no_primary_key SET b = 1 WHERE b = 1; -- -- Test table with range primary key (ASC). -- CREATE TABLE single_row_range_asc_primary_key (k int, v int, primary key (k ASC)); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_range_asc_primary_key WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_asc_primary_key SET v = 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_asc_primary_key SET v = 1 + 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_asc_primary_key SET v = ceil(2.5 + power(2,2)) WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_range_asc_primary_key SET v = v + 1 WHERE k = 1; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_range_asc_primary_key SET v = 1 WHERE k > 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_asc_primary_key SET v = 1 WHERE k != 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_asc_primary_key SET v = v + k WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_asc_primary_key SET v = abs(5 - k) WHERE k = 1; -- Test execution INSERT INTO single_row_range_asc_primary_key(k,v) values (1,1), (2,2), (3,3), (4,4); UPDATE single_row_range_asc_primary_key SET v = 10 WHERE k = 1; SELECT * FROM single_row_range_asc_primary_key; UPDATE single_row_range_asc_primary_key SET v = v + 1 WHERE k = 2; SELECT * FROM single_row_range_asc_primary_key; UPDATE single_row_range_asc_primary_key SET v = -3 WHERE k < 4 AND k >= 3; SELECT * FROM single_row_range_asc_primary_key; UPDATE single_row_range_asc_primary_key SET v = ceil(2.5 + power(2,2)) WHERE k = 4; SELECT * FROM single_row_range_asc_primary_key; DELETE FROM single_row_range_asc_primary_key WHERE k < 3; SELECT * FROM single_row_range_asc_primary_key; DELETE FROM single_row_range_asc_primary_key WHERE k = 4; SELECT * FROM single_row_range_asc_primary_key; -- -- Test table with range primary key (DESC). -- CREATE TABLE single_row_range_desc_primary_key (k int, v int, primary key (k DESC)); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_range_desc_primary_key WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_desc_primary_key SET v = 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_desc_primary_key SET v = 1 + 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_desc_primary_key SET v = ceil(2.5 + power(2,2)) WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_range_desc_primary_key SET v = v + 1 WHERE k = 1; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_range_desc_primary_key SET v = 1 WHERE k > 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_desc_primary_key SET v = 1 WHERE k != 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_desc_primary_key SET v = k + 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_range_desc_primary_key SET v = abs(5 - k) WHERE k = 1; -- Test execution INSERT INTO single_row_range_desc_primary_key(k,v) values (1,1), (2,2), (3,3), (4,4); UPDATE single_row_range_desc_primary_key SET v = 10 WHERE k = 1; SELECT * FROM single_row_range_desc_primary_key; UPDATE single_row_range_desc_primary_key SET v = v + 1 WHERE k = 2; SELECT * FROM single_row_range_desc_primary_key; UPDATE single_row_range_desc_primary_key SET v = -3 WHERE k < 4 AND k >= 3; SELECT * FROM single_row_range_desc_primary_key; UPDATE single_row_range_desc_primary_key SET v = ceil(2.5 + power(2,2)) WHERE k = 4; SELECT * FROM single_row_range_desc_primary_key; DELETE FROM single_row_range_desc_primary_key WHERE k < 3; SELECT * FROM single_row_range_desc_primary_key; DELETE FROM single_row_range_desc_primary_key WHERE k = 4; SELECT * FROM single_row_range_desc_primary_key; -- -- Test tables with constraints. -- CREATE TABLE single_row_not_null_constraints (k int PRIMARY KEY, v1 int NOT NULL, v2 int NOT NULL); CREATE TABLE single_row_check_constraints (k int PRIMARY KEY, v1 int NOT NULL, v2 int CHECK (v2 >= 0)); CREATE TABLE single_row_check_constraints2 (k int PRIMARY KEY, v1 int NOT NULL, v2 int CHECK (v1 >= v2)); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) DELETE FROM single_row_not_null_constraints WHERE k = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_check_constraints WHERE k = 1; EXPLAIN (COSTS FALSE) DELETE FROM single_row_check_constraints2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_not_null_constraints SET v1 = 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_not_null_constraints SET v2 = 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_not_null_constraints SET v2 = v2 + 3 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_not_null_constraints SET v1 = abs(v1), v2 = power(v2,2) WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_not_null_constraints SET v2 = v2 + null WHERE k = 1; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_check_constraints SET v1 = 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_check_constraints SET v2 = 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_check_constraints2 SET v1 = 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_check_constraints2 SET v2 = 2 WHERE k = 1; -- Test execution. INSERT INTO single_row_not_null_constraints(k,v1, v2) values (1,1,1), (2,2,2), (3,3,3); UPDATE single_row_not_null_constraints SET v1 = 2 WHERE k = 1; UPDATE single_row_not_null_constraints SET v2 = v2 + 3 WHERE k = 1; DELETE FROM single_row_not_null_constraints where k = 3; SELECT * FROM single_row_not_null_constraints ORDER BY k; UPDATE single_row_not_null_constraints SET v1 = abs(v1), v2 = power(v2,2) WHERE k = 1; SELECT * FROM single_row_not_null_constraints ORDER BY k; -- Should fail constraint check. UPDATE single_row_not_null_constraints SET v2 = v2 + null WHERE k = 1; -- Should update 0 rows (non-existent key). UPDATE single_row_not_null_constraints SET v2 = v2 + 2 WHERE k = 4; SELECT * FROM single_row_not_null_constraints ORDER BY k; INSERT INTO single_row_check_constraints(k,v1, v2) values (1,1,1), (2,2,2), (3,3,3); UPDATE single_row_check_constraints SET v1 = 2 WHERE k = 1; UPDATE single_row_check_constraints SET v2 = 3 WHERE k = 1; UPDATE single_row_check_constraints SET v2 = -3 WHERE k = 1; DELETE FROM single_row_check_constraints where k = 3; SELECT * FROM single_row_check_constraints ORDER BY k; INSERT INTO single_row_check_constraints2(k,v1, v2) values (1,1,1), (2,2,2), (3,3,3); UPDATE single_row_check_constraints2 SET v1 = 2 WHERE k = 1; UPDATE single_row_check_constraints2 SET v2 = 3 WHERE k = 1; UPDATE single_row_check_constraints2 SET v2 = 1 WHERE k = 1; DELETE FROM single_row_check_constraints2 where k = 3; SELECT * FROM single_row_check_constraints2 ORDER BY k; -- -- Test table with decimal. -- CREATE TABLE single_row_decimal (k int PRIMARY KEY, v1 decimal, v2 decimal(10,2), v3 int); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v1 = 1.555 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v1 = v1 + 1.555 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v2 = 1.555 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v2 = v2 + 1.555 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v3 = 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v3 = v3 + 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v1 = v1 + 1.555, v2 = v2 + 1.555, v3 = v3 + 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v1 = v1 + null WHERE k = 2; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v2 = null + v2 WHERE k = 2; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v3 = v3 + 4 * (null - 5) WHERE k = 2; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v1 = v2 + 1.555 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v2 = k + 1.555 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v3 = k - v3 WHERE k = 1; -- Test execution. INSERT INTO single_row_decimal(k, v1, v2, v3) values (1,1.5,1.5,1), (2,2.5,2.5,2), (3,null, null,null); SELECT * FROM single_row_decimal ORDER BY k; UPDATE single_row_decimal SET v1 = v1 + 1.555, v2 = v2 + 1.555, v3 = v3 + 1 WHERE k = 1; -- v2 should be rounded to 2 decimals. SELECT * FROM single_row_decimal ORDER BY k; -- Test null arguments, all expressions should evaluate to null. UPDATE single_row_decimal SET v1 = v1 + null WHERE k = 2; UPDATE single_row_decimal SET v2 = null + v2 WHERE k = 2; UPDATE single_row_decimal SET v3 = v3 + 4 * (null - 5) WHERE k = 2; SELECT * FROM single_row_decimal ORDER BY k; -- Test null values, all expressions should evaluate to null. UPDATE single_row_decimal SET v1 = v1 + 1.555 WHERE k = 3; UPDATE single_row_decimal SET v2 = v2 + 1.555 WHERE k = 3; UPDATE single_row_decimal SET v3 = v3 + 1 WHERE k = 3; SELECT * FROM single_row_decimal ORDER BY k; -- -- Test table with foreign key constraint. -- Should still try single-row if (and only if) the FK column is not updated. -- CREATE TABLE single_row_decimal_fk(k int PRIMARY KEY); INSERT INTO single_row_decimal_fk(k) VALUES (1), (2), (3), (4); ALTER TABLE single_row_decimal ADD FOREIGN KEY (v3) REFERENCES single_row_decimal_fk(k); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v1 = 1.555 WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v1 = v1 + 1.555 WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v2 = 1.555 WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v2 = v2 + 1.555 WHERE k = 4; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v3 = 1 WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v3 = v3 + 1 WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v1 = v2 + 1.555 WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v2 = k + 1.555 WHERE k = 4; EXPLAIN (COSTS FALSE) UPDATE single_row_decimal SET v3 = k - v3 WHERE k = 4; -- Test execution. INSERT INTO single_row_decimal(k, v1, v2, v3) values (4,4.5,4.5,4); SELECT * FROM single_row_decimal ORDER BY k; UPDATE single_row_decimal SET v1 = v1 + 4.555 WHERE k = 4; UPDATE single_row_decimal SET v2 = v2 + 4.555 WHERE k = 4; UPDATE single_row_decimal SET v3 = v3 + 4 WHERE k = 4; -- v2 should be rounded to 2 decimals. SELECT * FROM single_row_decimal ORDER BY k; -- -- Test table with indexes. -- Should use single-row for expressions if (and only if) the indexed columns are not updated. -- CREATE TABLE single_row_index(k int PRIMARY KEY, v1 smallint, v2 smallint, v3 smallint); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v1 = 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v1 = v1 + 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v2 = 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v2 = v2 + 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v3 = 3 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v3 = v3 + 3 WHERE k = 1; CREATE INDEX single_row_index_idx on single_row_index(v1) include (v3); -- Below statements should all USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v2 = 2 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v2 = v2 + 2 WHERE k = 1; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v1 = 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v1 = v1 + 1 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v3 = 3 WHERE k = 1; EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v3 = v3 + 3 WHERE k = 1; -- Test execution. INSERT INTO single_row_index(k, v1, v2, v3) VALUES (1,0,0,0), (2,2,32000,2); SELECT * FROM single_row_index ORDER BY k; UPDATE single_row_index SET v1 = 1 WHERE k = 1; UPDATE single_row_index SET v2 = 2 WHERE k = 1; UPDATE single_row_index SET v3 = 3 WHERE k = 1; SELECT * FROM single_row_index ORDER BY k; UPDATE single_row_index SET v1 = v1 + 1 WHERE k = 1; UPDATE single_row_index SET v2 = v2 + 2 WHERE k = 1; UPDATE single_row_index SET v3 = v3 + 3 WHERE k = 1; SELECT * FROM single_row_index ORDER BY k; -- Test error reporting (overflow). EXPLAIN (COSTS FALSE) UPDATE single_row_index SET v2 = v2 + 1000 WHERE k = 2; UPDATE single_row_index SET v2 = v2 + 1000 WHERE k = 2; -- Test column ordering. CREATE TABLE single_row_col_order(a int, b int, c int, d int, e int, primary key(d, b)); -- Below statements should all USE single-row. EXPLAIN (COSTS OFF) UPDATE single_row_col_order SET c = 6, a = 2, e = 10 WHERE b = 2 and d = 4; EXPLAIN (COSTS OFF) UPDATE single_row_col_order SET c = c * c, a = a * 2, e = power(e, 2) WHERE b = 2 and d = 4; EXPLAIN (COSTS OFF) DELETE FROM single_row_col_order WHERE b = 2 and d = 4; -- Below statements should all NOT USE single-row. EXPLAIN (COSTS OFF) UPDATE single_row_col_order SET c = 6, a = c + 2, e = 10 WHERE b = 2 and d = 4; EXPLAIN (COSTS OFF) UPDATE single_row_col_order SET c = c * b, a = a * 2, e = power(e, 2) WHERE b = 2 and d = 4; -- Test execution. INSERT INTO single_row_col_order(a,b,c,d,e) VALUES (1,2,3,4,5), (2,3,4,5,6); UPDATE single_row_col_order SET c = 6, a = 2, e = 10 WHERE b = 2 and d = 4; SELECT * FROM single_row_col_order ORDER BY d, b; UPDATE single_row_col_order SET c = c * c, a = a * 2, e = power(e, 2) WHERE d = 4 and b = 2; SELECT * FROM single_row_col_order ORDER BY d, b; DELETE FROM single_row_col_order WHERE b = 2 and d = 4; SELECT * FROM single_row_col_order ORDER BY d, b; -- -- Test single-row with default values -- CREATE TABLE single_row_default_col(k int PRIMARY KEY, a int default 10, b int default 20 not null, c int); ------------------ -- Test Planning EXPLAIN (COSTS FALSE) UPDATE single_row_default_col SET a = 3 WHERE k = 2; EXPLAIN (COSTS FALSE) UPDATE single_row_default_col SET b = 3 WHERE k = 2; EXPLAIN (COSTS FALSE) UPDATE single_row_default_col SET a = 3, c = 4 WHERE k = 2; EXPLAIN (COSTS FALSE) UPDATE single_row_default_col SET b = NULL, c = 5 WHERE k = 3; EXPLAIN (COSTS FALSE) UPDATE single_row_default_col SET a = 3, b = 3, c = 3 WHERE k = 2; ------------------ -- Test Execution -- Insert should use defaults for missing columns. INSERT INTO single_row_default_col(k, a, b, c) VALUES (1, 1, 1, 1); INSERT INTO single_row_default_col(k, c) VALUES (2, 2); INSERT INTO single_row_default_col(k, a, c) VALUES (3, NULL, 3); INSERT INTO single_row_default_col(k, a, c) VALUES (4, NULL, 4); -- Setting b to null should not be allowed. INSERT INTO single_row_default_col(k, a, b, c) VALUES (5, 5, NULL, 5); SELECT * FROM single_row_default_col ORDER BY k; -- Updates should not modify the existing (non-updated) values. UPDATE single_row_default_col SET b = 3 WHERE k = 2; SELECT * FROM single_row_default_col ORDER BY k; UPDATE single_row_default_col SET a = 3, c = 4 WHERE k = 2; SELECT * FROM single_row_default_col ORDER BY k; -- a should stay null (because it was explicitly set). UPDATE single_row_default_col SET b = 4, c = 5 WHERE k = 3; SELECT * FROM single_row_default_col ORDER BY k; UPDATE single_row_default_col SET a = 4 WHERE k = 3; SELECT * FROM single_row_default_col ORDER BY k; -- Setting b to null should not be allowed. UPDATE single_row_default_col SET b = NULL, c = 5 WHERE k = 3; SELECT * FROM single_row_default_col ORDER BY k; ALTER TABLE single_row_default_col ALTER COLUMN a SET DEFAULT 30; -- Insert should use the new default. INSERT INTO single_row_default_col(k, c) VALUES (5, 5); SELECT * FROM single_row_default_col ORDER BY k; -- Updates should not modify the existing (non-updated) values. UPDATE single_row_default_col SET a = 4 WHERE k = 4; SELECT * FROM single_row_default_col ORDER BY k; UPDATE single_row_default_col SET c = 6, b = 5 WHERE k = 5; SELECT * FROM single_row_default_col ORDER BY k; UPDATE single_row_default_col SET c = 7, b = 7, a = 7 WHERE k = 5; SELECT * FROM single_row_default_col ORDER BY k; -- Setting b to null should not be allowed. UPDATE single_row_default_col SET b = NULL, c = 5 WHERE k = 3; SELECT * FROM single_row_default_col ORDER BY k; -- -- Test single-row with partial index -- CREATE TABLE single_row_partial_index(k SERIAL PRIMARY KEY, value INT NOT NULL, status INT NOT NULL); CREATE UNIQUE INDEX ON single_row_partial_index(value ASC) WHERE status = 10; INSERT INTO single_row_partial_index(value, status) VALUES(1, 10), (2, 20), (3, 10), (4, 30); EXPLAIN (COSTS OFF) SELECT * FROM single_row_partial_index WHERE status = 10; SELECT * FROM single_row_partial_index WHERE status = 10; EXPLAIN (COSTS OFF) UPDATE single_row_partial_index SET status = 10 WHERE k = 2; UPDATE single_row_partial_index SET status = 10 WHERE k = 2; SELECT * FROM single_row_partial_index WHERE status = 10; EXPLAIN (COSTS OFF) UPDATE single_row_partial_index SET status = 9 WHERE k = 1; UPDATE single_row_partial_index SET status = 9 WHERE k = 1; SELECT * FROM single_row_partial_index WHERE status = 10; -- -- Test single-row with index expression -- CREATE TABLE single_row_expression_index(k SERIAL PRIMARY KEY, value text NOT NULL); CREATE UNIQUE INDEX ON single_row_expression_index(lower(value) ASC); INSERT INTO single_row_expression_index(value) VALUES('aBc'), ('deF'), ('HIJ'); EXPLAIN (COSTS OFF) SELECT * FROM single_row_expression_index WHERE lower(value)='def'; SELECT * FROM single_row_expression_index WHERE lower(value)='def'; EXPLAIN (COSTS OFF) UPDATE single_row_expression_index SET value = 'kLm' WHERE k = 2; UPDATE single_row_expression_index SET value = 'kLm' WHERE k = 2; SELECT * FROM single_row_expression_index WHERE lower(value)='def'; SELECT * FROM single_row_expression_index WHERE lower(value)='klm'; -- -- Test array types. -- ----------------------------------- -- int[] arrays. CREATE TABLE array_t1(k int PRIMARY KEY, arr int[]); INSERT INTO array_t1(k, arr) VALUES (1, '{1, 2, 3, 4}'::int[]); SELECT * FROM array_t1 ORDER BY k; -- the || operator. UPDATE array_t1 SET arr = arr||'{5, 6}'::int[] WHERE k = 1; SELECT * FROM array_t1 ORDER BY k; -- array_cat(). UPDATE array_t1 SET arr = array_cat(arr, '{7, 8}'::int[]) WHERE k = 1; SELECT * FROM array_t1 ORDER BY k; -- array_append(). UPDATE array_t1 SET arr = array_append(arr, 9::int) WHERE k = 1; SELECT * FROM array_t1 ORDER BY k; -- array_prepend(). UPDATE array_t1 SET arr = array_prepend(0::int, arr) WHERE k = 1; SELECT * FROM array_t1 ORDER BY k; -- array_remove(). UPDATE array_t1 SET arr = array_remove(arr, 4) WHERE k = 1; SELECT * FROM array_t1 ORDER BY k; -- array_replace(). UPDATE array_t1 SET arr = array_replace(arr, 7, 77) WHERE k = 1; SELECT * FROM array_t1 ORDER BY k; ----------------------------------- -- text[] arrays. CREATE TABLE array_t2(k int PRIMARY KEY, arr text[]); INSERT INTO array_t2(k, arr) VALUES (1, '{a, b}'::text[]); SELECT * FROM array_t2 ORDER BY k; UPDATE array_t2 SET arr = array_replace(arr, 'b', 'p') WHERE k = 1; SELECT * FROM array_t2 ORDER BY k; UPDATE array_t2 SET arr = '{x, y, z}'::text[] WHERE k = 1; SELECT * FROM array_t2 ORDER BY k; UPDATE array_t2 SET arr[2] = 'q' where k = 1; SELECT * FROM array_t2 ORDER BY k; ----------------------------------- -- Arrays of composite types. CREATE TYPE rt as (f1 int, f2 text); CREATE TABLE array_t3(k int PRIMARY KEY, arr rt[] NOT NULL); INSERT INTO array_t3(k, arr) VALUES (1, '{"(1,a)", "(2,b)"}'::rt[]); SELECT * FROM array_t3 ORDER BY k; UPDATE array_t3 SET arr = '{"(1,c)", "(2,d)"}'::rt[] WHERE k = 1; SELECT * FROM array_t3 ORDER BY k; UPDATE array_t3 SET arr[2] = '(2,e)'::rt WHERE k = 1; SELECT * FROM array_t3 ORDER BY k; UPDATE array_t3 SET arr = array_replace(arr, '(1,c)', '(1,p)') WHERE k = 1; SELECT * FROM array_t3 ORDER BY k; ----------------------------------- -- Test more builtin array types. -- INT2ARRAYOID, FLOAT8ARRAYOID, CHARARRAYOID. CREATE TABLE array_t4(k int PRIMARY KEY, arr1 int2[], arr2 double precision[], arr3 char[]); INSERT INTO array_t4(k, arr1, arr2, arr3) VALUES (1, '{1, 2, 3}'::int2[], '{1.5, 2.25, 3.25}'::float[], '{a, b, c}'::char[]); SELECT * FROM array_t4 ORDER BY k; -- array_replace(). UPDATE array_t4 SET arr1 = array_replace(arr1, 2::int2, 22::int2) WHERE k = 1; UPDATE array_t4 SET arr2 = array_replace(arr2, 2.25::double precision, 22.25::double precision) WHERE k = 1; UPDATE array_t4 SET arr3 = array_replace(arr3, 'b'::char, 'x'::char) WHERE k = 1; SELECT * FROM array_t4 ORDER BY k; -- array_cat(). UPDATE array_t4 SET arr1 = array_cat(arr1, '{4, 5}'::int2[]) WHERE k = 1; UPDATE array_t4 SET arr2 = array_cat(arr2, '{4.5, 5.25}'::double precision[][]) WHERE k = 1; UPDATE array_t4 SET arr3 = array_cat(arr3, '{d, e, f}'::char[]) WHERE k = 1; SELECT * FROM array_t4 ORDER BY k; -- array_prepend(). UPDATE array_t4 SET arr1 = array_prepend(0::int2, arr1), arr2 = array_prepend(0.5::double precision, arr2), arr3 = array_prepend('z'::char, arr3) WHERE k = 1; SELECT * FROM array_t4 ORDER BY k; -- array_remove(). UPDATE array_t4 SET arr1 = array_remove(arr1, 3::int2), arr2 = array_remove(arr2, 3.25::double precision), arr3 = array_remove(arr3, 'c'::char) WHERE k = 1; SELECT * FROM array_t4 ORDER BY k; ----------------------------------- -- Test json types. CREATE TABLE json_t1(k int PRIMARY KEY, json1 json, json2 jsonb); INSERT INTO json_t1 (k, json1, json2) VALUES (1, '["a", 1]'::json, '["b", 2]'::jsonb); SELECT * FROM json_t1; UPDATE json_t1 SET json1 = json1 -> 0, json2 = json2||'["c", 3]'::jsonb WHERE k = 1; SELECT * FROM json_t1;
the_stack
-- 08.09.2015 13:17 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_RelationType (AD_Client_ID,AD_Org_ID,AD_RelationType_ID,Created,CreatedBy,EntityType,IsActive,IsDirected,IsExplicit,Name,Updated,UpdatedBy) VALUES (0,0,540122,TO_TIMESTAMP('2015-09-08 13:17:54','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','N','C_Order -> Invoice (SO)',TO_TIMESTAMP('2015-09-08 13:17:54','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.09.2015 13:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_RelationType (AD_Client_ID,AD_Org_ID,AD_RelationType_ID,Created,CreatedBy,EntityType,IsActive,IsDirected,IsExplicit,Name,Updated,UpdatedBy) VALUES (0,0,540123,TO_TIMESTAMP('2015-09-08 13:18:01','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','N','C_Order -> Invoice (PO)',TO_TIMESTAMP('2015-09-08 13:18:01','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.09.2015 13:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_RelationType (AD_Client_ID,AD_Org_ID,AD_RelationType_ID,Created,CreatedBy,EntityType,IsActive,IsDirected,IsExplicit,Name,Updated,UpdatedBy) VALUES (0,0,540124,TO_TIMESTAMP('2015-09-08 13:18:14','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','N','C_Invoice -> Order (SO)',TO_TIMESTAMP('2015-09-08 13:18:14','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.09.2015 13:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_RelationType (AD_Client_ID,AD_Org_ID,AD_RelationType_ID,Created,CreatedBy,EntityType,IsActive,IsDirected,IsExplicit,Name,Updated,UpdatedBy) VALUES (0,0,540125,TO_TIMESTAMP('2015-09-08 13:18:26','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','N','C_Invoice -> Order (PO)',TO_TIMESTAMP('2015-09-08 13:18:26','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.09.2015 13:33 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540565,TO_TIMESTAMP('2015-09-08 13:33:50','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','RelType Order -> Invoice SO',TO_TIMESTAMP('2015-09-08 13:33:50','YYYY-MM-DD HH24:MI:SS'),100,'T') ; -- 08.09.2015 13:33 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540565 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 08.09.2015 13:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,3484,0,540565,318,TO_TIMESTAMP('2015-09-08 13:34:17','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N',TO_TIMESTAMP('2015-09-08 13:34:17','YYYY-MM-DD HH24:MI:SS'),100,' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE ol.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = ''Y'' )') ; -- 08.09.2015 13:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE ol.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = ol.IsSOTrx AND i.IsSOTrx = ''Y'' )',Updated=TO_TIMESTAMP('2015-09-08 13:34:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 13:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=540100, AD_Reference_Target_ID=53334,Updated=TO_TIMESTAMP('2015-09-08 13:56:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 13:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=540565,Updated=TO_TIMESTAMP('2015-09-08 13:56:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 13:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Target='Invoice',Updated=TO_TIMESTAMP('2015-09-08 13:56:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 13:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540566,TO_TIMESTAMP('2015-09-08 13:57:18','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','RelType C_Order -> Invoice PO',TO_TIMESTAMP('2015-09-08 13:57:18','YYYY-MM-DD HH24:MI:SS'),100,'T') ; -- 08.09.2015 13:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540566 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 08.09.2015 13:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,2161,0,540566,259,TO_TIMESTAMP('2015-09-08 13:57:57','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N',TO_TIMESTAMP('2015-09-08 13:57:57','YYYY-MM-DD HH24:MI:SS'),100,NULL) ; -- 08.09.2015 13:58 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET Name='RelType C_Order -> Invoice SO',Updated=TO_TIMESTAMP('2015-09-08 13:58:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 13:58 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=540565 ; -- 08.09.2015 13:58 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE ol.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = ol.IsSOTrx AND i.IsSOTrx = ''N'' )',Updated=TO_TIMESTAMP('2015-09-08 13:58:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 13:58 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=183,Updated=TO_TIMESTAMP('2015-09-08 13:58:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 13:58 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=167,Updated=TO_TIMESTAMP('2015-09-08 13:58:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 13:59 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_RelationType (AD_Client_ID,AD_Org_ID,AD_Reference_Source_ID,AD_Reference_Target_ID,AD_RelationType_ID,Created,CreatedBy,EntityType,IsActive,IsDirected,IsExplicit,Name,Role_Target,Updated,UpdatedBy) VALUES (0,0,540100,540566,540126,TO_TIMESTAMP('2015-09-08 13:59:32','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','N','C_Order -> Invoice (PO)','PO_Invoice',TO_TIMESTAMP('2015-09-08 13:59:32','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.09.2015 13:59 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=540250,Updated=TO_TIMESTAMP('2015-09-08 13:59:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540126 ; -- 08.09.2015 14:08 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_RelationType WHERE AD_RelationType_ID=540123 ; -- 08.09.2015 14:08 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=540101,Updated=TO_TIMESTAMP('2015-09-08 14:08:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 14:09 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=336,Updated=TO_TIMESTAMP('2015-09-08 14:09:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540125 ; -- 08.09.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540567,TO_TIMESTAMP('2015-09-08 14:10:26','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','RelType C_Invoice -> Order (SO)',TO_TIMESTAMP('2015-09-08 14:10:26','YYYY-MM-DD HH24:MI:SS'),100,'T') ; -- 08.09.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540567 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 08.09.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy) VALUES (0,2161,0,540567,259,TO_TIMESTAMP('2015-09-08 14:10:46','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N',TO_TIMESTAMP('2015-09-08 14:10:46','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.09.2015 14:11 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Key=3484, AD_Table_ID=318,Updated=TO_TIMESTAMP('2015-09-08 14:11:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 14:14 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' )',Updated=TO_TIMESTAMP('2015-09-08 14:14:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 14:14 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540568,TO_TIMESTAMP('2015-09-08 14:14:35','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','RelType C_Invoice -> Order (PO)',TO_TIMESTAMP('2015-09-08 14:14:35','YYYY-MM-DD HH24:MI:SS'),100,'T') ; -- 08.09.2015 14:14 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540568 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 08.09.2015 14:14 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,2161,0,540568,259,TO_TIMESTAMP('2015-09-08 14:14:57','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N',TO_TIMESTAMP('2015-09-08 14:14:57','YYYY-MM-DD HH24:MI:SS'),100,' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' )') ; -- 08.09.2015 14:16 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=540567,Updated=TO_TIMESTAMP('2015-09-08 14:16:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 14:16 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=540568, Role_Target='PurchaseOrder',Updated=TO_TIMESTAMP('2015-09-08 14:16:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540125 ; -- 08.09.2015 14:17 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Target='Order',Updated=TO_TIMESTAMP('2015-09-08 14:17:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 14:17 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=143,Updated=TO_TIMESTAMP('2015-09-08 14:17:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 14:17 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=540567,Updated=TO_TIMESTAMP('2015-09-08 14:17:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 14:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=181,Updated=TO_TIMESTAMP('2015-09-08 14:18:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 14:26 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE C_Async_Batch SET Processed='Y',Updated=TO_TIMESTAMP('2015-09-08 14:26:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=2188280 WHERE C_Async_Batch_ID=1000316 ; -- 08.09.2015 14:27 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 14:27:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=50001 ; -- 08.09.2015 14:30 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=540565,Updated=TO_TIMESTAMP('2015-09-08 14:30:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 14:31 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o IN o.C_Order_ID = ol.C_Order_ID WHERE olC_Order_ID=@C_Order_ID@ AND i.IsSOTrx = olIsSOTrx AND i.IsSOTrx = ''Y'' )',Updated=TO_TIMESTAMP('2015-09-08 14:31:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 14:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o IN o.C_Order_ID = ol.C_Order_ID WHERE olC_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' )',Updated=TO_TIMESTAMP('2015-09-08 14:32:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 14:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON o.C_Order_ID = ol.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' )',Updated=TO_TIMESTAMP('2015-09-08 14:32:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 14:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=540567,Updated=TO_TIMESTAMP('2015-09-08 14:38:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 14:39 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE ol.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' )',Updated=TO_TIMESTAMP('2015-09-08 14:39:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 14:39 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON ol.C_Order_ID = o.C_Order_ID WHERE ol.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' )',Updated=TO_TIMESTAMP('2015-09-08 14:39:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 14:39 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON ol.C_Order_ID = o.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' )',Updated=TO_TIMESTAMP('2015-09-08 14:39:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 14:40 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON ol.C_Order_ID = o.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND i.C_Invoice_ID = C_Invoice.C_Invoice_ID )',Updated=TO_TIMESTAMP('2015-09-08 14:40:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 14:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 14:41:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 14:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 14:41:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 14:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON o.C_Order_ID = ol.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND i.C_Invoice_ID = C_Invoice.C_Invoice_ID )',Updated=TO_TIMESTAMP('2015-09-08 14:41:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 14:43 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=181,Updated=TO_TIMESTAMP('2015-09-08 14:43:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 14:43 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=183,Updated=TO_TIMESTAMP('2015-09-08 14:43:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 14:43 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=167,Updated=TO_TIMESTAMP('2015-09-08 14:43:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 14:43 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=143,Updated=TO_TIMESTAMP('2015-09-08 14:43:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 14:45 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON o.C_Order_ID = ol.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 14:45:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 14:46 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND i.C_Invoice_ID = C_Invoice.C_Invoice_ID )',Updated=TO_TIMESTAMP('2015-09-08 14:46:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 14:46 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON ol.C_Order_ID = o.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 14:46:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 14:46 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND i.C_Invoice_ID = C_Invoice.C_Invoice_ID )',Updated=TO_TIMESTAMP('2015-09-08 14:46:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 15:20 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=540566,Updated=TO_TIMESTAMP('2015-09-08 15:20:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 15:20 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=NULL, IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 15:20:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=50001 ; -- 08.09.2015 15:20 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=NULL,Updated=TO_TIMESTAMP('2015-09-08 15:20:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=50001 ; -- 08.09.2015 15:20 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 15:20:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=50001 ; -- 08.09.2015 15:21 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON ol.C_Order_ID = o.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND i.C_Invoice_ID = C_Invoice.C_Invoice_ID )',Updated=TO_TIMESTAMP('2015-09-08 15:21:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 15:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON o.C_Order_ID = ol.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND i.C_Invoice_ID = C_Invoice.C_Invoice_ID )',Updated=TO_TIMESTAMP('2015-09-08 15:22:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 15:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 15:22:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 15:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 15:22:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 15:27 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=181,Updated=TO_TIMESTAMP('2015-09-08 15:27:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 15:27 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=183,Updated=TO_TIMESTAMP('2015-09-08 15:27:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540566 ; -- 08.09.2015 15:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=143,Updated=TO_TIMESTAMP('2015-09-08 15:28:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 15:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET AD_Window_ID=167,Updated=TO_TIMESTAMP('2015-09-08 15:28:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 16:01 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Target_ID=540565,Updated=TO_TIMESTAMP('2015-09-08 16:01:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 16:04 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Target=NULL,Updated=TO_TIMESTAMP('2015-09-08 16:04:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 16:04 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Target=NULL,Updated=TO_TIMESTAMP('2015-09-08 16:04:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 16:04 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Target=NULL,Updated=TO_TIMESTAMP('2015-09-08 16:04:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540125 ; -- 08.09.2015 16:04 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Target=NULL,Updated=TO_TIMESTAMP('2015-09-08 16:04:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540126 ; -- 08.09.2015 16:07 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540569,TO_TIMESTAMP('2015-09-08 16:07:55','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','C_Invoice PO',TO_TIMESTAMP('2015-09-08 16:07:55','YYYY-MM-DD HH24:MI:SS'),100,'T') ; -- 08.09.2015 16:07 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540569 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 08.09.2015 16:08 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Display,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,OrderByClause,Updated,UpdatedBy,WhereClause) VALUES (0,3492,3484,0,540569,318,TO_TIMESTAMP('2015-09-08 16:08:55','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N','DocumentNo',TO_TIMESTAMP('2015-09-08 16:08:55','YYYY-MM-DD HH24:MI:SS'),100,'IsSOTrx = ''N''') ; -- 08.09.2015 16:09 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=540569,Updated=TO_TIMESTAMP('2015-09-08 16:09:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540125 ; -- 08.09.2015 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o INNER JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID INNER JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID INNER JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 16:41:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT DISTINCT o.C_Order_ID FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 16:41:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 16:42 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 16:42:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 16:42 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT DISTINCT o.C_Order_ID FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 16:42:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 16:43 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT DISTINCT o.C_Order_ID FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 16:43:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 16:43 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 16:43:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 16:43 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''N'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 16:43:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540568 ; -- 08.09.2015 17:02 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=53334, AD_Reference_Target_ID=53333, IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 17:02:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=50001 ; -- 08.09.2015 17:13 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 17:13:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=50001 ; -- 08.09.2015 17:14 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,Description,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540570,TO_TIMESTAMP('2015-09-08 17:14:48','YYYY-MM-DD HH24:MI:SS'),100,'Auftrag','de.metas.swat','Y','N','C_Order SO ',TO_TIMESTAMP('2015-09-08 17:14:48','YYYY-MM-DD HH24:MI:SS'),100,'T') ; -- 08.09.2015 17:14 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540570 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 08.09.2015 17:15 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET Name='C_Order SO DRAFT INCLUDED',Updated=TO_TIMESTAMP('2015-09-08 17:15:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 17:15 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=540570 ; -- 08.09.2015 17:17 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Display,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy,WhereClause) VALUES (0,2169,2161,0,540570,259,TO_TIMESTAMP('2015-09-08 17:17:02','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N',TO_TIMESTAMP('2015-09-08 17:17:02','YYYY-MM-DD HH24:MI:SS'),100,'ISSOTrx = ''Y''') ; -- 08.09.2015 17:17 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET OrderByClause='documentNo',Updated=TO_TIMESTAMP('2015-09-08 17:17:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 17:17 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=540570,Updated=TO_TIMESTAMP('2015-09-08 17:17:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 17:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,Description,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540571,TO_TIMESTAMP('2015-09-08 17:49:56','YYYY-MM-DD HH24:MI:SS'),100,'Ausgangsrechnung','de.metas.swat','Y','N','C_Invoice SO DRAFT INCLUDED',TO_TIMESTAMP('2015-09-08 17:49:56','YYYY-MM-DD HH24:MI:SS'),100,'T') ; -- 08.09.2015 17:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540571 AND NOT EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 08.09.2015 17:50 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_Table (AD_Client_ID,AD_Key,AD_Org_ID,AD_Reference_ID,AD_Table_ID,Created,CreatedBy,EntityType,IsActive,IsValueDisplayed,Updated,UpdatedBy) VALUES (0,3484,0,540571,318,TO_TIMESTAMP('2015-09-08 17:50:33','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.swat','Y','N',TO_TIMESTAMP('2015-09-08 17:50:33','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.09.2015 17:55 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' C_Invoice.IsSOTrx=''Y'' AND EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID WHERE C_Invoice.C_Invoice_ID = @C_Invoice_ID@ AND C_Invoice.IsSOTrx = o.IsSOTrx AND C_Invoice.IsSOTrx = ''Y'' AND il.C_Invoice_ID = C_Invoice.C_Invoice_ID )',Updated=TO_TIMESTAMP('2015-09-08 17:55:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 17:55 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=540571,Updated=TO_TIMESTAMP('2015-09-08 17:55:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 17:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 17:56:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540125 ; -- 08.09.2015 17:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 17:57:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 17:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 17:57:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540126 ; -- 08.09.2015 17:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 17:57:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 17:59 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' C_Order.IsSOTrx=''Y'' AND EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN C_Invoice i on il.C_Invoice_ID = i.C_Invoice_ID WHERE i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND o.C_Order_ID = C_Order.C_Order_ID )',Updated=TO_TIMESTAMP('2015-09-08 17:59:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 18:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 18:00:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 18:01 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 18:01:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 18:01 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 18:01:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 18:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE C_Order.C_Order_ID = ol.C_Order_ID AND C_Order.C_Order_ID = @C_Order_ID@ AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' )',Updated=TO_TIMESTAMP('2015-09-08 18:10:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE C_Order.C_Order_ID = ol.C_Order_ID AND i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' )',Updated=TO_TIMESTAMP('2015-09-08 18:10:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:21 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE C_Order.C_Order_ID = il.C_Order_ID AND i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' ) ',Updated=TO_TIMESTAMP('2015-09-08 18:21:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 18:22:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 18:24 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 18:24:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 18:24 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 18:24:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:29 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 18:29:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:29 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 18:29:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 18:30 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Reference SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 18:30:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 18:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE ( C_Order.C_Order_ID = ol.C_Order_ID OR C_Order.C_Order_ID = il.C_Order_ID ) AND ( i.C_Invoice_ID = @C_Invoice_ID@ OR C_Order.C_Order_ID = @C_Order_ID@ ) AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' ) ',Updated=TO_TIMESTAMP('2015-09-08 18:34:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:42 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE ( C_Order.C_Order_ID = ol.C_Order_ID OR C_Order.C_Order_ID = il.C_Order_ID ) AND ( C_Order.C_Order_ID = @C_Order_ID@ ) AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' ) ',Updated=TO_TIMESTAMP('2015-09-08 18:42:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:45 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE ( C_Order.C_Order_ID = ol.C_Order_ID OR C_Order.C_Order_ID = il.C_Order_ID ) AND C_Order.C_Order_ID = @C_Order_ID@ AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' ) ',Updated=TO_TIMESTAMP('2015-09-08 18:45:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:48 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE C_Order.C_Order_ID = ol.C_Order_ID AND i.C_Invoice_ID = @C_Invoice_ID@ AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' ) ',Updated=TO_TIMESTAMP('2015-09-08 18:48:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:51 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsDirected='Y',Updated=TO_TIMESTAMP('2015-09-08 18:51:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 18:52 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE C_Order.C_Order_ID = ol.C_Order_ID AND ( i.C_Invoice_ID = @C_Invoice_ID@ OR C_Order.C_Order_ID = @C_Order_ID@ ) AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' ) ',Updated=TO_TIMESTAMP('2015-09-08 18:52:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 18:53 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' C_Invoice.IsSOTrx=''Y'' AND EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID JOIN WHERE (C_Invoice.C_Invoice_ID = @C_Invoice_ID@ OR o.C_Order_ID = @C_Order_ID@ ) AND C_Invoice.IsSOTrx = o.IsSOTrx AND C_Invoice.IsSOTrx = ''Y'' AND il.C_Invoice_ID = C_Invoice.C_Invoice_ID ) ',Updated=TO_TIMESTAMP('2015-09-08 18:53:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 18:54 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' C_Invoice.IsSOTrx=''Y'' AND EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID WHERE (C_Invoice.C_Invoice_ID = @C_Invoice_ID@ OR o.C_Order_ID = @C_Order_ID@ ) AND C_Invoice.IsSOTrx = o.IsSOTrx AND C_Invoice.IsSOTrx = ''Y'' AND il.C_Invoice_ID = C_Invoice.C_Invoice_ID ) ',Updated=TO_TIMESTAMP('2015-09-08 18:54:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 18:55 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' C_Invoice.IsSOTrx=''Y'' AND EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID WHERE (C_Invoice.C_Invoice_ID = @C_Invoice_ID/-1@ OR o.C_Order_ID = @C_Order_ID/-1@ ) AND C_Invoice.IsSOTrx = o.IsSOTrx AND C_Invoice.IsSOTrx = ''Y'' AND il.C_Invoice_ID = C_Invoice.C_Invoice_ID ) ',Updated=TO_TIMESTAMP('2015-09-08 18:55:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 18:55 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il on i.C_Invoice_ID = il.C_Invoice_ID JOIN C_OrderLine ol on il.C_OrderLine_ID = ol.C_OrderLine_ID WHERE C_Order.C_Order_ID = ol.C_Order_ID AND ( i.C_Invoice_ID = @C_Invoice_ID/-1@ OR C_Order.C_Order_ID = @C_Order_ID/-1@ ) AND i.IsSOTrx = C_Order.IsSOTrx AND i.IsSOTrx = ''Y'' )',Updated=TO_TIMESTAMP('2015-09-08 18:55:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540567 ; -- 08.09.2015 19:07 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 19:07:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 19:09 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y', IsDirected='N',Updated=TO_TIMESTAMP('2015-09-08 19:09:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 19:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 19:10:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 19:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 19:10:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 19:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 19:10:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540125 ; -- 08.09.2015 19:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 19:10:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540126 ; -- 08.09.2015 19:11 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 19:11:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540126 ; -- 08.09.2015 19:11 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 19:11:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540125 ; -- 08.09.2015 19:11 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 19:11:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 19:16 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=NULL,Updated=TO_TIMESTAMP('2015-09-08 19:16:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 19:19 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=540565, AD_Reference_Target_ID=540570, Description='C_Order SO DRAFT INCLUDED',Updated=TO_TIMESTAMP('2015-09-08 19:19:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 19:20 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON o.C_Order_ID = ol.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND i.C_Invoice_ID = C_Invoice.C_Invoice_ID ) ',Updated=TO_TIMESTAMP('2015-09-08 19:20:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 19:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' EXISTS ( SELECT 1 FROM C_Invoice i JOIN C_InvoiceLine il ON i.C_Invoice_ID = il.C_invoice_ID JOIN C_OrderLine ol ON il.C_OrderLine_ID = ol.C_OrderLine_ID JOIN C_Order o ON o.C_Order_ID = ol.C_Order_ID WHERE o.C_Order_ID=@C_Order_ID@ AND i.IsSOTrx = o.IsSOTrx AND i.IsSOTrx = ''Y'' AND o.C_Order_ID = C_Order.C_Order_ID ) ',Updated=TO_TIMESTAMP('2015-09-08 19:22:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 19:24 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Source='Order',Updated=TO_TIMESTAMP('2015-09-08 19:24:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 19:25 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Target='Invoice',Updated=TO_TIMESTAMP('2015-09-08 19:25:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 19:25 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause='ISSOTRX = ''Y''',Updated=TO_TIMESTAMP('2015-09-08 19:25:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540565 ; -- 08.09.2015 19:26 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET Role_Source='Invoice', Role_Target='Order',Updated=TO_TIMESTAMP('2015-09-08 19:26:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 19:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' C_Invoice.IsSOTrx=''Y'' ',Updated=TO_TIMESTAMP('2015-09-08 19:28:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 19:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' C_Invoice.IsSOTrx=''Y'' AND EXISTS ( SELECT 1 FROM C_Order o JOIN C_OrderLine ol on o.C_Order_ID = ol.C_Order_ID JOIN C_InvoiceLine il on ol.C_OrderLine_ID = il.C_OrderLine_ID WHERE (C_Invoice.C_Invoice_ID = @C_Invoice_ID/-1@ OR o.C_Order_ID = @C_Order_ID/-1@ ) AND C_Invoice.IsSOTrx = o.IsSOTrx AND C_Invoice.IsSOTrx = ''Y'' AND il.C_Invoice_ID = C_Invoice.C_Invoice_ID ) ',Updated=TO_TIMESTAMP('2015-09-08 19:28:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540571 ; -- 08.09.2015 19:30 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-08 19:30:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 19:31 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsDirected='Y',Updated=TO_TIMESTAMP('2015-09-08 19:31:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 19:31 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 19:31:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 19:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsDirected='Y',Updated=TO_TIMESTAMP('2015-09-08 19:32:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 19:33 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsDirected='N',Updated=TO_TIMESTAMP('2015-09-08 19:33:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540124 ; -- 08.09.2015 19:35 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause='issotrx = ''Y''',Updated=TO_TIMESTAMP('2015-09-08 19:35:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 19:37 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET AD_Reference_Source_ID=540570, AD_Reference_Target_ID=540565,Updated=TO_TIMESTAMP('2015-09-08 19:37:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540122 ; -- 08.09.2015 19:39 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause='issotrx = ''Y'' AND 1=2',Updated=TO_TIMESTAMP('2015-09-08 19:39:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 19:40 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Ref_Table SET WhereClause=' 1=2',Updated=TO_TIMESTAMP('2015-09-08 19:40:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=540570 ; -- 08.09.2015 19:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 19:41:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540125 ; -- 08.09.2015 19:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_RelationType SET IsActive='Y',Updated=TO_TIMESTAMP('2015-09-08 19:41:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_RelationType_ID=540126 ;
the_stack
-- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION btree_gist" to load this file. \quit CREATE FUNCTION gbtreekey4_in(cstring) RETURNS gbtreekey4 AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbtreekey4_out(gbtreekey4) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; CREATE TYPE gbtreekey4 ( INTERNALLENGTH = 4, INPUT = gbtreekey4_in, OUTPUT = gbtreekey4_out ); CREATE FUNCTION gbtreekey8_in(cstring) RETURNS gbtreekey8 AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbtreekey8_out(gbtreekey8) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; CREATE TYPE gbtreekey8 ( INTERNALLENGTH = 8, INPUT = gbtreekey8_in, OUTPUT = gbtreekey8_out ); CREATE FUNCTION gbtreekey16_in(cstring) RETURNS gbtreekey16 AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbtreekey16_out(gbtreekey16) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; CREATE TYPE gbtreekey16 ( INTERNALLENGTH = 16, INPUT = gbtreekey16_in, OUTPUT = gbtreekey16_out ); CREATE FUNCTION gbtreekey32_in(cstring) RETURNS gbtreekey32 AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbtreekey32_out(gbtreekey32) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; CREATE TYPE gbtreekey32 ( INTERNALLENGTH = 32, INPUT = gbtreekey32_in, OUTPUT = gbtreekey32_out ); CREATE FUNCTION gbtreekey_var_in(cstring) RETURNS gbtreekey_var AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbtreekey_var_out(gbtreekey_var) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; CREATE TYPE gbtreekey_var ( INTERNALLENGTH = VARIABLE, INPUT = gbtreekey_var_in, OUTPUT = gbtreekey_var_out, STORAGE = EXTENDED ); --distance operators CREATE FUNCTION cash_dist(money, money) RETURNS money AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = money, RIGHTARG = money, PROCEDURE = cash_dist, COMMUTATOR = '<->' ); CREATE FUNCTION date_dist(date, date) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = date, RIGHTARG = date, PROCEDURE = date_dist, COMMUTATOR = '<->' ); CREATE FUNCTION float4_dist(float4, float4) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = float4, RIGHTARG = float4, PROCEDURE = float4_dist, COMMUTATOR = '<->' ); CREATE FUNCTION float8_dist(float8, float8) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = float8, RIGHTARG = float8, PROCEDURE = float8_dist, COMMUTATOR = '<->' ); CREATE FUNCTION int2_dist(int2, int2) RETURNS int2 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = int2, RIGHTARG = int2, PROCEDURE = int2_dist, COMMUTATOR = '<->' ); CREATE FUNCTION int4_dist(int4, int4) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = int4, RIGHTARG = int4, PROCEDURE = int4_dist, COMMUTATOR = '<->' ); CREATE FUNCTION int8_dist(int8, int8) RETURNS int8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = int8, RIGHTARG = int8, PROCEDURE = int8_dist, COMMUTATOR = '<->' ); CREATE FUNCTION interval_dist(interval, interval) RETURNS interval AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = interval, RIGHTARG = interval, PROCEDURE = interval_dist, COMMUTATOR = '<->' ); CREATE FUNCTION oid_dist(oid, oid) RETURNS oid AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = oid, RIGHTARG = oid, PROCEDURE = oid_dist, COMMUTATOR = '<->' ); CREATE FUNCTION time_dist(time, time) RETURNS interval AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = time, RIGHTARG = time, PROCEDURE = time_dist, COMMUTATOR = '<->' ); CREATE FUNCTION ts_dist(timestamp, timestamp) RETURNS interval AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = timestamp, RIGHTARG = timestamp, PROCEDURE = ts_dist, COMMUTATOR = '<->' ); CREATE FUNCTION tstz_dist(timestamptz, timestamptz) RETURNS interval AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR <-> ( LEFTARG = timestamptz, RIGHTARG = timestamptz, PROCEDURE = tstz_dist, COMMUTATOR = '<->' ); -- -- -- -- oid ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_oid_consistent(internal,oid,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_oid_distance(internal,oid,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_oid_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_oid_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_var_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_var_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_oid_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_oid_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_oid_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_oid_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_oid_ops DEFAULT FOR TYPE oid USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_oid_consistent (internal, oid, int2, oid, internal), FUNCTION 2 gbt_oid_union (bytea, internal), FUNCTION 3 gbt_oid_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_oid_penalty (internal, internal, internal), FUNCTION 6 gbt_oid_picksplit (internal, internal), FUNCTION 7 gbt_oid_same (internal, internal, internal), STORAGE gbtreekey8; -- Add operators that are new in 9.1. We do it like this, leaving them -- "loose" in the operator family rather than bound into the opclass, because -- that's the only state that can be reproduced during an upgrade from 9.0. ALTER OPERATOR FAMILY gist_oid_ops USING gist ADD OPERATOR 6 <> (oid, oid) , OPERATOR 15 <-> (oid, oid) FOR ORDER BY pg_catalog.oid_ops , FUNCTION 8 (oid, oid) gbt_oid_distance (internal, oid, int2, oid) , -- Also add support function for index-only-scans, added in 9.5. FUNCTION 9 (oid, oid) gbt_oid_fetch (internal) ; -- -- -- -- int2 ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_int2_consistent(internal,int2,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int2_distance(internal,int2,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int2_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int2_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int2_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int2_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int2_union(bytea, internal) RETURNS gbtreekey4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int2_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_int2_ops DEFAULT FOR TYPE int2 USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_int2_consistent (internal, int2, int2, oid, internal), FUNCTION 2 gbt_int2_union (bytea, internal), FUNCTION 3 gbt_int2_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_int2_penalty (internal, internal, internal), FUNCTION 6 gbt_int2_picksplit (internal, internal), FUNCTION 7 gbt_int2_same (internal, internal, internal), STORAGE gbtreekey4; ALTER OPERATOR FAMILY gist_int2_ops USING gist ADD OPERATOR 6 <> (int2, int2) , OPERATOR 15 <-> (int2, int2) FOR ORDER BY pg_catalog.integer_ops , FUNCTION 8 (int2, int2) gbt_int2_distance (internal, int2, int2, oid) , FUNCTION 9 (int2, int2) gbt_int2_fetch (internal) ; -- -- -- -- int4 ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_int4_consistent(internal,int4,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int4_distance(internal,int4,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int4_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int4_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int4_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int4_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int4_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int4_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_int4_ops DEFAULT FOR TYPE int4 USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_int4_consistent (internal, int4, int2, oid, internal), FUNCTION 2 gbt_int4_union (bytea, internal), FUNCTION 3 gbt_int4_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_int4_penalty (internal, internal, internal), FUNCTION 6 gbt_int4_picksplit (internal, internal), FUNCTION 7 gbt_int4_same (internal, internal, internal), STORAGE gbtreekey8; ALTER OPERATOR FAMILY gist_int4_ops USING gist ADD OPERATOR 6 <> (int4, int4) , OPERATOR 15 <-> (int4, int4) FOR ORDER BY pg_catalog.integer_ops , FUNCTION 8 (int4, int4) gbt_int4_distance (internal, int4, int2, oid) , FUNCTION 9 (int4, int4) gbt_int4_fetch (internal) ; -- -- -- -- int8 ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_int8_consistent(internal,int8,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int8_distance(internal,int8,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int8_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int8_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int8_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int8_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int8_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_int8_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_int8_ops DEFAULT FOR TYPE int8 USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_int8_consistent (internal, int8, int2, oid, internal), FUNCTION 2 gbt_int8_union (bytea, internal), FUNCTION 3 gbt_int8_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_int8_penalty (internal, internal, internal), FUNCTION 6 gbt_int8_picksplit (internal, internal), FUNCTION 7 gbt_int8_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_int8_ops USING gist ADD OPERATOR 6 <> (int8, int8) , OPERATOR 15 <-> (int8, int8) FOR ORDER BY pg_catalog.integer_ops , FUNCTION 8 (int8, int8) gbt_int8_distance (internal, int8, int2, oid) , FUNCTION 9 (int8, int8) gbt_int8_fetch (internal) ; -- -- -- -- float4 ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_float4_consistent(internal,float4,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float4_distance(internal,float4,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float4_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float4_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float4_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float4_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float4_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float4_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_float4_ops DEFAULT FOR TYPE float4 USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_float4_consistent (internal, float4, int2, oid, internal), FUNCTION 2 gbt_float4_union (bytea, internal), FUNCTION 3 gbt_float4_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_float4_penalty (internal, internal, internal), FUNCTION 6 gbt_float4_picksplit (internal, internal), FUNCTION 7 gbt_float4_same (internal, internal, internal), STORAGE gbtreekey8; ALTER OPERATOR FAMILY gist_float4_ops USING gist ADD OPERATOR 6 <> (float4, float4) , OPERATOR 15 <-> (float4, float4) FOR ORDER BY pg_catalog.float_ops , FUNCTION 8 (float4, float4) gbt_float4_distance (internal, float4, int2, oid) , FUNCTION 9 (float4, float4) gbt_float4_fetch (internal) ; -- -- -- -- float8 ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_float8_consistent(internal,float8,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float8_distance(internal,float8,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float8_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float8_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float8_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float8_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float8_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_float8_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_float8_ops DEFAULT FOR TYPE float8 USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_float8_consistent (internal, float8, int2, oid, internal), FUNCTION 2 gbt_float8_union (bytea, internal), FUNCTION 3 gbt_float8_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_float8_penalty (internal, internal, internal), FUNCTION 6 gbt_float8_picksplit (internal, internal), FUNCTION 7 gbt_float8_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_float8_ops USING gist ADD OPERATOR 6 <> (float8, float8) , OPERATOR 15 <-> (float8, float8) FOR ORDER BY pg_catalog.float_ops , FUNCTION 8 (float8, float8) gbt_float8_distance (internal, float8, int2, oid) , FUNCTION 9 (float8, float8) gbt_float8_fetch (internal) ; -- -- -- -- timestamp ops -- -- -- CREATE FUNCTION gbt_ts_consistent(internal,timestamp,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_ts_distance(internal,timestamp,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_tstz_consistent(internal,timestamptz,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_tstz_distance(internal,timestamptz,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_ts_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_tstz_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_ts_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_ts_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_ts_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_ts_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_ts_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_timestamp_ops DEFAULT FOR TYPE timestamp USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_ts_consistent (internal, timestamp, int2, oid, internal), FUNCTION 2 gbt_ts_union (bytea, internal), FUNCTION 3 gbt_ts_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_ts_penalty (internal, internal, internal), FUNCTION 6 gbt_ts_picksplit (internal, internal), FUNCTION 7 gbt_ts_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_timestamp_ops USING gist ADD OPERATOR 6 <> (timestamp, timestamp) , OPERATOR 15 <-> (timestamp, timestamp) FOR ORDER BY pg_catalog.interval_ops , FUNCTION 8 (timestamp, timestamp) gbt_ts_distance (internal, timestamp, int2, oid) , FUNCTION 9 (timestamp, timestamp) gbt_ts_fetch (internal) ; -- Create the operator class CREATE OPERATOR CLASS gist_timestamptz_ops DEFAULT FOR TYPE timestamptz USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_tstz_consistent (internal, timestamptz, int2, oid, internal), FUNCTION 2 gbt_ts_union (bytea, internal), FUNCTION 3 gbt_tstz_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_ts_penalty (internal, internal, internal), FUNCTION 6 gbt_ts_picksplit (internal, internal), FUNCTION 7 gbt_ts_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_timestamptz_ops USING gist ADD OPERATOR 6 <> (timestamptz, timestamptz) , OPERATOR 15 <-> (timestamptz, timestamptz) FOR ORDER BY pg_catalog.interval_ops , FUNCTION 8 (timestamptz, timestamptz) gbt_tstz_distance (internal, timestamptz, int2, oid) , FUNCTION 9 (timestamptz, timestamptz) gbt_ts_fetch (internal) ; -- -- -- -- time ops -- -- -- CREATE FUNCTION gbt_time_consistent(internal,time,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_time_distance(internal,time,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_timetz_consistent(internal,timetz,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_time_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_timetz_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_time_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_time_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_time_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_time_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_time_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_time_ops DEFAULT FOR TYPE time USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_time_consistent (internal, time, int2, oid, internal), FUNCTION 2 gbt_time_union (bytea, internal), FUNCTION 3 gbt_time_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_time_penalty (internal, internal, internal), FUNCTION 6 gbt_time_picksplit (internal, internal), FUNCTION 7 gbt_time_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_time_ops USING gist ADD OPERATOR 6 <> (time, time) , OPERATOR 15 <-> (time, time) FOR ORDER BY pg_catalog.interval_ops , FUNCTION 8 (time, time) gbt_time_distance (internal, time, int2, oid) , FUNCTION 9 (time, time) gbt_time_fetch (internal) ; CREATE OPERATOR CLASS gist_timetz_ops DEFAULT FOR TYPE timetz USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_timetz_consistent (internal, timetz, int2, oid, internal), FUNCTION 2 gbt_time_union (bytea, internal), FUNCTION 3 gbt_timetz_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_time_penalty (internal, internal, internal), FUNCTION 6 gbt_time_picksplit (internal, internal), FUNCTION 7 gbt_time_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_timetz_ops USING gist ADD OPERATOR 6 <> (timetz, timetz) ; -- no 'fetch' function, as the compress function is lossy. -- -- -- -- date ops -- -- -- CREATE FUNCTION gbt_date_consistent(internal,date,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_date_distance(internal,date,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_date_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_date_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_date_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_date_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_date_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_date_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_date_ops DEFAULT FOR TYPE date USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_date_consistent (internal, date, int2, oid, internal), FUNCTION 2 gbt_date_union (bytea, internal), FUNCTION 3 gbt_date_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_date_penalty (internal, internal, internal), FUNCTION 6 gbt_date_picksplit (internal, internal), FUNCTION 7 gbt_date_same (internal, internal, internal), STORAGE gbtreekey8; ALTER OPERATOR FAMILY gist_date_ops USING gist ADD OPERATOR 6 <> (date, date) , OPERATOR 15 <-> (date, date) FOR ORDER BY pg_catalog.integer_ops , FUNCTION 8 (date, date) gbt_date_distance (internal, date, int2, oid) , FUNCTION 9 (date, date) gbt_date_fetch (internal) ; -- -- -- -- interval ops -- -- -- CREATE FUNCTION gbt_intv_consistent(internal,interval,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_intv_distance(internal,interval,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_intv_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_intv_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_intv_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_intv_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_intv_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_intv_union(bytea, internal) RETURNS gbtreekey32 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_intv_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_interval_ops DEFAULT FOR TYPE interval USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_intv_consistent (internal, interval, int2, oid, internal), FUNCTION 2 gbt_intv_union (bytea, internal), FUNCTION 3 gbt_intv_compress (internal), FUNCTION 4 gbt_intv_decompress (internal), FUNCTION 5 gbt_intv_penalty (internal, internal, internal), FUNCTION 6 gbt_intv_picksplit (internal, internal), FUNCTION 7 gbt_intv_same (internal, internal, internal), STORAGE gbtreekey32; ALTER OPERATOR FAMILY gist_interval_ops USING gist ADD OPERATOR 6 <> (interval, interval) , OPERATOR 15 <-> (interval, interval) FOR ORDER BY pg_catalog.interval_ops , FUNCTION 8 (interval, interval) gbt_intv_distance (internal, interval, int2, oid) , FUNCTION 9 (interval, interval) gbt_intv_fetch (internal) ; -- -- -- -- cash ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_cash_consistent(internal,money,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_cash_distance(internal,money,int2,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_cash_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_cash_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_cash_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_cash_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_cash_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_cash_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_cash_ops DEFAULT FOR TYPE money USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_cash_consistent (internal, money, int2, oid, internal), FUNCTION 2 gbt_cash_union (bytea, internal), FUNCTION 3 gbt_cash_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_cash_penalty (internal, internal, internal), FUNCTION 6 gbt_cash_picksplit (internal, internal), FUNCTION 7 gbt_cash_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_cash_ops USING gist ADD OPERATOR 6 <> (money, money) , OPERATOR 15 <-> (money, money) FOR ORDER BY pg_catalog.money_ops , FUNCTION 8 (money, money) gbt_cash_distance (internal, money, int2, oid) , FUNCTION 9 (money, money) gbt_cash_fetch (internal) ; -- -- -- -- macaddr ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_macad_consistent(internal,macaddr,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_macad_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_macad_fetch(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_macad_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_macad_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_macad_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_macad_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_macaddr_ops DEFAULT FOR TYPE macaddr USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_macad_consistent (internal, macaddr, int2, oid, internal), FUNCTION 2 gbt_macad_union (bytea, internal), FUNCTION 3 gbt_macad_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_macad_penalty (internal, internal, internal), FUNCTION 6 gbt_macad_picksplit (internal, internal), FUNCTION 7 gbt_macad_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_macaddr_ops USING gist ADD OPERATOR 6 <> (macaddr, macaddr) , FUNCTION 9 (macaddr, macaddr) gbt_macad_fetch (internal); -- -- -- -- text/ bpchar ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_text_consistent(internal,text,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bpchar_consistent(internal,bpchar,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_text_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bpchar_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_text_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_text_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_text_union(bytea, internal) RETURNS gbtreekey_var AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_text_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_text_ops DEFAULT FOR TYPE text USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_text_consistent (internal, text, int2, oid, internal), FUNCTION 2 gbt_text_union (bytea, internal), FUNCTION 3 gbt_text_compress (internal), FUNCTION 4 gbt_var_decompress (internal), FUNCTION 5 gbt_text_penalty (internal, internal, internal), FUNCTION 6 gbt_text_picksplit (internal, internal), FUNCTION 7 gbt_text_same (internal, internal, internal), STORAGE gbtreekey_var; ALTER OPERATOR FAMILY gist_text_ops USING gist ADD OPERATOR 6 <> (text, text) , FUNCTION 9 (text, text) gbt_var_fetch (internal) ; ---- Create the operator class CREATE OPERATOR CLASS gist_bpchar_ops DEFAULT FOR TYPE bpchar USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_bpchar_consistent (internal, bpchar , int2, oid, internal), FUNCTION 2 gbt_text_union (bytea, internal), FUNCTION 3 gbt_bpchar_compress (internal), FUNCTION 4 gbt_var_decompress (internal), FUNCTION 5 gbt_text_penalty (internal, internal, internal), FUNCTION 6 gbt_text_picksplit (internal, internal), FUNCTION 7 gbt_text_same (internal, internal, internal), STORAGE gbtreekey_var; ALTER OPERATOR FAMILY gist_bpchar_ops USING gist ADD OPERATOR 6 <> (bpchar, bpchar) , FUNCTION 9 (bpchar, bpchar) gbt_var_fetch (internal) ; -- -- -- bytea ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_bytea_consistent(internal,bytea,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bytea_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bytea_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bytea_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bytea_union(bytea, internal) RETURNS gbtreekey_var AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bytea_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_bytea_ops DEFAULT FOR TYPE bytea USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_bytea_consistent (internal, bytea, int2, oid, internal), FUNCTION 2 gbt_bytea_union (bytea, internal), FUNCTION 3 gbt_bytea_compress (internal), FUNCTION 4 gbt_var_decompress (internal), FUNCTION 5 gbt_bytea_penalty (internal, internal, internal), FUNCTION 6 gbt_bytea_picksplit (internal, internal), FUNCTION 7 gbt_bytea_same (internal, internal, internal), STORAGE gbtreekey_var; ALTER OPERATOR FAMILY gist_bytea_ops USING gist ADD OPERATOR 6 <> (bytea, bytea) , FUNCTION 9 (bytea, bytea) gbt_var_fetch (internal) ; -- -- -- -- numeric ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_numeric_consistent(internal,numeric,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_numeric_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_numeric_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_numeric_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_numeric_union(bytea, internal) RETURNS gbtreekey_var AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_numeric_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_numeric_ops DEFAULT FOR TYPE numeric USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_numeric_consistent (internal, numeric, int2, oid, internal), FUNCTION 2 gbt_numeric_union (bytea, internal), FUNCTION 3 gbt_numeric_compress (internal), FUNCTION 4 gbt_var_decompress (internal), FUNCTION 5 gbt_numeric_penalty (internal, internal, internal), FUNCTION 6 gbt_numeric_picksplit (internal, internal), FUNCTION 7 gbt_numeric_same (internal, internal, internal), STORAGE gbtreekey_var; ALTER OPERATOR FAMILY gist_numeric_ops USING gist ADD OPERATOR 6 <> (numeric, numeric) , FUNCTION 9 (numeric, numeric) gbt_var_fetch (internal) ; -- -- -- bit ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_bit_consistent(internal,bit,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bit_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bit_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bit_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bit_union(bytea, internal) RETURNS gbtreekey_var AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_bit_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_bit_ops DEFAULT FOR TYPE bit USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_bit_consistent (internal, bit, int2, oid, internal), FUNCTION 2 gbt_bit_union (bytea, internal), FUNCTION 3 gbt_bit_compress (internal), FUNCTION 4 gbt_var_decompress (internal), FUNCTION 5 gbt_bit_penalty (internal, internal, internal), FUNCTION 6 gbt_bit_picksplit (internal, internal), FUNCTION 7 gbt_bit_same (internal, internal, internal), STORAGE gbtreekey_var; ALTER OPERATOR FAMILY gist_bit_ops USING gist ADD OPERATOR 6 <> (bit, bit) , FUNCTION 9 (bit, bit) gbt_var_fetch (internal) ; -- Create the operator class CREATE OPERATOR CLASS gist_vbit_ops DEFAULT FOR TYPE varbit USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_bit_consistent (internal, bit, int2, oid, internal), FUNCTION 2 gbt_bit_union (bytea, internal), FUNCTION 3 gbt_bit_compress (internal), FUNCTION 4 gbt_var_decompress (internal), FUNCTION 5 gbt_bit_penalty (internal, internal, internal), FUNCTION 6 gbt_bit_picksplit (internal, internal), FUNCTION 7 gbt_bit_same (internal, internal, internal), STORAGE gbtreekey_var; ALTER OPERATOR FAMILY gist_vbit_ops USING gist ADD OPERATOR 6 <> (varbit, varbit) , FUNCTION 9 (varbit, varbit) gbt_var_fetch (internal) ; -- -- -- -- inet/cidr ops -- -- -- -- define the GiST support methods CREATE FUNCTION gbt_inet_consistent(internal,inet,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_inet_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_inet_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_inet_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_inet_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION gbt_inet_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Create the operator class CREATE OPERATOR CLASS gist_inet_ops DEFAULT FOR TYPE inet USING gist AS OPERATOR 1 < , OPERATOR 2 <= , OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , FUNCTION 1 gbt_inet_consistent (internal, inet, int2, oid, internal), FUNCTION 2 gbt_inet_union (bytea, internal), FUNCTION 3 gbt_inet_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_inet_penalty (internal, internal, internal), FUNCTION 6 gbt_inet_picksplit (internal, internal), FUNCTION 7 gbt_inet_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_inet_ops USING gist ADD OPERATOR 6 <> (inet, inet) ; -- no fetch support, the compress function is lossy -- Create the operator class CREATE OPERATOR CLASS gist_cidr_ops DEFAULT FOR TYPE cidr USING gist AS OPERATOR 1 < (inet, inet) , OPERATOR 2 <= (inet, inet) , OPERATOR 3 = (inet, inet) , OPERATOR 4 >= (inet, inet) , OPERATOR 5 > (inet, inet) , FUNCTION 1 gbt_inet_consistent (internal, inet, int2, oid, internal), FUNCTION 2 gbt_inet_union (bytea, internal), FUNCTION 3 gbt_inet_compress (internal), FUNCTION 4 gbt_decompress (internal), FUNCTION 5 gbt_inet_penalty (internal, internal, internal), FUNCTION 6 gbt_inet_picksplit (internal, internal), FUNCTION 7 gbt_inet_same (internal, internal, internal), STORAGE gbtreekey16; ALTER OPERATOR FAMILY gist_cidr_ops USING gist ADD OPERATOR 6 <> (inet, inet) ; -- no fetch support, the compress function is lossy
the_stack
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for QRTZ_BLOB_TRIGGERS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`; CREATE TABLE `QRTZ_BLOB_TRIGGERS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `BLOB_DATA` blob NULL, PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_CALENDARS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_CALENDARS`; CREATE TABLE `QRTZ_CALENDARS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `CALENDAR_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `CALENDAR` blob NOT NULL, PRIMARY KEY (`SCHED_NAME`, `CALENDAR_NAME`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_CRON_TRIGGERS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`; CREATE TABLE `QRTZ_CRON_TRIGGERS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `CRON_EXPRESSION` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TIME_ZONE_ID` varchar(80) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_FIRED_TRIGGERS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`; CREATE TABLE `QRTZ_FIRED_TRIGGERS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `ENTRY_ID` varchar(95) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `INSTANCE_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `FIRED_TIME` bigint(13) NOT NULL, `SCHED_TIME` bigint(13) NOT NULL, `PRIORITY` int(11) NOT NULL, `STATE` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `JOB_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `JOB_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, PRIMARY KEY (`SCHED_NAME`, `ENTRY_ID`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_JOB_DETAILS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`; CREATE TABLE `QRTZ_JOB_DETAILS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `JOB_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `JOB_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `DESCRIPTION` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `IS_DURABLE` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `JOB_DATA` blob NULL, PRIMARY KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_LOCKS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_LOCKS`; CREATE TABLE `QRTZ_LOCKS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `LOCK_NAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`SCHED_NAME`, `LOCK_NAME`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_PAUSED_TRIGGER_GRPS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`; CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`SCHED_NAME`, `TRIGGER_GROUP`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_SCHEDULER_STATE -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`; CREATE TABLE `QRTZ_SCHEDULER_STATE` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `INSTANCE_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `LAST_CHECKIN_TIME` bigint(13) NOT NULL, `CHECKIN_INTERVAL` bigint(13) NOT NULL, PRIMARY KEY (`SCHED_NAME`, `INSTANCE_NAME`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_SIMPLE_TRIGGERS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`; CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `REPEAT_COUNT` bigint(7) NOT NULL, `REPEAT_INTERVAL` bigint(12) NOT NULL, `TIMES_TRIGGERED` bigint(10) NOT NULL, PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_SIMPROP_TRIGGERS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`; CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `STR_PROP_1` varchar(512) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `STR_PROP_2` varchar(512) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `STR_PROP_3` varchar(512) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `INT_PROP_1` int(11) NULL DEFAULT NULL, `INT_PROP_2` int(11) NULL DEFAULT NULL, `LONG_PROP_1` bigint(20) NULL DEFAULT NULL, `LONG_PROP_2` bigint(20) NULL DEFAULT NULL, `DEC_PROP_1` decimal(13, 4) NULL DEFAULT NULL, `DEC_PROP_2` decimal(13, 4) NULL DEFAULT NULL, `BOOL_PROP_1` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `BOOL_PROP_2` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for QRTZ_TRIGGERS -- ---------------------------- DROP TABLE IF EXISTS `QRTZ_TRIGGERS`; CREATE TABLE `QRTZ_TRIGGERS` ( `SCHED_NAME` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `JOB_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `JOB_GROUP` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `DESCRIPTION` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `NEXT_FIRE_TIME` bigint(13) NULL DEFAULT NULL, `PREV_FIRE_TIME` bigint(13) NULL DEFAULT NULL, `PRIORITY` int(11) NULL DEFAULT NULL, `TRIGGER_STATE` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `TRIGGER_TYPE` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `START_TIME` bigint(13) NOT NULL, `END_TIME` bigint(13) NULL DEFAULT NULL, `CALENDAR_NAME` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `MISFIRE_INSTR` smallint(2) NULL DEFAULT NULL, `JOB_DATA` blob NULL, PRIMARY KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) USING BTREE, INDEX `SCHED_NAME`(`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) USING BTREE, CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for access_log -- ---------------------------- DROP TABLE IF EXISTS `access_log`; CREATE TABLE `access_log` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `resource_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `resource_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `access_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `access_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0), `duration` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for dashboard -- ---------------------------- DROP TABLE IF EXISTS `dashboard`; CREATE TABLE `dashboard` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `config` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `thumbnail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0), `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `status` tinyint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for datachart -- ---------------------------- DROP TABLE IF EXISTS `datachart`; CREATE TABLE `datachart` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `view_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `config` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `thumbnail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0), `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `status` tinyint(6) NULL DEFAULT 1, PRIMARY KEY (`id`) USING BTREE, INDEX `view_id`(`view_id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for download -- ---------------------------- DROP TABLE IF EXISTS `download`; CREATE TABLE `download` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `path` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `last_download_time` timestamp(0) NULL DEFAULT NULL, `create_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `create_by` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `status` tinyint(6) NOT NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `create_by`(`create_by`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for folder -- ---------------------------- DROP TABLE IF EXISTS `folder`; CREATE TABLE `folder` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `rel_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `rel_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `parent_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `index` double(16, 8) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `name_unique`(`name`, `org_id`, `parent_id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE, INDEX `rel_id`(`rel_id`) USING BTREE, INDEX `parent_id`(`parent_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for link -- ---------------------------- DROP TABLE IF EXISTS `link`; CREATE TABLE `link` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `rel_type` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `rel_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `expiration` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0), `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for org_settings -- ---------------------------- DROP TABLE IF EXISTS `org_settings`; CREATE TABLE `org_settings` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `type` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `config` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for organization -- ---------------------------- DROP TABLE IF EXISTS `organization`; CREATE TABLE `organization` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `create_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `update_time` datetime(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `orgName`(`name`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rel_role_resource -- ---------------------------- DROP TABLE IF EXISTS `rel_role_resource`; CREATE TABLE `rel_role_resource` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `role_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `resource_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `resource_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `permission` int(11) NOT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `role_id_2`(`role_id`, `resource_id`, `resource_type`) USING BTREE, INDEX `role_id`(`role_id`) USING BTREE, INDEX `resource_id`(`resource_id`) USING BTREE, INDEX `resource_type`(`resource_type`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rel_role_user -- ---------------------------- DROP TABLE IF EXISTS `rel_role_user`; CREATE TABLE `rel_role_user` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `role_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `user_role`(`user_id`, `role_id`) USING BTREE, INDEX `user_id`(`user_id`) USING BTREE, INDEX `role_id`(`role_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rel_subject_columns -- ---------------------------- DROP TABLE IF EXISTS `rel_subject_columns`; CREATE TABLE `rel_subject_columns` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `view_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `subject_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `subject_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `column_permission` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), PRIMARY KEY (`id`) USING BTREE, INDEX `view_id`(`view_id`) USING BTREE, INDEX `subject_id`(`subject_id`) USING BTREE, INDEX `subject_type`(`subject_type`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rel_user_organization -- ---------------------------- DROP TABLE IF EXISTS `rel_user_organization`; CREATE TABLE `rel_user_organization` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `org_user`(`org_id`, `user_id`) USING BTREE, INDEX `user_id`(`user_id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rel_variable_subject -- ---------------------------- DROP TABLE IF EXISTS `rel_variable_subject`; CREATE TABLE `rel_variable_subject` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `variable_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `subject_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `subject_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0), `use_default_value` tinyint(4) NOT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `user_var`(`variable_id`, `subject_type`, `subject_id`) USING BTREE, INDEX `variable_id`(`variable_id`) USING BTREE, INDEX `subject_id`(`subject_id`) USING BTREE, INDEX `subject_type`(`subject_type`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rel_widget_element -- ---------------------------- DROP TABLE IF EXISTS `rel_widget_element`; CREATE TABLE `rel_widget_element` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `widget_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `rel_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `rel_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `rel_id`(`rel_id`) USING BTREE, INDEX `rel_type`(`rel_type`) USING BTREE, INDEX `widget_id`(`widget_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rel_widget_widget -- ---------------------------- DROP TABLE IF EXISTS `rel_widget_widget`; CREATE TABLE `rel_widget_widget` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `source_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `target_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `config` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `source_id`(`source_id`) USING BTREE, INDEX `target_id`(`target_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for role -- ---------------------------- DROP TABLE IF EXISTS `role`; CREATE TABLE `role` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `ord_and_name`(`org_id`, `name`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE, INDEX `type`(`type`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for schedule -- ---------------------------- DROP TABLE IF EXISTS `schedule`; CREATE TABLE `schedule` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `active` tinyint(4) NOT NULL, `cron_expression` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `start_date` timestamp(0) NULL DEFAULT NULL, `end_date` timestamp(0) NULL DEFAULT NULL, `config` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `create_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `parent_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `is_folder` tinyint(1) NULL DEFAULT NULL, `index` int(11) NULL DEFAULT NULL, `status` tinyint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE, INDEX `create_by`(`create_by`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for schedule_log -- ---------------------------- DROP TABLE IF EXISTS `schedule_log`; CREATE TABLE `schedule_log` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `schedule_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `start` timestamp(0) NULL DEFAULT NULL, `end` timestamp(0) NULL DEFAULT NULL, `status` int(11) NOT NULL, `message` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `schedule_id`(`schedule_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for source -- ---------------------------- DROP TABLE IF EXISTS `source`; CREATE TABLE `source` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `config` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `status` tinyint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `org_name`(`name`, `org_id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for storyboard -- ---------------------------- DROP TABLE IF EXISTS `storyboard`; CREATE TABLE `storyboard` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `config` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `status` tinyint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for storypage -- ---------------------------- DROP TABLE IF EXISTS `storypage`; CREATE TABLE `storypage` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `storyboard_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `rel_type` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `rel_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `config` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `storyboard_id`(`storyboard_id`) USING BTREE, INDEX `rel_type`(`rel_type`) USING BTREE, INDEX `rel_id`(`rel_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for user -- ---------------------------- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `active` tinyint(1) NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `username`(`username`) USING BTREE, UNIQUE INDEX `email`(`email`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for user_settings -- ---------------------------- DROP TABLE IF EXISTS `user_settings`; CREATE TABLE `user_settings` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `rel_type` varchar(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `rel_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, `config` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `user_id`(`user_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for variable -- ---------------------------- DROP TABLE IF EXISTS `variable`; CREATE TABLE `variable` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `view_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `value_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `permission` int(11) NULL DEFAULT NULL, `encrypt` tinyint(4) NULL DEFAULT NULL, `label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `default_value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `expression` tinyint(4) NULL DEFAULT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `org_id`(`org_id`, `view_id`, `name`) USING BTREE, INDEX `org_id_2`(`org_id`) USING BTREE, INDEX `view_id`(`view_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for view -- ---------------------------- DROP TABLE IF EXISTS `view`; CREATE TABLE `view` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `org_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `source_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `script` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `model` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `config` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `parent_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `is_folder` tinyint(1) NULL DEFAULT NULL, `index` double(16, 8) NULL DEFAULT NULL, `status` tinyint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `unique_name`(`name`, `org_id`, `parent_id`) USING BTREE, INDEX `org_id`(`org_id`) USING BTREE, INDEX `source_id`(`source_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for widget -- ---------------------------- DROP TABLE IF EXISTS `widget`; CREATE TABLE `widget` ( `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `dashboard_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `config` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `parent_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `create_time` timestamp(0) NULL DEFAULT NULL, `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_time` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), PRIMARY KEY (`id`) USING BTREE, INDEX `dashboard_id`(`dashboard_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1;
the_stack
---- Licensed to the Apache Software Foundation (ASF) under one ---- or more contributor license agreements. See the NOTICE file ---- distributed with this work for additional information ---- regarding copyright ownership. The ASF licenses this file ---- to you under the Apache License, Version 2.0 (the ---- "License"); you may not use this file except in compliance ---- with the License. You may obtain a copy of the License at ---- ---- http://www.apache.org/licenses/LICENSE-2.0 ---- ---- Unless required by applicable law or agreed to in writing, ---- software distributed under the License is distributed on an ---- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ---- KIND, either express or implied. See the License for the ---- specific language governing permissions and limitations ---- under the License. -- Create text tables on top of raw text data. CREATE DATABASE IF NOT EXISTS tpcds_raw; DROP TABLE IF EXISTS tpcds_raw.call_center; DROP TABLE IF EXISTS tpcds_raw.catalog_page; DROP TABLE IF EXISTS tpcds_raw.catalog_returns; DROP TABLE IF EXISTS tpcds_raw.catalog_sales; DROP TABLE IF EXISTS tpcds_raw.customer; DROP TABLE IF EXISTS tpcds_raw.customer_address; DROP TABLE IF EXISTS tpcds_raw.customer_demographics; DROP TABLE IF EXISTS tpcds_raw.date_dim; DROP TABLE IF EXISTS tpcds_raw.household_demographics; DROP TABLE IF EXISTS tpcds_raw.income_band; DROP TABLE IF EXISTS tpcds_raw.inventory; DROP TABLE IF EXISTS tpcds_raw.item; DROP TABLE IF EXISTS tpcds_raw.promotion; DROP TABLE IF EXISTS tpcds_raw.ship_mode; DROP TABLE IF EXISTS tpcds_raw.store; DROP TABLE IF EXISTS tpcds_raw.store_returns; DROP TABLE IF EXISTS tpcds_raw.store_sales; DROP TABLE IF EXISTS tpcds_raw.time_dim; DROP TABLE IF EXISTS tpcds_raw.warehouse; DROP TABLE IF EXISTS tpcds_raw.web_page; DROP TABLE IF EXISTS tpcds_raw.web_returns; DROP TABLE IF EXISTS tpcds_raw.web_sales; DROP TABLE IF EXISTS tpcds_raw.web_site; CREATE EXTERNAL TABLE tpcds_raw.call_center ( cc_call_center_sk INT, cc_call_center_id STRING, cc_rec_start_date STRING, cc_rec_end_date STRING, cc_closed_date_sk INT, cc_open_date_sk INT, cc_name STRING, cc_class STRING, cc_employees INT, cc_sq_ft INT, cc_hours STRING, cc_manager STRING, cc_mkt_id INT, cc_mkt_class STRING, cc_mkt_desc STRING, cc_market_manager STRING, cc_division INT, cc_division_name STRING, cc_company INT, cc_company_name STRING, cc_street_number STRING, cc_street_name STRING, cc_street_type STRING, cc_suite_number STRING, cc_city STRING, cc_county STRING, cc_state STRING, cc_zip STRING, cc_country STRING, cc_gmt_offset DECIMAL(5,2), cc_tax_percentage DECIMAL(5,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/call_center' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.catalog_page ( cp_catalog_page_sk INT, cp_catalog_page_id STRING, cp_start_date_sk INT, cp_end_date_sk INT, cp_department STRING, cp_catalog_number INT, cp_catalog_page_number INT, cp_description STRING, cp_type STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/catalog_page' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.catalog_returns ( cr_returned_date_sk INT, cr_returned_time_sk INT, cr_item_sk BIGINT, cr_refunded_customer_sk INT, cr_refunded_cdemo_sk INT, cr_refunded_hdemo_sk INT, cr_refunded_addr_sk INT, cr_returning_customer_sk INT, cr_returning_cdemo_sk INT, cr_returning_hdemo_sk INT, cr_returning_addr_sk INT, cr_call_center_sk INT, cr_catalog_page_sk INT, cr_ship_mode_sk INT, cr_warehouse_sk INT, cr_reason_sk INT, cr_order_number BIGINT, cr_return_quantity INT, cr_return_amount DECIMAL(7,2), cr_return_tax DECIMAL(7,2), cr_return_amt_inc_tax DECIMAL(7,2), cr_fee DECIMAL(7,2), cr_return_ship_cost DECIMAL(7,2), cr_refunded_cash DECIMAL(7,2), cr_reversed_charge DECIMAL(7,2), cr_store_credit DECIMAL(7,2), cr_net_loss DECIMAL(7,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/catalog_returns' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.catalog_sales ( cs_sold_date_sk INT, cs_sold_time_sk INT, cs_ship_date_sk INT, cs_bill_customer_sk INT, cs_bill_cdemo_sk INT, cs_bill_hdemo_sk INT, cs_bill_addr_sk INT, cs_ship_customer_sk INT, cs_ship_cdemo_sk INT, cs_ship_hdemo_sk INT, cs_ship_addr_sk INT, cs_call_center_sk INT, cs_catalog_page_sk INT, cs_ship_mode_sk INT, cs_warehouse_sk INT, cs_item_sk BIGINT, cs_promo_sk INT, cs_order_number BIGINT, cs_quantity INT, cs_wholesale_cost DECIMAL(7,2), cs_list_price DECIMAL(7,2), cs_sales_price DECIMAL(7,2), cs_ext_discount_amt DECIMAL(7,2), cs_ext_sales_price DECIMAL(7,2), cs_ext_wholesale_cost DECIMAL(7,2), cs_ext_list_price DECIMAL(7,2), cs_ext_tax DECIMAL(7,2), cs_coupon_amt DECIMAL(7,2), cs_ext_ship_cost DECIMAL(7,2), cs_net_paid DECIMAL(7,2), cs_net_paid_inc_tax DECIMAL(7,2), cs_net_paid_inc_ship DECIMAL(7,2), cs_net_paid_inc_ship_tax DECIMAL(7,2), cs_net_profit DECIMAL(7,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/catalog_sales' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.customer ( c_customer_sk INT, c_customer_id STRING, c_current_cdemo_sk INT, c_current_hdemo_sk INT, c_current_addr_sk INT, c_first_shipto_date_sk INT, c_first_sales_date_sk INT, c_salutation STRING, c_first_name STRING, c_last_name STRING, c_preferred_cust_flag STRING, c_birth_day INT, c_birth_month INT, c_birth_year INT, c_birth_country STRING, c_login STRING, c_email_address STRING, c_last_review_date STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/customer' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.customer_address ( ca_address_sk INT, ca_address_id STRING, ca_street_number STRING, ca_street_name STRING, ca_street_type STRING, ca_suite_number STRING, ca_city STRING, ca_county STRING, ca_state STRING, ca_zip STRING, ca_country STRING, ca_gmt_offset DECIMAL(5,2), ca_location_type STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/customer_address' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.customer_demographics ( cd_demo_sk INT, cd_gender STRING, cd_marital_status STRING, cd_education_status STRING, cd_purchase_estimate INT, cd_credit_rating STRING, cd_dep_count INT, cd_dep_employed_count INT, cd_dep_college_count INT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/customer_demographics' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.date_dim ( d_date_sk INT, d_date_id STRING, d_date STRING, d_month_seq INT, d_week_seq INT, d_quarter_seq INT, d_year INT, d_dow INT, d_moy INT, d_dom INT, d_qoy INT, d_fy_year INT, d_fy_quarter_seq INT, d_fy_week_seq INT, d_day_name STRING, d_quarter_name STRING, d_holiday STRING, d_weekend STRING, d_following_holiday STRING, d_first_dom INT, d_last_dom INT, d_same_day_ly INT, d_same_day_lq INT, d_current_day STRING, d_current_week STRING, d_current_month STRING, d_current_quarter STRING, d_current_year STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/date_dim' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.household_demographics ( hd_demo_sk INT, hd_income_band_sk INT, hd_buy_potential STRING, hd_dep_count INT, hd_vehicle_count INT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/household_demographics' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.income_band ( ib_income_band_sk INT, ib_lower_bound INT, ib_upper_bound INT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/income_band' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.inventory ( inv_date_sk INT, inv_item_sk BIGINT, inv_warehouse_sk INT, inv_quantity_on_hand INT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/inventory' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.item ( i_item_sk BIGINT, i_item_id STRING, i_rec_start_date STRING, i_rec_end_date STRING, i_item_desc STRING, i_current_price DECIMAL(7,2), i_wholesale_cost DECIMAL(7,2), i_brand_id INT, i_brand STRING, i_class_id INT, i_class STRING, i_category_id INT, i_category STRING, i_manufact_id INT, i_manufact STRING, i_size STRING, i_formulation STRING, i_color STRING, i_units STRING, i_container STRING, i_manager_id INT, i_product_name STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/item' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.promotion ( p_promo_sk INT, p_promo_id STRING, p_start_date_sk INT, p_end_date_sk INT, p_item_sk BIGINT, p_cost DECIMAL(15,2), p_response_target INT, p_promo_name STRING, p_channel_dmail STRING, p_channel_email STRING, p_channel_catalog STRING, p_channel_tv STRING, p_channel_radio STRING, p_channel_press STRING, p_channel_event STRING, p_channel_demo STRING, p_channel_details STRING, p_purpose STRING, p_discount_active STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/promotion' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.ship_mode ( sm_ship_mode_sk INT, sm_ship_mode_id STRING, sm_type STRING, sm_code STRING, sm_carrier STRING, sm_contract STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/ship_mode' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.store ( s_store_sk INT, s_store_id STRING, s_rec_start_date STRING, s_rec_end_date STRING, s_closed_date_sk INT, s_store_name STRING, s_number_employees INT, s_floor_space INT, s_hours STRING, s_manager STRING, s_market_id INT, s_geography_class STRING, s_market_desc STRING, s_market_manager STRING, s_division_id INT, s_division_name STRING, s_company_id INT, s_company_name STRING, s_street_number STRING, s_street_name STRING, s_street_type STRING, s_suite_number STRING, s_city STRING, s_county STRING, s_state STRING, s_zip STRING, s_country STRING, s_gmt_offset DECIMAL(5,2), s_tax_precentage DECIMAL(5,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/store' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.store_returns ( sr_returned_date_sk INT, sr_return_time_sk INT, sr_item_sk BIGINT, sr_customer_sk INT, sr_cdemo_sk INT, sr_hdemo_sk INT, sr_addr_sk INT, sr_store_sk INT, sr_reason_sk INT, sr_ticket_number BIGINT, sr_return_quantity INT, sr_return_amt DECIMAL(7,2), sr_return_tax DECIMAL(7,2), sr_return_amt_inc_tax DECIMAL(7,2), sr_fee DECIMAL(7,2), sr_return_ship_cost DECIMAL(7,2), sr_refunded_cash DECIMAL(7,2), sr_reversed_charge DECIMAL(7,2), sr_store_credit DECIMAL(7,2), sr_net_loss DECIMAL(7,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/store_returns' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.store_sales ( ss_sold_date_sk INT, ss_sold_time_sk INT, ss_item_sk BIGINT, ss_customer_sk INT, ss_cdemo_sk INT, ss_hdemo_sk INT, ss_addr_sk INT, ss_store_sk INT, ss_promo_sk INT, ss_ticket_number BIGINT, ss_quantity INT, ss_wholesale_cost DECIMAL(7,2), ss_list_price DECIMAL(7,2), ss_sales_price DECIMAL(7,2), ss_ext_discount_amt DECIMAL(7,2), ss_ext_sales_price DECIMAL(7,2), ss_ext_wholesale_cost DECIMAL(7,2), ss_ext_list_price DECIMAL(7,2), ss_ext_tax DECIMAL(7,2), ss_coupon_amt DECIMAL(7,2), ss_net_paid DECIMAL(7,2), ss_net_paid_inc_tax DECIMAL(7,2), ss_net_profit DECIMAL(7,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/store_sales' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.time_dim ( t_time_sk INT, t_time_id STRING, t_time INT, t_hour INT, t_minute INT, t_second INT, t_am_pm STRING, t_shift STRING, t_sub_shift STRING, t_meal_time STRING ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/time_dim' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.warehouse ( w_warehouse_sk INT, w_warehouse_id STRING, w_warehouse_name STRING, w_warehouse_sq_ft INT, w_street_number STRING, w_street_name STRING, w_street_type STRING, w_suite_number STRING, w_city STRING, w_county STRING, w_state STRING, w_zip STRING, w_country STRING, w_gmt_offset DECIMAL(5,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/warehouse' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.web_page ( wp_web_page_sk INT, wp_web_page_id STRING, wp_rec_start_date STRING, wp_rec_end_date STRING, wp_creation_date_sk INT, wp_access_date_sk INT, wp_autogen_flag STRING, wp_customer_sk INT, wp_url STRING, wp_type STRING, wp_char_count INT, wp_link_count INT, wp_image_count INT, wp_max_ad_count INT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/web_page' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.web_returns ( wr_returned_date_sk INT, wr_returned_time_sk INT, wr_item_sk BIGINT, wr_refunded_customer_sk INT, wr_refunded_cdemo_sk INT, wr_refunded_hdemo_sk INT, wr_refunded_addr_sk INT, wr_returning_customer_sk INT, wr_returning_cdemo_sk INT, wr_returning_hdemo_sk INT, wr_returning_addr_sk INT, wr_web_page_sk INT, wr_reason_sk INT, wr_order_number BIGINT, wr_return_quantity INT, wr_return_amt DECIMAL(7,2), wr_return_tax DECIMAL(7,2), wr_return_amt_inc_tax DECIMAL(7,2), wr_fee DECIMAL(7,2), wr_return_ship_cost DECIMAL(7,2), wr_refunded_cash DECIMAL(7,2), wr_reversed_charge DECIMAL(7,2), wr_account_credit DECIMAL(7,2), wr_net_loss DECIMAL(7,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/web_returns' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.web_sales ( ws_sold_date_sk INT, ws_sold_time_sk INT, ws_ship_date_sk INT, ws_item_sk BIGINT, ws_bill_customer_sk INT, ws_bill_cdemo_sk INT, ws_bill_hdemo_sk INT, ws_bill_addr_sk INT, ws_ship_customer_sk INT, ws_ship_cdemo_sk INT, ws_ship_hdemo_sk INT, ws_ship_addr_sk INT, ws_web_page_sk INT, ws_web_site_sk INT, ws_ship_mode_sk INT, ws_warehouse_sk INT, ws_promo_sk INT, ws_order_number BIGINT, ws_quantity INT, ws_wholesale_cost DECIMAL(7,2), ws_list_price DECIMAL(7,2), ws_sales_price DECIMAL(7,2), ws_ext_discount_amt DECIMAL(7,2), ws_ext_sales_price DECIMAL(7,2), ws_ext_wholesale_cost DECIMAL(7,2), ws_ext_list_price DECIMAL(7,2), ws_ext_tax DECIMAL(7,2), ws_coupon_amt DECIMAL(7,2), ws_ext_ship_cost DECIMAL(7,2), ws_net_paid DECIMAL(7,2), ws_net_paid_inc_tax DECIMAL(7,2), ws_net_paid_inc_ship DECIMAL(7,2), ws_net_paid_inc_ship_tax DECIMAL(7,2), ws_net_profit DECIMAL(7,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/web_sales' TBLPROPERTIES('serialization.null.format'=''); CREATE EXTERNAL TABLE tpcds_raw.web_site ( web_site_sk INT, web_site_id STRING, web_rec_start_date STRING, web_rec_end_date STRING, web_name STRING, web_open_date_sk INT, web_close_date_sk INT, web_class STRING, web_manager STRING, web_mkt_id INT, web_mkt_class STRING, web_mkt_desc STRING, web_market_manager STRING, web_company_id INT, web_company_name STRING, web_street_number STRING, web_street_name STRING, web_street_type STRING, web_suite_number STRING, web_city STRING, web_county STRING, web_state STRING, web_zip STRING, web_country STRING, web_gmt_offset DECIMAL(5,2), web_tax_percentage DECIMAL(5,2) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' WITH SERDEPROPERTIES ('field.delim'='|', 'serialization.format'='|') STORED AS TEXTFILE LOCATION '/user/hive/warehouse/external/tpcds_raw/web_site' TBLPROPERTIES('serialization.null.format'=''); -- Compute stats on all the tables for optimal performance. COMPUTE STATS tpcds_raw.call_center; COMPUTE STATS tpcds_raw.catalog_page; COMPUTE STATS tpcds_raw.catalog_returns; COMPUTE STATS tpcds_raw.catalog_sales; COMPUTE STATS tpcds_raw.customer; COMPUTE STATS tpcds_raw.customer_address; COMPUTE STATS tpcds_raw.customer_demographics; COMPUTE STATS tpcds_raw.date_dim; COMPUTE STATS tpcds_raw.household_demographics; COMPUTE STATS tpcds_raw.income_band; COMPUTE STATS tpcds_raw.inventory; COMPUTE STATS tpcds_raw.item; COMPUTE STATS tpcds_raw.promotion; COMPUTE STATS tpcds_raw.ship_mode; COMPUTE STATS tpcds_raw.store; COMPUTE STATS tpcds_raw.store_returns; COMPUTE STATS tpcds_raw.store_sales; COMPUTE STATS tpcds_raw.time_dim; COMPUTE STATS tpcds_raw.warehouse; COMPUTE STATS tpcds_raw.web_page; COMPUTE STATS tpcds_raw.web_returns; COMPUTE STATS tpcds_raw.web_sales; COMPUTE STATS tpcds_raw.web_site; -- Create Parquet tables based on text tables. CREATE DATABASE IF NOT EXISTS tpcds_parquet; DROP TABLE IF EXISTS tpcds_parquet.call_center; DROP TABLE IF EXISTS tpcds_parquet.catalog_page; DROP TABLE IF EXISTS tpcds_parquet.catalog_returns; DROP TABLE IF EXISTS tpcds_parquet.catalog_sales; DROP TABLE IF EXISTS tpcds_parquet.customer; DROP TABLE IF EXISTS tpcds_parquet.customer_address; DROP TABLE IF EXISTS tpcds_parquet.customer_demographics; DROP TABLE IF EXISTS tpcds_parquet.date_dim; DROP TABLE IF EXISTS tpcds_parquet.household_demographics; DROP TABLE IF EXISTS tpcds_parquet.income_band; DROP TABLE IF EXISTS tpcds_parquet.inventory; DROP TABLE IF EXISTS tpcds_parquet.item; DROP TABLE IF EXISTS tpcds_parquet.promotion; DROP TABLE IF EXISTS tpcds_parquet.ship_mode; DROP TABLE IF EXISTS tpcds_parquet.store; DROP TABLE IF EXISTS tpcds_parquet.store_returns; DROP TABLE IF EXISTS tpcds_parquet.store_sales; DROP TABLE IF EXISTS tpcds_parquet.time_dim; DROP TABLE IF EXISTS tpcds_parquet.warehouse; DROP TABLE IF EXISTS tpcds_parquet.web_page; DROP TABLE IF EXISTS tpcds_parquet.web_returns; DROP TABLE IF EXISTS tpcds_parquet.web_sales; DROP TABLE IF EXISTS tpcds_parquet.web_site; -- TODO: add sort by hints for better clustering. CREATE TABLE tpcds_parquet.call_center ( cc_call_center_sk INT, cc_call_center_id STRING, cc_rec_start_date STRING, cc_rec_end_date STRING, cc_closed_date_sk INT, cc_open_date_sk INT, cc_name STRING, cc_class STRING, cc_employees INT, cc_sq_ft INT, cc_hours STRING, cc_manager STRING, cc_mkt_id INT, cc_mkt_class STRING, cc_mkt_desc STRING, cc_market_manager STRING, cc_division INT, cc_division_name STRING, cc_company INT, cc_company_name STRING, cc_street_number STRING, cc_street_name STRING, cc_street_type STRING, cc_suite_number STRING, cc_city STRING, cc_county STRING, cc_state STRING, cc_zip STRING, cc_country STRING, cc_gmt_offset DECIMAL(5,2), cc_tax_percentage DECIMAL(5,2) ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.catalog_page ( cp_catalog_page_sk INT, cp_catalog_page_id STRING, cp_start_date_sk INT, cp_end_date_sk INT, cp_department STRING, cp_catalog_number INT, cp_catalog_page_number INT, cp_description STRING, cp_type STRING ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.catalog_returns ( cr_returned_date_sk INT, cr_returned_time_sk INT, cr_item_sk BIGINT, cr_refunded_customer_sk INT, cr_refunded_cdemo_sk INT, cr_refunded_hdemo_sk INT, cr_refunded_addr_sk INT, cr_returning_customer_sk INT, cr_returning_cdemo_sk INT, cr_returning_hdemo_sk INT, cr_returning_addr_sk INT, cr_call_center_sk INT, cr_catalog_page_sk INT, cr_ship_mode_sk INT, cr_warehouse_sk INT, cr_reason_sk INT, cr_order_number BIGINT, cr_return_quantity INT, cr_return_amount DECIMAL(7,2), cr_return_tax DECIMAL(7,2), cr_return_amt_inc_tax DECIMAL(7,2), cr_fee DECIMAL(7,2), cr_return_ship_cost DECIMAL(7,2), cr_refunded_cash DECIMAL(7,2), cr_reversed_charge DECIMAL(7,2), cr_store_credit DECIMAL(7,2), cr_net_loss DECIMAL(7,2) ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.catalog_sales ( cs_sold_date_sk INT, cs_sold_time_sk INT, cs_ship_date_sk INT, cs_bill_customer_sk INT, cs_bill_cdemo_sk INT, cs_bill_hdemo_sk INT, cs_bill_addr_sk INT, cs_ship_customer_sk INT, cs_ship_cdemo_sk INT, cs_ship_hdemo_sk INT, cs_ship_addr_sk INT, cs_call_center_sk INT, cs_catalog_page_sk INT, cs_ship_mode_sk INT, cs_warehouse_sk INT, cs_item_sk BIGINT, cs_promo_sk INT, cs_order_number BIGINT, cs_quantity INT, cs_wholesale_cost DECIMAL(7,2), cs_list_price DECIMAL(7,2), cs_sales_price DECIMAL(7,2), cs_ext_discount_amt DECIMAL(7,2), cs_ext_sales_price DECIMAL(7,2), cs_ext_wholesale_cost DECIMAL(7,2), cs_ext_list_price DECIMAL(7,2), cs_ext_tax DECIMAL(7,2), cs_coupon_amt DECIMAL(7,2), cs_ext_ship_cost DECIMAL(7,2), cs_net_paid DECIMAL(7,2), cs_net_paid_inc_tax DECIMAL(7,2), cs_net_paid_inc_ship DECIMAL(7,2), cs_net_paid_inc_ship_tax DECIMAL(7,2), cs_net_profit DECIMAL(7,2) ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.customer ( c_customer_sk INT, c_customer_id STRING, c_current_cdemo_sk INT, c_current_hdemo_sk INT, c_current_addr_sk INT, c_first_shipto_date_sk INT, c_first_sales_date_sk INT, c_salutation STRING, c_first_name STRING, c_last_name STRING, c_preferred_cust_flag STRING, c_birth_day INT, c_birth_month INT, c_birth_year INT, c_birth_country STRING, c_login STRING, c_email_address STRING, c_last_review_date STRING ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.customer_address ( ca_address_sk INT, ca_address_id STRING, ca_street_number STRING, ca_street_name STRING, ca_street_type STRING, ca_suite_number STRING, ca_city STRING, ca_county STRING, ca_state STRING, ca_zip STRING, ca_country STRING, ca_gmt_offset DECIMAL(5,2), ca_location_type STRING ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.customer_demographics ( cd_demo_sk INT, cd_gender STRING, cd_marital_status STRING, cd_education_status STRING, cd_purchase_estimate INT, cd_credit_rating STRING, cd_dep_count INT, cd_dep_employed_count INT, cd_dep_college_count INT ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.date_dim ( d_date_sk INT, d_date_id STRING, d_date STRING, d_month_seq INT, d_week_seq INT, d_quarter_seq INT, d_year INT, d_dow INT, d_moy INT, d_dom INT, d_qoy INT, d_fy_year INT, d_fy_quarter_seq INT, d_fy_week_seq INT, d_day_name STRING, d_quarter_name STRING, d_holiday STRING, d_weekend STRING, d_following_holiday STRING, d_first_dom INT, d_last_dom INT, d_same_day_ly INT, d_same_day_lq INT, d_current_day STRING, d_current_week STRING, d_current_month STRING, d_current_quarter STRING, d_current_year STRING ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.household_demographics ( hd_demo_sk INT, hd_income_band_sk INT, hd_buy_potential STRING, hd_dep_count INT, hd_vehicle_count INT ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.income_band ( ib_income_band_sk INT, ib_lower_bound INT, ib_upper_bound INT ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.inventory ( inv_date_sk INT, inv_item_sk BIGINT, inv_warehouse_sk INT, inv_quantity_on_hand INT ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.item ( i_item_sk BIGINT, i_item_id STRING, i_rec_start_date STRING, i_rec_end_date STRING, i_item_desc STRING, i_current_price DECIMAL(7,2), i_wholesale_cost DECIMAL(7,2), i_brand_id INT, i_brand STRING, i_class_id INT, i_class STRING, i_category_id INT, i_category STRING, i_manufact_id INT, i_manufact STRING, i_size STRING, i_formulation STRING, i_color STRING, i_units STRING, i_container STRING, i_manager_id INT, i_product_name STRING ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.promotion ( p_promo_sk INT, p_promo_id STRING, p_start_date_sk INT, p_end_date_sk INT, p_item_sk BIGINT, p_cost DECIMAL(15,2), p_response_target INT, p_promo_name STRING, p_channel_dmail STRING, p_channel_email STRING, p_channel_catalog STRING, p_channel_tv STRING, p_channel_radio STRING, p_channel_press STRING, p_channel_event STRING, p_channel_demo STRING, p_channel_details STRING, p_purpose STRING, p_discount_active STRING ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.ship_mode ( sm_ship_mode_sk INT, sm_ship_mode_id STRING, sm_type STRING, sm_code STRING, sm_carrier STRING, sm_contract STRING ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.store ( s_store_sk INT, s_store_id STRING, s_rec_start_date STRING, s_rec_end_date STRING, s_closed_date_sk INT, s_store_name STRING, s_number_employees INT, s_floor_space INT, s_hours STRING, s_manager STRING, s_market_id INT, s_geography_class STRING, s_market_desc STRING, s_market_manager STRING, s_division_id INT, s_division_name STRING, s_company_id INT, s_company_name STRING, s_street_number STRING, s_street_name STRING, s_street_type STRING, s_suite_number STRING, s_city STRING, s_county STRING, s_state STRING, s_zip STRING, s_country STRING, s_gmt_offset DECIMAL(5,2), s_tax_precentage DECIMAL(5,2) ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.store_returns ( sr_returned_date_sk INT, sr_return_time_sk INT, sr_item_sk BIGINT, sr_customer_sk INT, sr_cdemo_sk INT, sr_hdemo_sk INT, sr_addr_sk INT, sr_store_sk INT, sr_reason_sk INT, sr_ticket_number BIGINT, sr_return_quantity INT, sr_return_amt DECIMAL(7,2), sr_return_tax DECIMAL(7,2), sr_return_amt_inc_tax DECIMAL(7,2), sr_fee DECIMAL(7,2), sr_return_ship_cost DECIMAL(7,2), sr_refunded_cash DECIMAL(7,2), sr_reversed_charge DECIMAL(7,2), sr_store_credit DECIMAL(7,2), sr_net_loss DECIMAL(7,2) ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.store_sales ( ss_sold_time_sk INT, ss_item_sk BIGINT, ss_customer_sk INT, ss_cdemo_sk INT, ss_hdemo_sk INT, ss_addr_sk INT, ss_store_sk INT, ss_promo_sk INT, ss_ticket_number BIGINT, ss_quantity INT, ss_wholesale_cost DECIMAL(7,2), ss_list_price DECIMAL(7,2), ss_sales_price DECIMAL(7,2), ss_ext_discount_amt DECIMAL(7,2), ss_ext_sales_price DECIMAL(7,2), ss_ext_wholesale_cost DECIMAL(7,2), ss_ext_list_price DECIMAL(7,2), ss_ext_tax DECIMAL(7,2), ss_coupon_amt DECIMAL(7,2), ss_net_paid DECIMAL(7,2), ss_net_paid_inc_tax DECIMAL(7,2), ss_net_profit DECIMAL(7,2) ) PARTITIONED BY ( ss_sold_date_sk INT ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.time_dim ( t_time_sk INT, t_time_id STRING, t_time INT, t_hour INT, t_minute INT, t_second INT, t_am_pm STRING, t_shift STRING, t_sub_shift STRING, t_meal_time STRING ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.warehouse ( w_warehouse_sk INT, w_warehouse_id STRING, w_warehouse_name STRING, w_warehouse_sq_ft INT, w_street_number STRING, w_street_name STRING, w_street_type STRING, w_suite_number STRING, w_city STRING, w_county STRING, w_state STRING, w_zip STRING, w_country STRING, w_gmt_offset DECIMAL(5,2) ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.web_page ( wp_web_page_sk INT, wp_web_page_id STRING, wp_rec_start_date STRING, wp_rec_end_date STRING, wp_creation_date_sk INT, wp_access_date_sk INT, wp_autogen_flag STRING, wp_customer_sk INT, wp_url STRING, wp_type STRING, wp_char_count INT, wp_link_count INT, wp_image_count INT, wp_max_ad_count INT ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.web_returns ( wr_returned_date_sk INT, wr_returned_time_sk INT, wr_item_sk BIGINT, wr_refunded_customer_sk INT, wr_refunded_cdemo_sk INT, wr_refunded_hdemo_sk INT, wr_refunded_addr_sk INT, wr_returning_customer_sk INT, wr_returning_cdemo_sk INT, wr_returning_hdemo_sk INT, wr_returning_addr_sk INT, wr_web_page_sk INT, wr_reason_sk INT, wr_order_number BIGINT, wr_return_quantity INT, wr_return_amt DECIMAL(7,2), wr_return_tax DECIMAL(7,2), wr_return_amt_inc_tax DECIMAL(7,2), wr_fee DECIMAL(7,2), wr_return_ship_cost DECIMAL(7,2), wr_refunded_cash DECIMAL(7,2), wr_reversed_charge DECIMAL(7,2), wr_account_credit DECIMAL(7,2), wr_net_loss DECIMAL(7,2) ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.web_sales ( ws_sold_date_sk INT, ws_sold_time_sk INT, ws_ship_date_sk INT, ws_item_sk BIGINT, ws_bill_customer_sk INT, ws_bill_cdemo_sk INT, ws_bill_hdemo_sk INT, ws_bill_addr_sk INT, ws_ship_customer_sk INT, ws_ship_cdemo_sk INT, ws_ship_hdemo_sk INT, ws_ship_addr_sk INT, ws_web_page_sk INT, ws_web_site_sk INT, ws_ship_mode_sk INT, ws_warehouse_sk INT, ws_promo_sk INT, ws_order_number BIGINT, ws_quantity INT, ws_wholesale_cost DECIMAL(7,2), ws_list_price DECIMAL(7,2), ws_sales_price DECIMAL(7,2), ws_ext_discount_amt DECIMAL(7,2), ws_ext_sales_price DECIMAL(7,2), ws_ext_wholesale_cost DECIMAL(7,2), ws_ext_list_price DECIMAL(7,2), ws_ext_tax DECIMAL(7,2), ws_coupon_amt DECIMAL(7,2), ws_ext_ship_cost DECIMAL(7,2), ws_net_paid DECIMAL(7,2), ws_net_paid_inc_tax DECIMAL(7,2), ws_net_paid_inc_ship DECIMAL(7,2), ws_net_paid_inc_ship_tax DECIMAL(7,2), ws_net_profit DECIMAL(7,2) ) STORED AS PARQUET; CREATE TABLE tpcds_parquet.web_site ( web_site_sk INT, web_site_id STRING, web_rec_start_date STRING, web_rec_end_date STRING, web_name STRING, web_open_date_sk INT, web_close_date_sk INT, web_class STRING, web_manager STRING, web_mkt_id INT, web_mkt_class STRING, web_mkt_desc STRING, web_market_manager STRING, web_company_id INT, web_company_name STRING, web_street_number STRING, web_street_name STRING, web_street_type STRING, web_suite_number STRING, web_city STRING, web_county STRING, web_state STRING, web_zip STRING, web_country STRING, web_gmt_offset DECIMAL(5,2), web_tax_percentage DECIMAL(5,2) ) STORED AS PARQUET; INSERT INTO tpcds_parquet.call_center SELECT * FROM tpcds_raw.call_center; INSERT INTO tpcds_parquet.catalog_page SELECT * FROM tpcds_raw.catalog_page; INSERT INTO tpcds_parquet.catalog_returns SELECT * FROM tpcds_raw.catalog_returns; INSERT INTO tpcds_parquet.catalog_sales SELECT * FROM tpcds_raw.catalog_sales; INSERT INTO tpcds_parquet.customer SELECT * FROM tpcds_raw.customer; INSERT INTO tpcds_parquet.customer_address SELECT * FROM tpcds_raw.customer_address; INSERT INTO tpcds_parquet.customer_demographics SELECT * FROM tpcds_raw.customer_demographics; INSERT INTO tpcds_parquet.date_dim SELECT * FROM tpcds_raw.date_dim; INSERT INTO tpcds_parquet.household_demographics SELECT * FROM tpcds_raw.household_demographics; INSERT INTO tpcds_parquet.income_band SELECT * FROM tpcds_raw.income_band; INSERT INTO tpcds_parquet.inventory SELECT * FROM tpcds_raw.inventory; INSERT INTO tpcds_parquet.item SELECT * FROM tpcds_raw.item; INSERT INTO tpcds_parquet.promotion SELECT * FROM tpcds_raw.promotion; INSERT INTO tpcds_parquet.ship_mode SELECT * FROM tpcds_raw.ship_mode; INSERT INTO tpcds_parquet.store SELECT * FROM tpcds_raw.store; INSERT INTO tpcds_parquet.store_returns SELECT * FROM tpcds_raw.store_returns; INSERT INTO tpcds_parquet.time_dim SELECT * FROM tpcds_raw.time_dim; INSERT INTO tpcds_parquet.warehouse SELECT * FROM tpcds_raw.warehouse; INSERT INTO tpcds_parquet.web_page SELECT * FROM tpcds_raw.web_page; INSERT INTO tpcds_parquet.web_returns SELECT * FROM tpcds_raw.web_returns; INSERT INTO tpcds_parquet.web_sales SELECT * FROM tpcds_raw.web_sales; INSERT INTO tpcds_parquet.web_site SELECT * FROM tpcds_raw.web_site; INSERT INTO tpcds_parquet.store_sales PARTITION(ss_sold_date_sk) SELECT ss_sold_time_sk, ss_item_sk, ss_customer_sk, ss_cdemo_sk, ss_hdemo_sk, ss_addr_sk, ss_store_sk, ss_promo_sk, ss_ticket_number, ss_quantity, ss_wholesale_cost, ss_list_price, ss_sales_price, ss_ext_discount_amt, ss_ext_sales_price, ss_ext_wholesale_cost, ss_ext_list_price, ss_ext_tax, ss_coupon_amt, ss_net_paid, ss_net_paid_inc_tax, ss_net_profit, ss_sold_date_sk FROM tpcds_raw.store_sales; -- Compute stats on all the tables for optimal performance. COMPUTE STATS tpcds_parquet.call_center; COMPUTE STATS tpcds_parquet.catalog_page; COMPUTE STATS tpcds_parquet.catalog_returns; COMPUTE STATS tpcds_parquet.catalog_sales; COMPUTE STATS tpcds_parquet.customer; COMPUTE STATS tpcds_parquet.customer_address; COMPUTE STATS tpcds_parquet.customer_demographics; COMPUTE STATS tpcds_parquet.date_dim; COMPUTE STATS tpcds_parquet.household_demographics; COMPUTE STATS tpcds_parquet.income_band; COMPUTE STATS tpcds_parquet.inventory; COMPUTE STATS tpcds_parquet.item; COMPUTE STATS tpcds_parquet.promotion; COMPUTE STATS tpcds_parquet.ship_mode; COMPUTE STATS tpcds_parquet.store; COMPUTE STATS tpcds_parquet.store_returns; COMPUTE STATS tpcds_parquet.store_sales; COMPUTE STATS tpcds_parquet.time_dim; COMPUTE STATS tpcds_parquet.warehouse; COMPUTE STATS tpcds_parquet.web_page; COMPUTE STATS tpcds_parquet.web_returns; COMPUTE STATS tpcds_parquet.web_sales; COMPUTE STATS tpcds_parquet.web_site;
the_stack
-- intended to compare sproc performance in less that one hour's time range, for recent sproc replacement. Not yet in use. ----select * from sprocs_evaluate_performance_modified_sproc('false','true') CREATE OR REPLACE FUNCTION sprocs_evaluate_performance_modified_sproc( IN p_is_eval_averages boolean default 'true', IN p_is_combine_hosts boolean default 'true', OUT host_name text ARRAY, OUT sproc_name text, OUT calls bigint, OUT total_time bigint, OUT avg_time bigint, OUT time_percent_increase integer ) RETURNS setof record AS --returns void as $$ DECLARE l_number_of_weeks integer; l_alert_percent integer; i integer; l_date timestamp without time zone; l_hour integer; l_prev_date timestamp without time zone; l_prev_hour integer; l_date_static timestamp without time zone; l_dates_array_prev timestamp without time zone array; l_dates_array_curr timestamp without time zone array; l_rowcnt integer; BEGIN -- fix hour & date and defaults l_hour := extract (hour from current_time); l_date := current_date; l_date_static := l_date; if (l_hour = 0) then l_prev_hour := 23; l_prev_date := current_date - interval '1 day'; else l_prev_hour := l_hour -1; l_prev_date := current_date; end if; -- the procs to be processed drop table if exists tmp_changed_sprocs; create table tmp_changed_sprocs ( host_id integer, sproc_name text, create_time timestamp without time zone, min_prev_hour_stats_time timestamp without time zone, -- first stats collection AFTER the create_time max_prev_hour_stats_time timestamp without time zone, -- last stats collection previous hour minutes_prev_hour integer, calls_prev_hour bigint, total_time_prev_hour bigint, min_curr_hour_stats_time timestamp without time zone, -- current hour max_curr_hour_stats_time timestamp without time zone, -- current hour minutes_curr_hour integer, calls_curr_hour bigint, total_time_curr_hour bigint ); -- first find if any procs need processing insert into tmp_changed_sprocs (host_id, sproc_name, create_time) select scd_host_id, scd_sproc_name, max(scd_detection_time) from sproc_change_detected where scd_detection_time + interval '2 hour' > current_timestamp and scd_is_new_hash group by scd_host_id, scd_sproc_name; GET DIAGNOSTICS l_rowcnt = ROW_COUNT; if (l_rowcnt = 0) then RETURN; end if; -- make sure data for all needed past periods is there select mc_config_value::integer from monitoring_configuration where mc_config_name = 'total_time_same_days_hourly_past_samples' into l_number_of_weeks; select mc_config_value::integer from monitoring_configuration where mc_config_name = 'total_time_same_days_hourly_percent' into l_alert_percent; i := 1; -- start from previous week, no current data from sprocs_summary, as we are looking at partial information while i <= l_number_of_weeks loop l_date := l_date - interval '7 day'; perform calc_sprocs_summary (l_date, l_hour); l_dates_array_prev := l_dates_array_prev || l_date; i := i+1; end loop; i := 1; -- and for previous hour while i <= l_number_of_weeks loop l_prev_date := l_prev_date - interval '7 day'; perform calc_sprocs_summary (l_prev_date, l_prev_hour); l_dates_array_curr := l_dates_array_prev || l_prev_date; i := i+1; end loop; -- update the tmp table with the recent data... -- prev hour update tmp_changed_sprocs set min_prev_hour_stats_time = min_sp_timestamp, max_prev_hour_stats_time = max_sp_timestamp from ( select N.sproc_host_id as sproc_host_id, substring(N.sproc_name from 0 for position( '(' in N.sproc_name)) as sproc_name, min(sp_timestamp) as min_sp_timestamp, max(sp_timestamp) as max_sp_timestamp from sproc_performance_data inner join sprocs N on sp_sproc_id = N.sproc_id inner join tmp_changed_sprocs tmp on sp_timestamp > tmp.create_time and substring(N.sproc_name from 0 for position( '(' in N.sproc_name)) = tmp.sproc_name and tmp.host_id = N.sproc_host_id where sp_timestamp < current_date + extract (hour from current_time) * interval '1 hour' group by N.sproc_host_id, substring(N.sproc_name from 0 for position( '(' in N.sproc_name)) having min(sp_timestamp) != max(sp_timestamp) ) t -- not just one sample per hour! where t.sproc_host_id = tmp_changed_sprocs.host_id and t.sproc_name = tmp_changed_sprocs.sproc_name and t.min_sp_timestamp > tmp_changed_sprocs.create_time; -- curr hour update tmp_changed_sprocs set min_curr_hour_stats_time = min_sp_timestamp, max_curr_hour_stats_time = max_sp_timestamp from ( select N.sproc_host_id as sproc_host_id, substring(N.sproc_name from 0 for position( '(' in N.sproc_name)) as sproc_name, min(sp_timestamp) as min_sp_timestamp, max(sp_timestamp) as max_sp_timestamp from sproc_performance_data inner join sprocs N on sp_sproc_id = N.sproc_id where sp_timestamp > current_date + extract (hour from current_timestamp) * interval '1 hour' and sp_timestamp < current_timestamp group by N.sproc_host_id, substring(N.sproc_name from 0 for position( '(' in N.sproc_name)) having min(sp_timestamp) != max(sp_timestamp) ) t -- not just one sample per hour! where t.sproc_host_id = tmp_changed_sprocs.host_id and t.sproc_name = tmp_changed_sprocs.sproc_name; update tmp_changed_sprocs set minutes_prev_hour = extract (minute from lst.sp_timestamp - prev.sp_timestamp), calls_prev_hour = lst.sp_calls - prev.sp_calls, total_time_prev_hour = lst.sp_total_time - prev.sp_total_time from sproc_performance_data lst inner join sproc_performance_data prev on prev.sp_sproc_id = lst.sp_sproc_id inner join sprocs N on prev.sp_sproc_id = N.sproc_id where prev.sp_timestamp = min_prev_hour_stats_time and lst.sp_timestamp = max_prev_hour_stats_time and substring(N.sproc_name from 0 for position( '(' in N.sproc_name)) = tmp_changed_sprocs.sproc_name and tmp_changed_sprocs.host_id = N.sproc_host_id; update tmp_changed_sprocs set minutes_curr_hour = extract (minute from lst.sp_timestamp - prev.sp_timestamp), calls_curr_hour = lst.sp_calls - prev.sp_calls, total_time_curr_hour = lst.sp_total_time - prev.sp_total_time from sproc_performance_data lst inner join sproc_performance_data prev on prev.sp_sproc_id = lst.sp_sproc_id inner join sprocs N on prev.sp_sproc_id = N.sproc_id where prev.sp_timestamp = min_curr_hour_stats_time and lst.sp_timestamp = max_curr_hour_stats_time and substring(N.sproc_name from 0 for position( '(' in N.sproc_name)) = tmp_changed_sprocs.sproc_name and tmp_changed_sprocs.host_id = N.sproc_host_id; -- now we have per host number with number of minutes per proc name -- handle combined hosts if (p_is_combine_hosts) then drop table if exists tmp_changed_sprocs_combined; create table tmp_changed_sprocs_combined ( sproc_name text, create_time timestamp, minutes_prev_hour integer, calls_prev_hour bigint, total_time_prev_hour bigint, minutes_curr_hour integer, calls_curr_hour bigint, total_time_curr_hour bigint ); insert into tmp_changed_sprocs_combined select tmp_changed_sprocs.sproc_name, max(tmp_changed_sprocs.create_time), sum(tmp_changed_sprocs.minutes_prev_hour), sum(tmp_changed_sprocs.calls_prev_hour), sum(tmp_changed_sprocs.total_time_prev_hour), sum(tmp_changed_sprocs.minutes_curr_hour), sum(tmp_changed_sprocs.calls_curr_hour), sum(tmp_changed_sprocs.total_time_curr_hour) from tmp_changed_sprocs group by tmp_changed_sprocs.sproc_name; end if; -- do prev_sums -- note ONE RECORD PER HOUR, unlike tmp_changed_sprocs drop table if exists tmp_prev_sums; create temporary table tmp_prev_sums ( ss_host_id integer array, ss_sproc_name text, ss_hour integer, weeks_cnt integer, sum_calls bigint, sum_total_time bigint ); if (p_is_combine_hosts) then insert into tmp_prev_sums select array_agg(ss_host_id), ss_sproc_name, max(ss_hour), count(distinct ss_date) as weeks_cnt, sum(ss_calls)*60/max(minutes_prev_hour) as sum_calls, sum(ss_total_time)*60/max(minutes_prev_hour) as sum_total_time from sprocs_summary inner join tmp_changed_sprocs_combined on tmp_changed_sprocs_combined.sproc_name = sprocs_summary.ss_sproc_name --and where ss_hour = l_prev_hour and not ss_is_suspect and ss_date = ANY (l_dates_array_prev) and not exists (select 1 from performance_ignore_list where (pil_host_id IS NULL or pil_host_id = ss_host_id) AND (pil_object_name IS NULL or pil_object_name = ss_sproc_name) ) group by ss_sproc_name; insert into tmp_prev_sums select array_agg(ss_host_id), ss_sproc_name, max(ss_hour), count(distinct ss_date) as weeks_cnt, sum(ss_calls)*60/max(minutes_curr_hour) as sum_calls, sum(ss_total_time)*60/max(minutes_curr_hour) as sum_total_time from sprocs_summary inner join tmp_changed_sprocs_combined on tmp_changed_sprocs_combined.sproc_name = sprocs_summary.ss_sproc_name where ss_hour = l_hour and not ss_is_suspect and ss_date = ANY (l_dates_array_curr) group by ss_sproc_name; else insert into tmp_prev_sums select array_agg(ss_host_id), ss_sproc_name, max(ss_hour), count(distinct ss_date) as weeks_cnt, sum(ss_calls)*60/max(minutes_prev_hour) as sum_calls, sum(ss_total_time)*60/max(minutes_prev_hour) as sum_total_time from sprocs_summary inner join tmp_changed_sprocs on tmp_changed_sprocs.sproc_name = sprocs_summary.ss_sproc_name and tmp_changed_sprocs.host_id = sprocs_summary.ss_host_id where ss_hour = l_prev_hour and not ss_is_suspect and ss_date = ANY (l_dates_array_prev) group by ss_host_id, ss_sproc_name; insert into tmp_prev_sums select array_agg(ss_host_id), ss_sproc_name, max(ss_hour), count(distinct ss_date) as weeks_cnt, sum(ss_calls)*60/max(minutes_curr_hour) as sum_calls, sum(ss_total_time)*60/max(minutes_curr_hour) as sum_total_time from sprocs_summary inner join tmp_changed_sprocs on tmp_changed_sprocs.sproc_name = sprocs_summary.ss_sproc_name and tmp_changed_sprocs.host_id = sprocs_summary.ss_host_id where ss_hour = l_hour and not ss_is_suspect and ss_date = ANY (l_dates_array_curr) group by ss_host_id, ss_sproc_name; end if; -- average results over non-zero values if (p_is_combine_hosts) then -- must separate, as if I combine hosts, I no longer have a valid host_id tmp_prev_sums RETURN QUERY select array_agg(hosts.host_name), ss.sproc_name, sum(coalesce(calls_prev_hour,0) + coalesce(calls_curr_hour,0))::bigint, sum(coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0))::bigint, ( sum(coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0)) / sum(coalesce(calls_prev_hour,0) + coalesce(calls_curr_hour,0)) )::bigint, case when p_is_eval_averages then (( avg( 1.0 * (coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0)) / (coalesce(calls_prev_hour,0) + coalesce(calls_curr_hour,0)) ) / avg( 1.0 * (coalesce(prev.sum_total_time,0)+coalesce(curr.sum_total_time,0)) / (coalesce(prev.sum_calls,0)+coalesce(curr.sum_calls,0)) ) -1.0) * 100.0)::integer else (( sum( 1.0 * coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0) ) / sum( 1.0 * (coalesce(prev.sum_total_time,0)+coalesce(curr.sum_total_time,0)) / curr.weeks_cnt ) -1.0) * 100.0)::integer end from tmp_changed_sprocs_combined ss left join tmp_prev_sums curr on curr.ss_sproc_name = ss.sproc_name and curr.ss_hour = l_hour left join tmp_prev_sums prev on prev.ss_sproc_name = ss.sproc_name and (curr.ss_host_id is null or curr.ss_host_id = prev.ss_host_id) and prev.ss_hour = l_prev_hour left join hosts on hosts.host_id = ANY (curr.ss_host_id) where coalesce(prev.sum_total_time,0) >= 0 and coalesce(curr.sum_total_time,0) > 0 and coalesce(curr.sum_calls,0) > 0 and case when p_is_eval_averages then 'true' else ( 1.0 * (coalesce(prev.sum_total_time,0)+coalesce(curr.sum_total_time,0)) / curr.weeks_cnt ) * (1.0+1.0*l_alert_percent/100.0) < (coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0)) end and not exists (select 1 from performance_ignore_list where (pil_host_id IS NULL or pil_host_id = hosts.host_id) AND (pil_object_name IS NULL or pil_object_name = ss.sproc_name) ) group by ss.sproc_name having --sum(ss.ss_total_time) > l_time_threshod and sum( 1.0 * (coalesce(prev.sum_total_time,0)+coalesce(curr.sum_total_time,0)) ) > 0 and case when p_is_eval_averages then avg( 1.0 * (coalesce(prev.sum_total_time,0) + coalesce(curr.sum_total_time,0)) / (coalesce(prev.sum_calls,0) + coalesce(curr.sum_calls,0)) ) * (1.0+1.0*l_alert_percent/100.0) < avg( 1.0*(coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0)) / (coalesce(calls_prev_hour,0) + coalesce(calls_curr_hour,0)) ) else 'true' end order by 6 desc; else -- no host combined, still needs to combine the two hours, if any RETURN QUERY select array[hosts.host_name], ss.sproc_name, coalesce(calls_prev_hour,0) + coalesce(calls_curr_hour,0), coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0), ( (coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0)) / (coalesce(calls_prev_hour,0) + coalesce(calls_curr_hour,0)) )::bigint, case when p_is_eval_averages then (( ( 1.0 * (coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0)) / (coalesce(calls_prev_hour,0) + coalesce(calls_curr_hour,0)) ) / ( 1.0 * (coalesce(prev.sum_total_time,0)+coalesce(curr.sum_total_time,0)) / (coalesce(prev.sum_calls,0)+coalesce(curr.sum_calls,0)) ) -1.0) * 100.0)::integer else (( ( 1.0 * coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0) ) / ( 1.0 * (coalesce(prev.sum_total_time,0)+coalesce(curr.sum_total_time,0)) / curr.weeks_cnt ) -1.0) * 100.0)::integer end from tmp_changed_sprocs ss inner join hosts on hosts.host_id = ss.host_id left join tmp_prev_sums prev on prev.ss_sproc_name = ss.sproc_name and ss.host_id = ALL(prev.ss_host_id) and prev.ss_hour = l_prev_hour left join tmp_prev_sums curr on curr.ss_sproc_name = ss.sproc_name and ss.host_id = ALL(curr.ss_host_id) and curr.ss_hour = l_hour where coalesce(prev.sum_total_time,0) >= 0 and coalesce(curr.sum_total_time,0) >= 0 and case when p_is_eval_averages then ( 1.0 * (coalesce(prev.sum_total_time,0) + coalesce(curr.sum_total_time,0)) / (coalesce(prev.sum_calls,0) + coalesce(curr.sum_calls,0)) ) * (1.0+1.0*l_alert_percent/100.0) < ( 1.0*(coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0)) / (coalesce(calls_prev_hour,0) + coalesce(calls_curr_hour,0)) ) else ( 1.0 * (coalesce(prev.sum_total_time,0)+coalesce(curr.sum_total_time,0)) / curr.weeks_cnt ) * (1.0+1.0*l_alert_percent/100.0) < (coalesce(total_time_prev_hour,0) + coalesce(total_time_curr_hour,0)) end and not exists (select 1 from performance_ignore_list where (pil_host_id IS NULL or pil_host_id = hosts.host_id) AND (pil_object_name IS NULL or pil_object_name = ss.sproc_name) ) order by 6 desc; end if; END; $$ LANGUAGE 'plpgsql';
the_stack
------------------------------------------------------------------------ -- TITLE: -- scenariodb_attitude.sql -- -- AUTHOR: -- Will Duquette -- -- DESCRIPTION: -- SQL Schema for scenariodb(n): Attitudes and Attitude Drivers -- -- SECTIONS: -- Cooperation -- Horizontal Relationships -- Satisfaction -- Vertical Relationships -- Attitude Drivers -- ------------------------------------------------------------------------ ------------------------------------------------------------------------ -- COOPERATION: INITIAL DATA CREATE TABLE coop_fg ( -- At present, cooperation is defined only between all -- civgroups f and all force groups g. This table contains the -- initial baseline cooperation levels. -- Symbolic civ group name: group f f TEXT REFERENCES civgroups(g) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, -- Symbolic frc group name: group g g TEXT REFERENCES frcgroups(g) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, -- initial baseline cooperation of f with g at time 0. base DOUBLE DEFAULT 50.0, -- if "BASELINE", regress to initial baseline; if "NATURAL", -- regress to explicit natural level. regress_to STRING DEFAULT 'BASELINE', -- Natural level, if regress_to is "NATURAL". natural DOUBLE DEFAULT 50.0, PRIMARY KEY (f, g) ); ------------------------------------------------------------------------ -- HORIZONTAL RELATIONSHIPS: INITIAL DATA -- hrel_fg: Normally, an initial baseline horizontal relationship is -- the affinity between the two groups; however, this can be overridden. -- This table contains the overrides. See hrel_view for the full set of -- data, and uram_hrel for the current relationships. -- -- Thus base is group f's initial baseline relationship with group g, -- from f's point of view. CREATE TABLE hrel_fg ( -- Symbolic group name: group f f TEXT REFERENCES groups(g) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, -- Symbolic group name: group g g TEXT REFERENCES groups(g) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, -- Initial baseline horizontal relationship, from f's point of view. base DOUBLE DEFAULT 0.0, -- Historical data flag: if 0, no historical attitude data. hist_flag INTEGER DEFAULT 0, -- Initial current level, only if hist_flag = 1 current DOUBLE DEFAULT 0.0, PRIMARY KEY (f, g) ); -- This view determines the data that drives the initial baseline -- horizontal relationship for each pair of groups. In particular, -- it determines the bsid for each group, and the base H.fg when it -- is known (i.e., when f=g or the base H.fg has been explicitly -- overridden by the user). Note that the R.* columns will be -- NULL unless the HREL is overridden. CREATE VIEW hrel_base_view AS SELECT F.g AS f, F.gtype AS ftype, F.bsid AS fbsid, G.g AS g, G.gtype AS gtype, G.bsid AS gbsid, CASE WHEN F.g = G.g THEN 1.0 ELSE NULL END AS nat, CASE WHEN F.g = G.g THEN 1.0 ELSE R.base END AS base, CASE WHEN F.g = G.g THEN 0 ELSE coalesce(R.hist_flag, 0) END AS hist_flag, CASE WHEN F.g = G.g THEN 1.0 WHEN coalesce(R.hist_flag, 0) THEN R.current ELSE R.base END AS current, CASE WHEN R.base IS NOT NULL THEN 1 ELSE 0 END AS override FROM groups_bsid_view AS F JOIN groups_bsid_view AS G LEFT OUTER JOIN hrel_fg AS R ON (R.f = F.g AND R.g = G.g); ------------------------------------------------------------------------ -- SATISFACTION: INITIAL DATA -- Group/concern pairs (g,c) for civilian groups -- This table contains the data used to initialize URAM sat curves. CREATE TABLE sat_gc ( -- Symbolic groups name g TEXT REFERENCES civgroups(g) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, -- Symbolic concerns name c TEXT, -- Initial baseline satisfaction value base DOUBLE DEFAULT 0.0, -- Saliency of concern c to group g in nbhood n saliency DOUBLE DEFAULT 1.0, -- Historical data flag: if 0, no historical attitude data. hist_flag INTEGER DEFAULT 0, -- Initial current satisfaction level, only if hist_flag = 1 current DOUBLE DEFAULT 0.0, PRIMARY KEY (g, c) ); ------------------------------------------------------------------------ -- VERTICAL RELATIONSHIPS: INITIAL DATA -- vrel_ga: Normally, an initial baseline vertical relationship is -- the affinity between the group and the actor (unless the actor owns -- the group); however, this can be overridden. This table contains the -- overrides. See vrel_view for the full set of data, -- and uram_vrel for the current relationships. -- -- Thus base is group g's initial baseline relationship with actor a. CREATE TABLE vrel_ga ( -- Symbolic group name: group g g TEXT REFERENCES groups(g) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, -- Symbolic group name: actor a a TEXT REFERENCES actors(a) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, -- Initial vertical relationship base DOUBLE DEFAULT 0.0, -- Historical data flag: if 0, no historical attitude data. hist_flag INTEGER DEFAULT 0, -- Initial current level, only if hist_flag = 1 current DOUBLE DEFAULT 0.0, PRIMARY KEY (g, a) ); -- This view determines the data that drives the initial baseline -- vertical relationships for each group and actor: the belief system -- IDs (bsids) and any overrides from vrel_ga. Note that the -- relationship of a group with its owning actor defaults to 1.0. -- The final word is in the temporary view fmt_vrel_base_view, -- because a function is required to compute the affinities. -- -- Note that base and current will be NULL if they are not overridden. CREATE VIEW vrel_base_view AS SELECT G.g AS g, G.gtype AS gtype, G.bsid AS gbsid, G.a AS owner, A.a AS a, A.bsid AS absid, CASE WHEN G.a = A.a THEN 1.0 ELSE NULL END AS nat, CASE WHEN G.a = A.a THEN coalesce(V.base, 1.0) ELSE V.base END AS base, coalesce(V.hist_flag, 0) AS hist_flag, CASE WHEN coalesce(V.hist_flag,0) THEN V.current WHEN G.a = A.a THEN coalesce(V.base, 1.0) ELSE V.base END AS current, CASE WHEN V.base IS NOT NULL THEN 1 ELSE 0 END AS override FROM groups_bsid_view AS G JOIN actors AS A LEFT OUTER JOIN vrel_ga AS V ON (V.g = G.g AND V.a = A.a); ------------------------------------------------------------------------ -- ATTITUDE DRIVERS CREATE TABLE drivers ( -- All attitude inputs to URAM are associated with an attitude -- driver: an event, situation, or magic driver. Drivers are -- identified by a unique integer ID. -- -- For most driver types, the driver is associated with a signature -- that is unique for that driver type. This allows the rule set to -- retrieve the driver ID given the driver type and signature. driver_id INTEGER PRIMARY KEY, -- Integer ID dtype TEXT, -- Driver type (usually a rule set name) signature TEXT -- Signature, by driver type. ); CREATE INDEX drivers_signature_index ON drivers(dtype,signature); CREATE TABLE curses ( -- The curses table holds data associated with every CURSE -- defined by the user. The curse_injects table then references -- the CURSE each inject is associated with. -- CURSE ID curse_id TEXT PRIMARY KEY, -- Description of the CURSE longname TEXT DEFAULT '', -- ecause(n) value, or NULL cause TEXT DEFAULT '', -- Here Factor (s), a real fraction (0.0 to 1.0) s DOUBLE DEFAULT 1.0, -- Near Factor (p), a real fraction (0.0 to 1.0) p DOUBLE DEFAULT 0.0, -- Near Factor (q), a real fraction (0.0 to 1.0) q DOUBLE DEFAULT 0.0, -- State: normal, disabled, invalid (ecurse_state) state TEXT DEFAULT 'normal' ); CREATE TABLE curse_injects ( -- CURSE ID curse_id TEXT REFERENCES curses(curse_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, -- Unique inject number inject_num INTEGER, -- Inject type: SAT, COOP, HREL, or VREL inject_type TEXT, -- ecinjectpart(n) value -- Mode: Persistent (P) or Transient (T) mode TEXT, -- Narrative built by the inject object based on the inject -- type narrative TEXT DEFAULT 'TBD', -- normal, disabled or invalid state TEXT DEFAULT 'normal', -- CURSE Type parameters. The use of these varies by type; -- all are NULL if unused. There are no foreign key constraints; -- errors are checked by the curse input type's "check" method. a TEXT, -- Actor roles for VREL c TEXT, -- A concern, for SAT f TEXT, -- SAT -> n/a, HREL -> groups, -- VREL -> n/a, COOP -> civgroups g TEXT, -- SAT -> civgroups, HREL -> groups, -- VREL -> groups, COOP -> frcgroups mag REAL, -- Numeric qmag(n) value PRIMARY KEY (curse_id, inject_num) ); ------------------------------------------------------------------------ -- RULE FIRING HISTORY CREATE TABLE rule_firings ( -- Historical data about rule firings, used for later display. firing_id INTEGER PRIMARY KEY, -- Integer ID t INTEGER, -- Sim time of rule firing, in ticks. driver_id INTEGER, -- Driver ID ruleset TEXT, -- Rule Set name (same as drivers.dtype) rule TEXT, -- Rule name fdict TEXT -- Dictionary of ruleset-specific data. ); CREATE TABLE rule_inputs ( -- Historical data about rule inputs, used for later display -- Theoretically, the sim time t column is not needed, but it makes -- purging the data easier. -- -- This table includes the attitude curve indices for all four kinds -- of curve: -- -- coop: (f,g) where f is a civilian group and g is a force group -- hrel: (f,g) where f and g are groups -- sat: (g,c) where g is a civilian group and c is a concern -- vrel: (g,a) where g is a group and a is an actor -- -- Index columns which do not apply to a particular attitude type will -- be NULL. -- -- The s, p, and q columns apply only to coop and sat inputs, and will -- be NULL for hrel and vrel inputs. -- -- The "note" column is used by rule sets where a single rule is -- implemented as a look-up table, and the specific case is not -- obvious from the rule_firings.fdict. The "note" will identify -- which case applied. firing_id INTEGER, -- The input's rule firing input_id INTEGER, -- Input no. for this rule firing t INTEGER, -- Sim time of rule firing. atype TEXT, -- Attitude type, coop, hrel, sat, vrel mode TEXT, -- P, T (persistent, transient) f TEXT, -- Group f (coop, vrel) g TEXT, -- Group g (coop, hrel, sat) c TEXT, -- Concern c (sat) a TEXT, -- Actor a (vrel) gain DOUBLE, -- Gain on magnitude mag DOUBLE, -- Numeric magnitude cause TEXT, -- Cause name s DOUBLE, -- Here effects multiplier p DOUBLE, -- Near effects multiplier q DOUBLE, -- Far effects multiplier note TEXT, -- Note on this input PRIMARY KEY (firing_id, input_id) ); ------------------------------------------------------------------------ -- End of File ------------------------------------------------------------------------
the_stack
drop table if exists cms_help; drop table if exists cms_help_category; drop table if exists cms_member_report; drop table if exists cms_prefrence_area; drop table if exists cms_prefrence_area_product_relation; drop table if exists cms_subject; drop table if exists cms_subject_category; drop table if exists cms_subject_comment; drop table if exists cms_subject_product_relation; drop table if exists cms_topic; drop table if exists cms_topic_category; drop table if exists cms_topic_comment; drop table if exists oms_cart_item; drop table if exists oms_company_address; drop table if exists oms_order; drop table if exists oms_order_item; drop table if exists oms_order_operate_history; drop table if exists oms_order_return_apply; drop table if exists oms_order_return_reason; drop table if exists oms_order_setting; drop table if exists pms_album; drop table if exists pms_album_pic; drop table if exists pms_brand; drop table if exists pms_comment; drop table if exists pms_comment_replay; drop table if exists pms_feight_template; drop table if exists pms_member_price; drop table if exists pms_product; drop table if exists pms_product_attribute; drop table if exists pms_product_attribute_category; drop table if exists pms_product_attribute_value; drop table if exists pms_product_category; drop table if exists pms_product_category_attribute_relation; drop table if exists pms_product_full_reduction; drop table if exists pms_product_ladder; drop table if exists pms_product_operate_log; drop table if exists pms_product_vertify_record; drop table if exists pms_sku_stock; drop table if exists sms_coupon; drop table if exists sms_coupon_history; drop table if exists sms_coupon_product_category_relation; drop table if exists sms_coupon_product_relation; drop table if exists sms_flash_promotion; drop table if exists sms_flash_promotion_log; drop table if exists sms_flash_promotion_product_relation; drop table if exists sms_flash_promotion_session; drop table if exists sms_home_advertise; drop table if exists sms_home_brand; drop table if exists sms_home_new_product; drop table if exists sms_home_recommend_product; drop table if exists sms_home_recommend_subject; drop table if exists ums_admin; drop table if exists ums_admin_login_log; drop table if exists ums_admin_permission_relation; drop table if exists ums_admin_role_relation; drop table if exists ums_growth_change_history; drop table if exists ums_integration_change_history; drop table if exists ums_integration_consume_setting; drop table if exists ums_member; drop table if exists ums_member_level; drop table if exists ums_member_login_log; drop table if exists ums_member_member_tag_relation; drop table if exists ums_member_product_category_relation; drop table if exists ums_member_receive_address; drop table if exists ums_member_rule_setting; drop table if exists ums_member_statistics_info; drop table if exists ums_member_tag; drop table if exists ums_member_task; drop table if exists ums_menu; drop table if exists ums_permission; drop table if exists ums_resource; drop table if exists ums_resource_category; drop table if exists ums_role; drop table if exists ums_role_menu_relation; drop table if exists ums_role_permission_relation; drop table if exists ums_role_resource_relation; /*==============================================================*/ /* Table: cms_help */ /*==============================================================*/ create table cms_help ( id bigint not null auto_increment, category_id bigint, icon varchar(500), title varchar(100), show_status int(1), create_time datetime, read_count int(1), content text, primary key (id) ); alter table cms_help comment '帮助表'; /*==============================================================*/ /* Table: cms_help_category */ /*==============================================================*/ create table cms_help_category ( id bigint not null auto_increment, name varchar(100), icon varchar(500) comment '分类图标', help_count int comment '专题数量', show_status int(2), sort int, primary key (id) ); alter table cms_help_category comment '帮助分类表'; /*==============================================================*/ /* Table: cms_member_report */ /*==============================================================*/ create table cms_member_report ( id bigint, report_type int(1) comment '举报类型:0->商品评价;1->话题内容;2->用户评论', report_member_name varchar(100) comment '举报人', create_time datetime, report_object varchar(100), report_status int(1) comment '举报状态:0->未处理;1->已处理', handle_status int(1) comment '处理结果:0->无效;1->有效;2->恶意', note varchar(200) ); alter table cms_member_report comment '用户举报表'; /*==============================================================*/ /* Table: cms_prefrence_area */ /*==============================================================*/ create table cms_prefrence_area ( id bigint not null auto_increment, name varchar(255), sub_title varchar(255), pic varbinary(500) comment '展示图片', sort int, show_status int(1), primary key (id) ); alter table cms_prefrence_area comment '优选专区'; /*==============================================================*/ /* Table: cms_prefrence_area_product_relation */ /*==============================================================*/ create table cms_prefrence_area_product_relation ( id bigint not null auto_increment, prefrence_area_id bigint, product_id bigint, primary key (id) ); alter table cms_prefrence_area_product_relation comment '优选专区和产品关系表'; /*==============================================================*/ /* Table: cms_subject */ /*==============================================================*/ create table cms_subject ( id bigint not null auto_increment, category_id bigint, title varchar(100), pic varchar(500) comment '专题主图', product_count int comment '关联产品数量', recommend_status int(1), create_time datetime, collect_count int, read_count int, comment_count int, album_pics varchar(1000) comment '画册图片用逗号分割', description varchar(1000), show_status int(1) comment '显示状态:0->不显示;1->显示', content text, forward_count int comment '转发数', category_name varchar(200) comment '专题分类名称', primary key (id) ); alter table cms_subject comment '专题表'; /*==============================================================*/ /* Table: cms_subject_category */ /*==============================================================*/ create table cms_subject_category ( id bigint not null auto_increment, name varchar(100), icon varchar(500) comment '分类图标', subject_count int comment '专题数量', show_status int(2), sort int, primary key (id) ); alter table cms_subject_category comment '专题分类表'; /*==============================================================*/ /* Table: cms_subject_comment */ /*==============================================================*/ create table cms_subject_comment ( id bigint not null auto_increment, subject_id bigint, member_nick_name varchar(255), member_icon varchar(255), content varchar(1000), create_time datetime, show_status int(1), primary key (id) ); alter table cms_subject_comment comment '专题评论表'; /*==============================================================*/ /* Table: cms_subject_product_relation */ /*==============================================================*/ create table cms_subject_product_relation ( id bigint not null auto_increment, subject_id bigint, product_id bigint, primary key (id) ); alter table cms_subject_product_relation comment '专题商品关系表'; /*==============================================================*/ /* Table: cms_topic */ /*==============================================================*/ create table cms_topic ( id bigint not null auto_increment, category_id bigint, name varchar(255), create_time datetime, start_time datetime, end_time datetime, attend_count int comment '参与人数', attention_count int comment '关注人数', read_count int, award_name varchar(100) comment '奖品名称', attend_type varchar(100) comment '参与方式', content text comment '话题内容', primary key (id) ); alter table cms_topic comment '话题表'; /*==============================================================*/ /* Table: cms_topic_category */ /*==============================================================*/ create table cms_topic_category ( id bigint not null auto_increment, name varchar(100), icon varchar(500) comment '分类图标', subject_count int comment '专题数量', show_status int(2), sort int, primary key (id) ); alter table cms_topic_category comment '话题分类表'; /*==============================================================*/ /* Table: cms_topic_comment */ /*==============================================================*/ create table cms_topic_comment ( id bigint not null auto_increment, member_nick_name varchar(255), topic_id bigint, member_icon varchar(255), content varchar(1000), create_time datetime, show_status int(1), primary key (id) ); alter table cms_topic_comment comment '专题评论表'; /*==============================================================*/ /* Table: oms_cart_item */ /*==============================================================*/ create table oms_cart_item ( id bigint not null auto_increment, product_id bigint, product_sku_id bigint, member_id bigint, quantity int comment '购买数量', price decimal(10,2) comment '添加到购物车的价格', product_pic varchar(1000) comment '商品主图', product_name varchar(500) comment '商品名称', product_brand varchar(200), product_sn varchar(200), product_sub_title varchar(500) comment '商品副标题(卖点)', product_sku_code varchar(200) comment '商品sku条码', member_nickname varchar(500) comment '会员昵称', create_date datetime comment '创建时间', modify_date datetime comment '修改时间', delete_status int(1) default 0 comment '是否删除', product_category_id bigint comment '商品的分类', product_attr varchar(500) comment '商品销售属性:[{"key":"颜色","value":"银色"},{"key":"容量","value":"4G"}]', primary key (id) ); alter table oms_cart_item comment '购物车表'; /*==============================================================*/ /* Table: oms_company_address */ /*==============================================================*/ create table oms_company_address ( id bigint not null auto_increment, address_name varchar(200) comment '地址名称', send_status int(1) comment '默认发货地址:0->否;1->是', receive_status int(1) comment '是否默认收货地址:0->否;1->是', name varchar(64) comment '收发货人姓名', phone varchar(64) comment '收货人电话', province varchar(64) comment '省/直辖市', city varchar(64) comment '市', region varchar(64) comment '区', detail_address varchar(200) comment '详细地址', primary key (id) ); alter table oms_company_address comment '公司收发货地址表'; /*==============================================================*/ /* Table: oms_order */ /*==============================================================*/ create table oms_order ( id bigint not null auto_increment comment '订单id', member_id bigint not null, coupon_id bigint, order_sn varchar(64) comment '订单编号', create_time datetime comment '提交时间', member_username varchar(64) comment '用户帐号', total_amount decimal(10,2) comment '订单总金额', pay_amount decimal(10,2) comment '应付金额(实际支付金额)', freight_amount decimal(10,2) comment '运费金额', promotion_amount decimal(10,2) comment '促销优化金额(促销价、满减、阶梯价)', integration_amount decimal(10,2) comment '积分抵扣金额', coupon_amount decimal(10,2) comment '优惠券抵扣金额', discount_amount decimal(10,2) comment '管理员后台调整订单使用的折扣金额', pay_type int(1) comment '支付方式:0->未支付;1->支付宝;2->微信', source_type int(1) comment '订单来源:0->PC订单;1->app订单', status int(1) comment '订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单', order_type int(1) comment '订单类型:0->正常订单;1->秒杀订单', delivery_company varchar(64) comment '物流公司(配送方式)', delivery_sn varchar(64) comment '物流单号', auto_confirm_day int comment '自动确认时间(天)', integration int comment '可以获得的积分', growth int comment '可以活动的成长值', promotion_info varchar(100) comment '活动信息', bill_type int(1) comment '发票类型:0->不开发票;1->电子发票;2->纸质发票', bill_header varchar(200) comment '发票抬头', bill_content varchar(200) comment '发票内容', bill_receiver_phone varchar(32) comment '收票人电话', bill_receiver_email varchar(64) comment '收票人邮箱', receiver_name varchar(100) not null comment '收货人姓名', receiver_phone varchar(32) not null comment '收货人电话', receiver_post_code varchar(32) comment '收货人邮编', receiver_province varchar(32) comment '省份/直辖市', receiver_city varchar(32) comment '城市', receiver_region varchar(32) comment '区', receiver_detail_address varchar(200) comment '详细地址', note varchar(500) comment '订单备注', confirm_status int(1) comment '确认收货状态:0->未确认;1->已确认', delete_status int(1) not null default 0 comment '删除状态:0->未删除;1->已删除', use_integration int comment '下单时使用的积分', payment_time datetime comment '支付时间', delivery_time datetime comment '发货时间', receive_time datetime comment '确认收货时间', comment_time datetime comment '评价时间', modify_time datetime comment '修改时间', primary key (id) ); alter table oms_order comment '订单表'; /*==============================================================*/ /* Table: oms_order_item */ /*==============================================================*/ create table oms_order_item ( id bigint not null auto_increment, order_id bigint comment '订单id', order_sn varchar(64) comment '订单编号', product_id bigint, product_pic varchar(500), product_name varchar(200), product_brand varchar(200), product_sn varchar(64), product_price decimal(10,2) comment '销售价格', product_quantity int comment '购买数量', product_sku_id bigint comment '商品sku编号', product_sku_code varchar(50) comment '商品sku条码', product_category_id bigint comment '商品分类id', promotion_name varchar(200) comment '商品促销名称', promotion_amount decimal(10,2) comment '商品促销分解金额', coupon_amount decimal(10,2) comment '优惠券优惠分解金额', integration_amount decimal(10,2) comment '积分优惠分解金额', real_amount decimal(10,2) comment '该商品经过优惠后的分解金额', gift_integration int not null default 0 comment '商品赠送积分', gift_growth int not null default 0 comment '商品赠送成长值', product_attr varchar(500) comment '商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]', primary key (id) ); alter table oms_order_item comment '订单中所包含的商品'; /*==============================================================*/ /* Table: oms_order_operate_history */ /*==============================================================*/ create table oms_order_operate_history ( id bigint not null auto_increment, order_id bigint comment '订单id', operate_man varchar(100) comment '操作人:用户;系统;后台管理员', create_time datetime comment '操作时间', order_status int(1) comment '订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单', note varchar(500) comment '备注', primary key (id) ); alter table oms_order_operate_history comment '订单操作历史记录'; /*==============================================================*/ /* Table: oms_order_return_apply */ /*==============================================================*/ create table oms_order_return_apply ( id bigint not null auto_increment, order_id bigint comment '订单id', company_address_id bigint comment '收货地址表id', product_id bigint comment '退货商品id', order_sn varchar(64) comment '订单编号', create_time datetime comment '申请时间', member_username varchar(64) comment '会员用户名', return_amount decimal(10,2) comment '退款金额', return_name varchar(100) comment '退货人姓名', return_phone varchar(100) comment '退货人电话', status int(1) comment '申请状态:0->待处理;1->退货中;2->已完成;3->已拒绝', handle_time datetime comment '处理时间', product_pic varchar(500) comment '商品图片', product_name varchar(200) comment '商品名称', product_brand varchar(200) comment '商品品牌', product_attr varchar(500) comment '商品销售属性:颜色:红色;尺码:xl;', product_count int comment '退货数量', product_price decimal(10,2) comment '商品单价', product_real_price decimal(10,2) comment '商品实际支付单价', reason varchar(200) comment '原因', description varchar(500) comment '描述', proof_pics varchar(1000) comment '凭证图片,以逗号隔开', handle_note varchar(500) comment '处理备注', handle_man varchar(100) comment '处理人员', receive_man varchar(100) comment '收货人', receive_time datetime comment '收货时间', receive_note varchar(500) comment '收货备注', primary key (id) ); alter table oms_order_return_apply comment '订单退货申请'; /*==============================================================*/ /* Table: oms_order_return_reason */ /*==============================================================*/ create table oms_order_return_reason ( id bigint not null auto_increment, name varchar(100) comment '退货类型', sort int, status int(1) comment '状态:0->不启用;1->启用', create_time datetime comment '添加时间', primary key (id) ); alter table oms_order_return_reason comment '退货原因表'; /*==============================================================*/ /* Table: oms_order_setting */ /*==============================================================*/ create table oms_order_setting ( id bigint not null auto_increment, flash_order_overtime int comment '秒杀订单超时关闭时间(分)', normal_order_overtime int comment '正常订单超时时间(分)', confirm_overtime int comment '发货后自动确认收货时间(天)', finish_overtime int comment '自动完成交易时间,不能申请售后(天)', comment_overtime int comment '订单完成后自动好评时间(天)', primary key (id) ); alter table oms_order_setting comment '订单设置表'; /*==============================================================*/ /* Table: pms_album */ /*==============================================================*/ create table pms_album ( id bigint not null auto_increment, name varchar(64), cover_pic varchar(1000), pic_count int, sort int, description varchar(1000), primary key (id) ); alter table pms_album comment '相册表'; /*==============================================================*/ /* Table: pms_album_pic */ /*==============================================================*/ create table pms_album_pic ( id bigint not null auto_increment, album_id bigint, pic varchar(1000), primary key (id) ); alter table pms_album_pic comment '画册图片表'; /*==============================================================*/ /* Table: pms_brand */ /*==============================================================*/ create table pms_brand ( id bigint not null auto_increment, name varchar(64), first_letter varchar(8) comment '首字母', sort int, factory_status int(1) comment '是否为品牌制造商:0->不是;1->是', show_status int(1), product_count int comment '产品数量', product_comment_count int comment '产品评论数量', logo varchar(255) comment '品牌logo', big_pic varchar(255) comment '专区大图', brand_story text comment '品牌故事', primary key (id) ); alter table pms_brand comment '品牌表'; /*==============================================================*/ /* Table: pms_comment */ /*==============================================================*/ create table pms_comment ( id bigint not null auto_increment, product_id bigint, member_nick_name varchar(255), product_name varchar(255), star int(3) comment '评价星数:0->5', member_ip varchar(64) comment '评价的ip', create_time datetime, show_status int(1), product_attribute varchar(255) comment '购买时的商品属性', collect_couont int, read_count int, content text, pics varchar(1000) comment '上传图片地址,以逗号隔开', member_icon varchar(255) comment '评论用户头像', replay_count int, primary key (id) ); alter table pms_comment comment '商品评价表'; /*==============================================================*/ /* Table: pms_comment_replay */ /*==============================================================*/ create table pms_comment_replay ( id bigint not null auto_increment, comment_id bigint, member_nick_name varchar(255), member_icon varchar(255), content varchar(1000), create_time datetime, type int(1) comment '评论人员类型;0->会员;1->管理员', primary key (id) ); alter table pms_comment_replay comment '产品评价回复表'; /*==============================================================*/ /* Table: pms_feight_template */ /*==============================================================*/ create table pms_feight_template ( id bigint not null auto_increment, name varchar(64), charge_type int(1) comment '计费类型:0->按重量;1->按件数', first_weight decimal(10,2) comment '首重kg', first_fee decimal(10,2) comment '首费(元)', continue_weight decimal(10,2), continme_fee decimal(10,2), dest varchar(255) comment '目的地(省、市)', primary key (id) ); alter table pms_feight_template comment '运费模版'; /*==============================================================*/ /* Table: pms_member_price */ /*==============================================================*/ create table pms_member_price ( id bigint not null auto_increment, product_id bigint, member_level_id bigint, member_price decimal(10,2) comment '会员价格', member_level_name varchar(100), primary key (id) ); alter table pms_member_price comment '商品会员价格表'; /*==============================================================*/ /* Table: pms_product */ /*==============================================================*/ create table pms_product ( id bigint not null auto_increment, brand_id bigint, product_category_id bigint, feight_template_id bigint, product_attribute_category_id bigint, name varchar(64) not null, pic varchar(255), product_sn varchar(64) not null comment '货号', delete_status int(1) comment '删除状态:0->未删除;1->已删除', publish_status int(1) comment '上架状态:0->下架;1->上架', new_status int(1) comment '新品状态:0->不是新品;1->新品', recommand_status int(1) comment '推荐状态;0->不推荐;1->推荐', verify_status int(1) comment '审核状态:0->未审核;1->审核通过', sort int comment '排序', sale int comment '销量', price decimal(10,2), promotion_price decimal(10,2) comment '促销价格', gift_growth int default 0 comment '赠送的成长值', gift_point int default 0 comment '赠送的积分', use_point_limit int comment '限制使用的积分数', sub_title varchar(255) comment '副标题', description text comment '商品描述', original_price decimal(10,2) comment '市场价', stock int comment '库存', low_stock int comment '库存预警值', unit varchar(16) comment '单位', weight decimal(10,2) comment '商品重量,默认为克', preview_status int(1) comment '是否为预告商品:0->不是;1->是', service_ids varchar(64) comment '以逗号分割的产品服务:1->无忧退货;2->快速退款;3->免费包邮', keywords varchar(255), note varchar(255), album_pics varchar(255) comment '画册图片,连产品图片限制为5张,以逗号分割', detail_title varchar(255), detail_desc text, detail_html text comment '产品详情网页内容', detail_mobile_html text comment '移动端网页详情', promotion_start_time datetime comment '促销开始时间', promotion_end_time datetime comment '促销结束时间', promotion_per_limit int comment '活动限购数量', promotion_type int(1) comment '促销类型:0->没有促销使用原价;1->使用促销价;2->使用会员价;3->使用阶梯价格;4->使用满减价格;5->限时购', product_category_name varchar(255) comment '产品分类名称', brand_name varchar(255) comment '品牌名称', primary key (id) ); alter table pms_product comment '商品信息'; /*==============================================================*/ /* Table: pms_product_attribute */ /*==============================================================*/ create table pms_product_attribute ( id bigint not null auto_increment, product_attribute_category_id bigint, name varchar(64), select_type int(1) comment '属性选择类型:0->唯一;1->单选;2->多选;对应属性和参数意义不同;', input_type int(1) comment '属性录入方式:0->手工录入;1->从列表中选取', input_list varchar(255) comment '可选值列表,以逗号隔开', sort int comment '排序字段:最高的可以单独上传图片', filter_type int(1) comment '分类筛选样式:1->普通;1->颜色', search_type int(1) comment '检索类型;0->不需要进行检索;1->关键字检索;2->范围检索', related_status int(1) comment '相同属性产品是否关联;0->不关联;1->关联', hand_add_status int(1) comment '是否支持手动新增;0->不支持;1->支持', type int(1) comment '属性的类型;0->规格;1->参数', primary key (id) ); alter table pms_product_attribute comment '商品属性参数表'; /*==============================================================*/ /* Table: pms_product_attribute_category */ /*==============================================================*/ create table pms_product_attribute_category ( id bigint not null auto_increment, name varchar(64), attribute_count int comment '属性数量', param_count int comment '参数数量', primary key (id) ); alter table pms_product_attribute_category comment '产品属性分类表'; /*==============================================================*/ /* Table: pms_product_attribute_value */ /*==============================================================*/ create table pms_product_attribute_value ( id bigint not null auto_increment, product_id bigint, product_attribute_id bigint, value varchar(64) comment '手动添加规格或参数的值,参数单值,规格有多个时以逗号隔开', primary key (id) ); alter table pms_product_attribute_value comment '存储产品参数信息的表'; /*==============================================================*/ /* Table: pms_product_category */ /*==============================================================*/ create table pms_product_category ( id bigint not null auto_increment, parent_id bigint comment '上机分类的编号:0表示一级分类', name varchar(64), level int(1) comment '分类级别:0->1级;1->2级', product_count int, product_unit varchar(64), nav_status int(1) comment '是否显示在导航栏:0->不显示;1->显示', show_status int(1) comment '显示状态:0->不显示;1->显示', sort int, icon varchar(255) comment '图标', keywords varchar(255), description text comment '描述', primary key (id) ); alter table pms_product_category comment '产品分类'; /*==============================================================*/ /* Table: pms_product_category_attribute_relation */ /*==============================================================*/ create table pms_product_category_attribute_relation ( id bigint not null auto_increment, product_category_id bigint, product_attribute_id bigint, primary key (id) ); alter table pms_product_category_attribute_relation comment '产品的分类和属性的关系表,用于设置分类筛选条件(只支持一级分类)'; /*==============================================================*/ /* Table: pms_product_full_reduction */ /*==============================================================*/ create table pms_product_full_reduction ( id bigint not null auto_increment, product_id bigint, full_price decimal(10,2), reduce_price decimal(10,2), primary key (id) ); alter table pms_product_full_reduction comment '产品满减表(只针对同商品)'; /*==============================================================*/ /* Table: pms_product_ladder */ /*==============================================================*/ create table pms_product_ladder ( id bigint not null auto_increment, product_id bigint, count int comment '满足的商品数量', discount decimal(10,2) comment '折扣', price decimal(10,2) comment '折后价格', primary key (id) ); alter table pms_product_ladder comment '产品阶梯价格表(只针对同商品)'; /*==============================================================*/ /* Table: pms_product_operate_log */ /*==============================================================*/ create table pms_product_operate_log ( id bigint not null auto_increment, product_id bigint, price_old decimal(10,2), price_new decimal(10,2), sale_price_old decimal(10,2), sale_price_new decimal(10,2), gift_point_old int comment '赠送的积分', gift_point_new int, use_point_limit_old int, use_point_limit_new int, operate_man varchar(64) comment '操作人', create_time datetime, primary key (id) ); /*==============================================================*/ /* Table: pms_product_vertify_record */ /*==============================================================*/ create table pms_product_vertify_record ( id bigint not null auto_increment, product_id bigint, create_time datetime, vertify_man varchar(64) comment '审核人', status int(1) comment '审核后的状态:0->未通过;2->已通过', detail varchar(255) comment '反馈详情', primary key (id) ); alter table pms_product_vertify_record comment '商品审核记录'; /*==============================================================*/ /* Table: pms_sku_stock */ /*==============================================================*/ create table pms_sku_stock ( id bigint not null auto_increment, product_id bigint, sku_code varchar(64) not null comment 'sku编码', price decimal(10,2), stock int default 0 comment '库存', low_stock int comment '预警库存', pic varchar(255) comment '展示图片', sale int comment '销量', promotion_price decimal(10,2) comment '单品促销价格', lock_stock int default 0 comment '锁定库存', sp_data varchar(500) comment '商品销售属性,json格式', primary key (id) ); alter table pms_sku_stock comment 'sku的库存'; /*==============================================================*/ /* Table: sms_coupon */ /*==============================================================*/ create table sms_coupon ( id bigint not null auto_increment, type int(1) comment '优惠卷类型;0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券', name varchar(100), platform int(1) comment '使用平台:0->全部;1->移动;2->PC', count int comment '数量', amount decimal(10,2) comment '金额', per_limit int comment '每人限领张数', min_point decimal(10,2) comment '使用门槛;0表示无门槛', start_time datetime, end_time datetime, use_type int(1) comment '使用类型:0->全场通用;1->指定分类;2->指定商品', note varchar(200) comment '备注', publish_count int comment '发行数量', use_count int comment '已使用数量', receive_count int comment '领取数量', enable_time datetime comment '可以领取的日期', code varchar(64) comment '优惠码', member_level int(1) comment '可领取的会员类型:0->无限时', primary key (id) ); alter table sms_coupon comment '优惠卷表'; /*==============================================================*/ /* Table: sms_coupon_history */ /*==============================================================*/ create table sms_coupon_history ( id bigint not null auto_increment, coupon_id bigint, member_id bigint, order_id bigint comment '订单id', coupon_code varchar(64), member_nickname varchar(64) comment '领取人昵称', get_type int(1) comment '获取类型:0->后台赠送;1->主动获取', create_time datetime, use_status int(1) comment '使用状态:0->未使用;1->已使用;2->已过期', use_time datetime comment '使用时间', order_sn varchar(100) comment '订单号码', primary key (id) ); alter table sms_coupon_history comment '优惠券使用、领取历史表'; /*==============================================================*/ /* Table: sms_coupon_product_category_relation */ /*==============================================================*/ create table sms_coupon_product_category_relation ( id bigint not null auto_increment, coupon_id bigint, product_category_id bigint, product_category_name varchar(200) comment '产品分类名称', parent_category_name varchar(200) comment '父分类名称', primary key (id) ); alter table sms_coupon_product_category_relation comment '优惠券和产品分类关系表'; /*==============================================================*/ /* Table: sms_coupon_product_relation */ /*==============================================================*/ create table sms_coupon_product_relation ( id bigint not null auto_increment, coupon_id bigint, product_id bigint, product_name varchar(500) comment '商品名称', product_sn varchar(200) comment '商品编码', primary key (id) ); alter table sms_coupon_product_relation comment '优惠券和产品的关系表'; /*==============================================================*/ /* Table: sms_flash_promotion */ /*==============================================================*/ create table sms_flash_promotion ( id bigint not null auto_increment, title varchar(200), start_date date comment '开始日期', end_date date comment '结束日期', status int(1) comment '上下线状态', create_time datetime comment '秒杀时间段名称', primary key (id) ); alter table sms_flash_promotion comment '限时购表'; /*==============================================================*/ /* Table: sms_flash_promotion_log */ /*==============================================================*/ create table sms_flash_promotion_log ( id int not null auto_increment, member_id bigint, product_id bigint, member_phone varchar(64), product_name varchar(100), subscribe_time datetime comment '会员订阅时间', send_time datetime, primary key (id) ); alter table sms_flash_promotion_log comment '限时购通知记录'; /*==============================================================*/ /* Table: sms_flash_promotion_product_relation */ /*==============================================================*/ create table sms_flash_promotion_product_relation ( id bigint not null auto_increment comment '编号', flash_promotion_id bigint, flash_promotion_session_id bigint comment '编号', product_id bigint, flash_promotion_price decimal(10,2) comment '限时购价格', flash_promotion_count int comment '限时购数量', flash_promotion_limit int comment '每人限购数量', sort int comment '排序', primary key (id) ); alter table sms_flash_promotion_product_relation comment '商品限时购与商品关系表'; /*==============================================================*/ /* Table: sms_flash_promotion_session */ /*==============================================================*/ create table sms_flash_promotion_session ( id bigint not null auto_increment comment '编号', name varchar(200) comment '场次名称', start_time time comment '每日开始时间', end_time time comment '每日结束时间', status int(1) comment '启用状态:0->不启用;1->启用', create_time datetime comment '创建时间', primary key (id) ); alter table sms_flash_promotion_session comment '限时购场次表'; /*==============================================================*/ /* Table: sms_home_advertise */ /*==============================================================*/ create table sms_home_advertise ( id bigint not null auto_increment, name varchar(100), type int(1) comment '轮播位置:0->PC首页轮播;1->app首页轮播', pic varchar(500), start_time datetime, end_time datetime, status int(1) comment '上下线状态:0->下线;1->上线', click_count int comment '点击数', order_count int comment '下单数', url varchar(500) comment '链接地址', note varchar(500) comment '备注', sort int default 0 comment '排序', primary key (id) ); alter table sms_home_advertise comment '首页轮播广告表'; /*==============================================================*/ /* Table: sms_home_brand */ /*==============================================================*/ create table sms_home_brand ( id bigint not null auto_increment, brand_id bigint, brand_name varchar(64), recommend_status int(1), sort int, primary key (id) ); alter table sms_home_brand comment '首页推荐品牌表'; /*==============================================================*/ /* Table: sms_home_new_product */ /*==============================================================*/ create table sms_home_new_product ( id bigint not null auto_increment, product_id bigint, product_name varchar(64), recommend_status int(1), sort int(1), primary key (id) ); alter table sms_home_new_product comment '新鲜好物表'; /*==============================================================*/ /* Table: sms_home_recommend_product */ /*==============================================================*/ create table sms_home_recommend_product ( id bigint not null auto_increment, product_id bigint, product_name varchar(64), recommend_status int(1), sort int(1), primary key (id) ); alter table sms_home_recommend_product comment '人气推荐商品表'; /*==============================================================*/ /* Table: sms_home_recommend_subject */ /*==============================================================*/ create table sms_home_recommend_subject ( id bigint not null auto_increment, subject_id bigint, subject_name varchar(64), recommend_status int(1), sort int, primary key (id) ); alter table sms_home_recommend_subject comment '首页推荐专题表'; /*==============================================================*/ /* Table: ums_admin */ /*==============================================================*/ create table ums_admin ( id bigint not null auto_increment, username varchar(64) comment '用户名', password varchar(64) comment '密码', icon varchar(500) comment '头像', email varchar(100) comment '邮箱', nick_name varchar(200) comment '昵称', note varchar(500) comment '备注信息', create_time datetime comment '创建时间', login_time datetime comment '最后登录时间', status int(1) default 1 comment '帐号启用状态:0->禁用;1->启用', primary key (id) ); alter table ums_admin comment '后台用户表'; /*==============================================================*/ /* Table: ums_admin_login_log */ /*==============================================================*/ create table ums_admin_login_log ( id bigint not null auto_increment, admin_id bigint, create_time datetime, ip varchar(64), address varchar(100), user_agent varchar(100) comment '浏览器登录类型', primary key (id) ); alter table ums_admin_login_log comment '后台用户登录日志表'; /*==============================================================*/ /* Table: ums_admin_permission_relation */ /*==============================================================*/ create table ums_admin_permission_relation ( id bigint not null auto_increment, admin_id bigint, permission_id bigint, type int(1), primary key (id) ); alter table ums_admin_permission_relation comment '后台用户和权限关系表(除角色中定义的权限以外的加减权限)'; /*==============================================================*/ /* Table: ums_admin_role_relation */ /*==============================================================*/ create table ums_admin_role_relation ( id bigint not null auto_increment, admin_id bigint, role_id bigint, primary key (id) ); alter table ums_admin_role_relation comment '后台用户和角色关系表'; /*==============================================================*/ /* Table: ums_growth_change_history */ /*==============================================================*/ create table ums_growth_change_history ( id bigint not null auto_increment, member_id bigint, create_time datetime, change_type int(1) comment '改变类型:0->增加;1->减少', change_count int comment '积分改变数量', operate_man varchar(100) comment '操作人员', operate_note varchar(200) comment '操作备注', source_type int(1) comment '积分来源:0->购物;1->管理员修改', primary key (id) ); alter table ums_growth_change_history comment '成长值变化历史记录表'; /*==============================================================*/ /* Table: ums_integration_change_history */ /*==============================================================*/ create table ums_integration_change_history ( id bigint not null auto_increment, member_id bigint, create_time datetime, change_type int(1) comment '改变类型:0->增加;1->减少', change_count int comment '积分改变数量', operate_man varchar(100) comment '操作人员', operate_note varchar(200) comment '操作备注', source_type int(1) comment '积分来源:0->购物;1->管理员修改', primary key (id) ); alter table ums_integration_change_history comment '积分变化历史记录表'; /*==============================================================*/ /* Table: ums_integration_consume_setting */ /*==============================================================*/ create table ums_integration_consume_setting ( id bigint not null auto_increment, deduction_per_amount int comment '每一元需要抵扣的积分数量', max_percent_per_order int comment '每笔订单最高抵用百分比', use_unit int comment '每次使用积分最小单位100', coupon_status int(1) comment '是否可以和优惠券同用;0->不可以;1->可以', primary key (id) ); alter table ums_integration_consume_setting comment '积分消费设置'; /*==============================================================*/ /* Table: ums_member */ /*==============================================================*/ create table ums_member ( id bigint not null auto_increment, member_level_id bigint, username varchar(64) comment '用户名', password varchar(64) comment '密码', nickname varchar(64) comment '昵称', phone varchar(64) comment '手机号码', status int(1) comment '帐号启用状态:0->禁用;1->启用', create_time datetime comment '注册时间', icon varchar(500) comment '头像', gender int(1) comment '性别:0->未知;1->男;2->女', birthday date comment '生日', city varchar(64) comment '所做城市', job varchar(100) comment '职业', personalized_signature varchar(200) comment '个性签名', source_type int(1) comment '用户来源', integration int comment '积分', growth int comment '成长值', luckey_count int comment '剩余抽奖次数', history_integration int comment '历史积分数量', primary key (id) ); alter table ums_member comment '会员表'; /*==============================================================*/ /* Table: ums_member_level */ /*==============================================================*/ create table ums_member_level ( id bigint not null auto_increment, name varchar(100), growth_point int, default_status int(1) comment '是否为默认等级:0->不是;1->是', free_freight_point decimal(10,2) comment '免运费标准', comment_growth_point int comment '每次评价获取的成长值', priviledge_free_freight int(1) comment '是否有免邮特权', priviledge_sign_in int(1) comment '是否有签到特权', priviledge_comment int(1) comment '是否有评论获奖励特权', priviledge_promotion int(1) comment '是否有专享活动特权', priviledge_member_price int(1) comment '是否有会员价格特权', priviledge_birthday int(1) comment '是否有生日特权', note varchar(200), primary key (id) ); alter table ums_member_level comment '会员等级表'; /*==============================================================*/ /* Table: ums_member_login_log */ /*==============================================================*/ create table ums_member_login_log ( id bigint not null auto_increment, member_id bigint, create_time datetime, ip varchar(64), city varchar(64), login_type int(1) comment '登录类型:0->PC;1->android;2->ios;3->小程序', province varchar(64), primary key (id) ); alter table ums_member_login_log comment '会员登录记录'; /*==============================================================*/ /* Table: ums_member_member_tag_relation */ /*==============================================================*/ create table ums_member_member_tag_relation ( id bigint not null auto_increment, member_id bigint, tag_id bigint, primary key (id) ); alter table ums_member_member_tag_relation comment '用户和标签关系表'; /*==============================================================*/ /* Table: ums_member_product_category_relation */ /*==============================================================*/ create table ums_member_product_category_relation ( id bigint not null auto_increment, member_id bigint, product_category_id bigint, primary key (id) ); alter table ums_member_product_category_relation comment '会员与产品分类关系表(用户喜欢的分类)'; /*==============================================================*/ /* Table: ums_member_receive_address */ /*==============================================================*/ create table ums_member_receive_address ( id bigint not null auto_increment, member_id bigint, name varchar(100) comment '收货人名称', phone_number varchar(64), default_status int(1) comment '是否为默认', post_code varchar(100) comment '邮政编码', province varchar(100) comment '省份/直辖市', city varchar(100) comment '城市', region varchar(100) comment '区', detail_address varchar(128) comment '详细地址(街道)', primary key (id) ); alter table ums_member_receive_address comment '会员收货地址表'; /*==============================================================*/ /* Table: ums_member_rule_setting */ /*==============================================================*/ create table ums_member_rule_setting ( id bigint not null auto_increment, continue_sign_day int comment '连续签到天数', continue_sign_point int comment '连续签到赠送数量', consume_per_point decimal(10,2) comment '每消费多少元获取1个点', low_order_amount decimal(10,2) comment '最低获取点数的订单金额', max_point_per_order int comment '每笔订单最高获取点数', type int(1) comment '类型:0->积分规则;1->成长值规则', primary key (id) ); alter table ums_member_rule_setting comment '会员积分成长规则表'; /*==============================================================*/ /* Table: ums_member_statistics_info */ /*==============================================================*/ create table ums_member_statistics_info ( id bigint not null auto_increment, member_id bigint, consume_amount decimal(10,2) comment '累计消费金额', order_count int comment '订单数量', coupon_count int comment '优惠券数量', comment_count int comment '评价数', return_order_count int comment '退货数量', login_count int comment '登录次数', attend_count int comment '关注数量', fans_count int comment '粉丝数量', collect_product_count int, collect_subject_count int, collect_topic_count int, collect_comment_count int, invite_friend_count int, recent_order_time datetime comment '最后一次下订单时间', primary key (id) ); alter table ums_member_statistics_info comment '会员统计信息'; /*==============================================================*/ /* Table: ums_member_tag */ /*==============================================================*/ create table ums_member_tag ( id bigint not null auto_increment, name varchar(100), finish_order_count int comment '自动打标签完成订单数量', finish_order_amount decimal(10,2) comment '自动打标签完成订单金额', primary key (id) ); alter table ums_member_tag comment '用户标签表'; /*==============================================================*/ /* Table: ums_member_task */ /*==============================================================*/ create table ums_member_task ( id bigint not null auto_increment, name varchar(100), growth int comment '赠送成长值', intergration int comment '赠送积分', type int(1) comment '任务类型:0->新手任务;1->日常任务', primary key (id) ); alter table ums_member_task comment '会员任务表'; /*==============================================================*/ /* Table: ums_menu */ /*==============================================================*/ create table ums_menu ( id bigint not null auto_increment, parent_id bigint comment '父级ID', create_time datetime comment '创建时间', title varchar(100) comment '菜单名称', level int(4) comment '菜单级数', sort int(4) comment '菜单排序', name varchar(100) comment '前端名称', icon varchar(200) comment '前端图标', hidden int(1) comment '前端隐藏', primary key (id) ); alter table ums_menu comment '后台菜单表'; /*==============================================================*/ /* Table: ums_permission */ /*==============================================================*/ create table ums_permission ( id bigint not null auto_increment, pid bigint comment '父级权限id', name varchar(100) comment '名称', value varchar(200) comment '权限值', icon varchar(500) comment '图标', type int(1) comment '权限类型:0->目录;1->菜单;2->按钮(接口绑定权限)', uri varchar(200) comment '前端资源路径', status int(1) comment '启用状态;0->禁用;1->启用', create_time datetime comment '创建时间', sort int comment '排序', primary key (id) ); alter table ums_permission comment '后台用户权限表'; /*==============================================================*/ /* Table: ums_resource */ /*==============================================================*/ create table ums_resource ( id bigint not null auto_increment, category_id bigint comment '资源分类ID', create_time datetime comment '创建时间', name varchar(200) comment '资源名称', url varchar(200) comment '资源URL', description varchar(500) comment '描述', primary key (id) ); alter table ums_resource comment '后台资源表'; /*==============================================================*/ /* Table: ums_resource_category */ /*==============================================================*/ create table ums_resource_category ( id bigint not null auto_increment, create_time datetime comment '创建时间', name varchar(200) comment '分类名称', sort int(4) comment '排序', primary key (id) ); alter table ums_resource_category comment '资源分类表'; /*==============================================================*/ /* Table: ums_role */ /*==============================================================*/ create table ums_role ( id bigint not null auto_increment, name varchar(100) comment '名称', description varchar(500) comment '描述', admin_count int comment '后台用户数量', create_time datetime comment '创建时间', status int(1) default 1 comment '启用状态:0->禁用;1->启用', sort int default 0, primary key (id) ); alter table ums_role comment '后台用户角色表'; /*==============================================================*/ /* Table: ums_role_menu_relation */ /*==============================================================*/ create table ums_role_menu_relation ( id bigint not null auto_increment, role_id bigint comment '角色ID', menu_id bigint comment '菜单ID', primary key (id) ); alter table ums_role_menu_relation comment '后台角色菜单关系表'; /*==============================================================*/ /* Table: ums_role_permission_relation */ /*==============================================================*/ create table ums_role_permission_relation ( id bigint not null auto_increment, role_id bigint, permission_id bigint, primary key (id) ); alter table ums_role_permission_relation comment '后台用户角色和权限关系表'; /*==============================================================*/ /* Table: ums_role_resource_relation */ /*==============================================================*/ create table ums_role_resource_relation ( id bigint not null auto_increment, role_id bigint comment '角色ID', resource_id bigint comment '资源ID', primary key (id) ); alter table ums_role_resource_relation comment '后台角色资源关系表'; alter table cms_help add constraint FK_Reference_32 foreign key (category_id) references cms_help_category (id) on delete restrict on update restrict; alter table cms_prefrence_area_product_relation add constraint FK_Reference_18 foreign key (prefrence_area_id) references cms_prefrence_area (id) on delete restrict on update restrict; alter table cms_prefrence_area_product_relation add constraint FK_Reference_19 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table cms_subject add constraint FK_Reference_28 foreign key (category_id) references cms_subject_category (id) on delete restrict on update restrict; alter table cms_subject_comment add constraint FK_Reference_29 foreign key (subject_id) references cms_subject (id) on delete restrict on update restrict; alter table cms_subject_product_relation add constraint FK_Reference_26 foreign key (subject_id) references cms_subject (id) on delete restrict on update restrict; alter table cms_subject_product_relation add constraint FK_Reference_27 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table cms_topic add constraint FK_Reference_31 foreign key (category_id) references cms_topic_category (id) on delete restrict on update restrict; alter table cms_topic_comment add constraint FK_Reference_30 foreign key (topic_id) references cms_topic (id) on delete restrict on update restrict; alter table oms_cart_item add constraint FK_Reference_65 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table oms_cart_item add constraint FK_Reference_66 foreign key (product_sku_id) references pms_sku_stock (id) on delete restrict on update restrict; alter table oms_cart_item add constraint FK_Reference_67 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table oms_order add constraint FK_Reference_57 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table oms_order add constraint FK_Reference_61 foreign key (coupon_id) references sms_coupon (id) on delete restrict on update restrict; alter table oms_order_item add constraint FK_Reference_58 foreign key (order_id) references oms_order (id) on delete restrict on update restrict; alter table oms_order_item add constraint FK_Reference_59 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table oms_order_operate_history add constraint FK_Reference_62 foreign key (order_id) references oms_order (id) on delete restrict on update restrict; alter table oms_order_return_apply add constraint FK_Reference_63 foreign key (order_id) references oms_order (id) on delete restrict on update restrict; alter table oms_order_return_apply add constraint FK_Reference_64 foreign key (company_address_id) references oms_company_address (id) on delete restrict on update restrict; alter table oms_order_return_apply add constraint FK_Reference_75 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table pms_album_pic add constraint FK_Reference_25 foreign key (album_id) references pms_album (id) on delete restrict on update restrict; alter table pms_comment add constraint FK_Reference_23 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table pms_comment_replay add constraint FK_Reference_24 foreign key (comment_id) references pms_comment (id) on delete restrict on update restrict; alter table pms_member_price add constraint FK_Reference_60 foreign key (member_level_id) references ums_member_level (id) on delete restrict on update restrict; alter table pms_member_price add constraint FK_Reference_9 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table pms_product add constraint FK_Reference_1 foreign key (brand_id) references pms_brand (id) on delete restrict on update restrict; alter table pms_product add constraint FK_Reference_13 foreign key (product_attribute_category_id) references pms_product_attribute_category (id) on delete restrict on update restrict; alter table pms_product add constraint FK_Reference_5 foreign key (product_category_id) references pms_product_category (id) on delete restrict on update restrict; alter table pms_product add constraint FK_Reference_6 foreign key (feight_template_id) references pms_feight_template (id) on delete restrict on update restrict; alter table pms_product_attribute add constraint FK_Reference_12 foreign key (product_attribute_category_id) references pms_product_attribute_category (id) on delete restrict on update restrict; alter table pms_product_attribute_value add constraint FK_Reference_14 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table pms_product_attribute_value add constraint FK_Reference_15 foreign key (product_attribute_id) references pms_product_attribute (id) on delete restrict on update restrict; alter table pms_product_category add constraint FK_Reference_20 foreign key (parent_id) references pms_product_category (id) on delete restrict on update restrict; alter table pms_product_category_attribute_relation add constraint FK_Reference_21 foreign key (product_category_id) references pms_product_category (id) on delete restrict on update restrict; alter table pms_product_category_attribute_relation add constraint FK_Reference_22 foreign key (product_attribute_id) references pms_product_attribute (id) on delete restrict on update restrict; alter table pms_product_full_reduction add constraint FK_Reference_11 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table pms_product_ladder add constraint FK_Reference_10 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table pms_product_operate_log add constraint FK_Reference_4 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table pms_product_vertify_record add constraint FK_Reference_3 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table pms_sku_stock add constraint FK_Reference_2 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table sms_coupon_history add constraint FK_Reference_37 foreign key (coupon_id) references sms_coupon (id) on delete restrict on update restrict; alter table sms_coupon_history add constraint FK_Reference_38 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table sms_coupon_history add constraint FK_Reference_76 foreign key (order_id) references oms_order (id) on delete restrict on update restrict; alter table sms_coupon_product_category_relation add constraint FK_Reference_35 foreign key (coupon_id) references sms_coupon (id) on delete restrict on update restrict; alter table sms_coupon_product_category_relation add constraint FK_Reference_36 foreign key (product_category_id) references pms_product_category (id) on delete restrict on update restrict; alter table sms_coupon_product_relation add constraint FK_Reference_33 foreign key (coupon_id) references sms_coupon (id) on delete restrict on update restrict; alter table sms_coupon_product_relation add constraint FK_Reference_34 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table sms_flash_promotion_log add constraint FK_Reference_44 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table sms_flash_promotion_log add constraint FK_Reference_45 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table sms_flash_promotion_product_relation add constraint FK_Reference_77 foreign key (flash_promotion_id) references sms_flash_promotion (id) on delete restrict on update restrict; alter table sms_flash_promotion_product_relation add constraint FK_Reference_78 foreign key (flash_promotion_session_id) references sms_flash_promotion_session (id) on delete restrict on update restrict; alter table sms_flash_promotion_product_relation add constraint FK_Reference_79 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table sms_home_brand add constraint FK_Reference_39 foreign key (brand_id) references pms_brand (id) on delete restrict on update restrict; alter table sms_home_new_product add constraint FK_Reference_40 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table sms_home_recommend_product add constraint FK_Reference_41 foreign key (product_id) references pms_product (id) on delete restrict on update restrict; alter table sms_home_recommend_subject add constraint FK_Reference_42 foreign key (subject_id) references cms_subject (id) on delete restrict on update restrict; alter table ums_admin_login_log add constraint FK_Reference_46 foreign key (admin_id) references ums_admin (id) on delete restrict on update restrict; alter table ums_admin_permission_relation add constraint FK_Reference_73 foreign key (admin_id) references ums_admin (id) on delete restrict on update restrict; alter table ums_admin_permission_relation add constraint FK_Reference_74 foreign key (permission_id) references ums_permission (id) on delete restrict on update restrict; alter table ums_admin_role_relation add constraint FK_Reference_69 foreign key (admin_id) references ums_admin (id) on delete restrict on update restrict; alter table ums_admin_role_relation add constraint FK_Reference_70 foreign key (role_id) references ums_role (id) on delete restrict on update restrict; alter table ums_growth_change_history add constraint FK_Reference_56 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table ums_integration_change_history add constraint FK_Reference_55 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table ums_member add constraint FK_Reference_47 foreign key (member_level_id) references ums_member_level (id) on delete restrict on update restrict; alter table ums_member_login_log add constraint FK_Reference_52 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table ums_member_member_tag_relation add constraint FK_Reference_53 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table ums_member_member_tag_relation add constraint FK_Reference_54 foreign key (tag_id) references ums_member_tag (id) on delete restrict on update restrict; alter table ums_member_product_category_relation add constraint FK_Reference_48 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table ums_member_product_category_relation add constraint FK_Reference_49 foreign key (product_category_id) references pms_product_category (id) on delete restrict on update restrict; alter table ums_member_receive_address add constraint FK_Reference_51 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table ums_member_statistics_info add constraint FK_Reference_50 foreign key (member_id) references ums_member (id) on delete restrict on update restrict; alter table ums_menu add constraint FK_Reference_80 foreign key (parent_id) references ums_menu (id) on delete restrict on update restrict; alter table ums_permission add constraint FK_Reference_68 foreign key (pid) references ums_permission (id) on delete restrict on update restrict; alter table ums_resource add constraint FK_Reference_85 foreign key (category_id) references ums_resource_category (id) on delete restrict on update restrict; alter table ums_role_menu_relation add constraint FK_Reference_81 foreign key (role_id) references ums_role (id) on delete restrict on update restrict; alter table ums_role_menu_relation add constraint FK_Reference_82 foreign key (menu_id) references ums_menu (id) on delete restrict on update restrict; alter table ums_role_permission_relation add constraint FK_Reference_71 foreign key (role_id) references ums_role (id) on delete restrict on update restrict; alter table ums_role_permission_relation add constraint FK_Reference_72 foreign key (permission_id) references ums_permission (id) on delete restrict on update restrict; alter table ums_role_resource_relation add constraint FK_Reference_83 foreign key (role_id) references ums_role (id) on delete restrict on update restrict; alter table ums_role_resource_relation add constraint FK_Reference_84 foreign key (resource_id) references ums_resource (id) on delete restrict on update restrict;
the_stack
-- MySQL dump 10.13 Distrib 5.6.27, for Linux (x86_64) -- -- Host: bhd02 Database: azkaban_meta -- ------------------------------------------------------ -- Server version 5.6.20-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `active_executing_flows` -- DROP TABLE IF EXISTS `active_executing_flows`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `active_executing_flows` ( `exec_id` int(11) NOT NULL DEFAULT '0', `host` varchar(255) DEFAULT NULL, `port` int(11) DEFAULT NULL, `update_time` bigint(20) DEFAULT NULL, PRIMARY KEY (`exec_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `active_sla` -- DROP TABLE IF EXISTS `active_sla`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `active_sla` ( `exec_id` int(11) NOT NULL, `job_name` varchar(128) NOT NULL, `check_time` bigint(20) NOT NULL, `rule` tinyint(4) NOT NULL, `enc_type` tinyint(4) DEFAULT NULL, `options` longblob NOT NULL, PRIMARY KEY (`exec_id`,`job_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `execution_flows` -- DROP TABLE IF EXISTS `execution_flows`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `execution_flows` ( `exec_id` int(11) NOT NULL AUTO_INCREMENT, `project_id` int(11) NOT NULL, `version` int(11) NOT NULL, `flow_id` varchar(128) NOT NULL, `status` tinyint(4) DEFAULT NULL, `submit_user` varchar(64) DEFAULT NULL, `submit_time` bigint(20) DEFAULT NULL, `update_time` bigint(20) DEFAULT NULL, `start_time` bigint(20) DEFAULT NULL, `end_time` bigint(20) DEFAULT NULL, `enc_type` tinyint(4) DEFAULT NULL, `flow_data` longblob, PRIMARY KEY (`exec_id`), KEY `ex_flows_start_time` (`start_time`), KEY `ex_flows_end_time` (`end_time`), KEY `ex_flows_time_range` (`start_time`,`end_time`), KEY `ex_flows_flows` (`project_id`,`flow_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `execution_jobs` -- DROP TABLE IF EXISTS `execution_jobs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `execution_jobs` ( `exec_id` int(11) NOT NULL, `project_id` int(11) NOT NULL, `version` int(11) NOT NULL, `flow_id` varchar(128) NOT NULL, `job_id` varchar(128) NOT NULL, `attempt` int(11) NOT NULL DEFAULT '0', `start_time` bigint(20) DEFAULT NULL, `end_time` bigint(20) DEFAULT NULL, `status` tinyint(4) DEFAULT NULL, `input_params` longblob, `output_params` longblob, `attachments` longblob, PRIMARY KEY (`exec_id`,`job_id`,`attempt`), KEY `exec_job` (`exec_id`,`job_id`), KEY `exec_id` (`exec_id`), KEY `ex_job_id` (`project_id`,`job_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `execution_logs` -- DROP TABLE IF EXISTS `execution_logs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `execution_logs` ( `exec_id` int(11) NOT NULL, `name` varchar(128) NOT NULL DEFAULT '', `attempt` int(11) NOT NULL DEFAULT '0', `enc_type` tinyint(4) DEFAULT NULL, `start_byte` int(11) NOT NULL DEFAULT '0', `end_byte` int(11) DEFAULT NULL, `log` longblob, `upload_time` bigint(20) DEFAULT NULL, PRIMARY KEY (`exec_id`,`name`,`attempt`,`start_byte`), KEY `ex_log_attempt` (`exec_id`,`name`,`attempt`), KEY `ex_log_index` (`exec_id`,`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `kk_jobs` -- DROP TABLE IF EXISTS `kk_jobs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `kk_jobs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL COMMENT '任务名,不能重复', `project_name` varchar(64) NOT NULL COMMENT '项目名,一个任务只能属于一个项目,防止多次运行', `flow_name` varchar(64) DEFAULT '' COMMENT '流程中的最后的节点任务名,空为节点,非空为子流程', `server_host` varchar(30) DEFAULT '' COMMENT '任务所在服务器域名,或IP', `server_user` varchar(30) DEFAULT '' COMMENT '执行任务的服务器用户', `server_dir` varchar(200) DEFAULT '' COMMENT '执行任务的服务器目录,有的话自动执行cd', `server_script` varchar(500) NOT NULL COMMENT '执行任务的脚本命令', `dependencies` varchar(2000) DEFAULT '' COMMENT '依赖的任务,多个则以逗号分隔', `success_email` varchar(2000) DEFAULT '' COMMENT '执行成功时的邮件接收人', `failure_email` varchar(2000) DEFAULT '' COMMENT '执行成功时的邮件接收人', `success_sms` varchar(2000) DEFAULT '' COMMENT '执行成功时的短信接收人', `failure_sms` varchar(2000) DEFAULT '' COMMENT '执行失败时的短信接收人', `retries` tinyint(2) DEFAULT '0' COMMENT '失败后的重试次数', `creator` varchar(30) DEFAULT '' COMMENT '任务创建人', `updater` varchar(30) DEFAULT '' COMMENT '修改人', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `loc` varchar(50) DEFAULT '' COMMENT 'DAG中的位置', `ext_dependencies` varchar(4000) DEFAULT '' COMMENT '外部依赖,针对跨任务及跨时间维度的任务', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `project_name` (`project_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='自定义任务配置'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `kk_jobs_status` -- DROP TABLE IF EXISTS `kk_jobs_status`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `kk_jobs_status` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `job_name` varchar(200) NOT NULL COMMENT '任务名称', `execute_time` bigint(20) NOT NULL COMMENT '执行时间参数,只支持天级、小时级', `exec_id` bigint(20) DEFAULT '0' COMMENT 'azkaban任务ID', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '任务创建时间', `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '任务实际开始时间,所有依赖完成', `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '任务更新时间', `status` int(11) NOT NULL DEFAULT '0' COMMENT '任务状态,0执行中,1成功,-1失败', PRIMARY KEY (`id`), UNIQUE KEY `uni_job_exec` (`job_name`,`execute_time`), KEY `idx_job` (`job_name`), KEY `idx_execute_time` (`execute_time`), KEY `idx_status` (`status`), KEY `idx_exec_id` (`exec_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_events` -- DROP TABLE IF EXISTS `project_events`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `project_events` ( `project_id` int(11) NOT NULL, `event_type` tinyint(4) NOT NULL, `event_time` bigint(20) NOT NULL, `username` varchar(64) DEFAULT NULL, `message` varchar(512) DEFAULT NULL, KEY `log` (`project_id`,`event_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_files` -- DROP TABLE IF EXISTS `project_files`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `project_files` ( `project_id` int(11) NOT NULL, `version` int(11) NOT NULL, `chunk` int(11) NOT NULL DEFAULT '0', `size` int(11) DEFAULT NULL, `file` longblob, PRIMARY KEY (`project_id`,`version`,`chunk`), KEY `file_version` (`project_id`,`version`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_flows` -- DROP TABLE IF EXISTS `project_flows`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `project_flows` ( `project_id` int(11) NOT NULL, `version` int(11) NOT NULL, `flow_id` varchar(128) NOT NULL DEFAULT '', `modified_time` bigint(20) NOT NULL, `encoding_type` tinyint(4) DEFAULT NULL, `json` blob, PRIMARY KEY (`project_id`,`version`,`flow_id`), KEY `flow_index` (`project_id`,`version`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_permissions` -- DROP TABLE IF EXISTS `project_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `project_permissions` ( `project_id` varchar(64) NOT NULL, `modified_time` bigint(20) NOT NULL, `name` varchar(64) NOT NULL, `permissions` int(11) NOT NULL, `isGroup` tinyint(1) NOT NULL, PRIMARY KEY (`project_id`,`name`), KEY `permission_index` (`project_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_properties` -- DROP TABLE IF EXISTS `project_properties`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `project_properties` ( `project_id` int(11) NOT NULL, `version` int(11) NOT NULL, `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `modified_time` bigint(20) NOT NULL, `encoding_type` tinyint(4) DEFAULT NULL, `property` blob, PRIMARY KEY (`project_id`,`version`,`name`), KEY `idx_name` (`name`), KEY `properties_index` (`project_id`,`version`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_versions` -- DROP TABLE IF EXISTS `project_versions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `project_versions` ( `project_id` int(11) NOT NULL, `version` int(11) NOT NULL, `upload_time` bigint(20) NOT NULL, `uploader` varchar(64) NOT NULL, `file_type` varchar(16) DEFAULT NULL, `file_name` varchar(128) DEFAULT NULL, `md5` binary(16) DEFAULT NULL, `num_chunks` int(11) DEFAULT NULL, PRIMARY KEY (`project_id`,`version`), KEY `version_index` (`project_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `projects` -- DROP TABLE IF EXISTS `projects`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `projects` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL, `active` tinyint(1) DEFAULT NULL, `modified_time` bigint(20) NOT NULL, `create_time` bigint(20) NOT NULL, `version` int(11) DEFAULT NULL, `last_modified_by` varchar(64) NOT NULL, `description` varchar(255) DEFAULT NULL, `enc_type` tinyint(4) DEFAULT NULL, `settings_blob` longblob, PRIMARY KEY (`id`), UNIQUE KEY `project_id` (`id`), KEY `project_name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `properties` -- DROP TABLE IF EXISTS `properties`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `properties` ( `name` varchar(64) NOT NULL, `type` int(11) NOT NULL, `modified_time` bigint(20) NOT NULL, `value` varchar(256) DEFAULT NULL, PRIMARY KEY (`name`,`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `schedules` -- DROP TABLE IF EXISTS `schedules`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `schedules` ( `schedule_id` int(11) NOT NULL AUTO_INCREMENT, `project_id` int(11) NOT NULL, `project_name` varchar(128) NOT NULL, `flow_name` varchar(128) NOT NULL, `status` varchar(16) DEFAULT NULL, `first_sched_time` bigint(20) DEFAULT NULL, `timezone` varchar(64) DEFAULT NULL, `period` varchar(16) DEFAULT NULL, `last_modify_time` bigint(20) DEFAULT NULL, `next_exec_time` bigint(20) DEFAULT NULL, `submit_time` bigint(20) DEFAULT NULL, `submit_user` varchar(128) DEFAULT NULL, `enc_type` tinyint(4) DEFAULT NULL, `schedule_options` longblob, PRIMARY KEY (`schedule_id`), KEY `sched_project_id` (`project_id`,`flow_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `triggers` -- DROP TABLE IF EXISTS `triggers`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `triggers` ( `trigger_id` int(11) NOT NULL AUTO_INCREMENT, `trigger_source` varchar(128) DEFAULT NULL, `modify_time` bigint(20) NOT NULL, `enc_type` tinyint(4) DEFAULT NULL, `data` longblob, PRIMARY KEY (`trigger_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2017-03-17 17:09:35
the_stack
-- sync terminology wrt AD_Message.Value MKTG_Campaign_NewsletterGroup_Missing_For_Org -- 2019-07-23T04:02:13.888Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Message SET MsgText='Der Organisation {0} wurde noch keine Default Marketing Kampagne zugeordnet.',Updated=TO_TIMESTAMP('2019-07-23 06:02:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=544717 ; -- window for table C_PriceLimit_Restriction -- 2019-01-09T10:42:19.505 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2019-01-09 10:42:19','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Mindestpreis',PrintName='Mindestpreis',Description='Erlaubt das Hinterlegen von Regeln zum Festlegen von Mindestpreisen' WHERE AD_Element_ID=574393 AND AD_Language='de_CH' ; -- 2019-01-09T10:42:19.535 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(574393,'de_CH') ; -- 2019-01-09T10:42:31.918 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2019-01-09 10:42:31','YYYY-MM-DD HH24:MI:SS'),Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.' WHERE AD_Element_ID=574393 AND AD_Language='de_DE' ; -- 2019-01-09T10:42:31.931 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(574393,'de_DE') ; -- 2019-01-09T10:42:31.957 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(574393,'de_DE') ; -- 2019-01-09T10:42:31.969 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName=NULL, Name='Price Limit Restriction', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL WHERE AD_Element_ID=574393 ; -- 2019-01-09T10:42:31.977 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName=NULL, Name='Price Limit Restriction', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL WHERE AD_Element_ID=574393 AND IsCentrallyMaintained='Y' ; -- 2019-01-09T10:42:31.986 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Price Limit Restriction', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=574393) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 574393) ; -- 2019-01-09T10:42:32.006 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Price Limit Restriction', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 574393 ; -- 2019-01-09T10:42:32.019 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Price Limit Restriction', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL WHERE AD_Element_ID = 574393 ; -- 2019-01-09T10:42:32.032 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name='Price Limit Restriction', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 574393 ; -- 2019-01-09T10:42:47.294 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2019-01-09 10:42:47','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Mindestpreis',PrintName='Mindestpreis' WHERE AD_Element_ID=574393 AND AD_Language='de_DE' ; -- 2019-01-09T10:42:47.305 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(574393,'de_DE') ; -- 2019-01-09T10:42:47.329 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(574393,'de_DE') ; -- 2019-01-09T10:42:47.342 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName=NULL, Name='Mindestpreis', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL WHERE AD_Element_ID=574393 ; -- 2019-01-09T10:42:47.350 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName=NULL, Name='Mindestpreis', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL WHERE AD_Element_ID=574393 AND IsCentrallyMaintained='Y' ; -- 2019-01-09T10:42:47.358 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Mindestpreis', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=574393) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 574393) ; -- 2019-01-09T10:42:47.373 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Mindestpreis', Name='Mindestpreis' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=574393) ; -- 2019-01-09T10:42:47.382 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Mindestpreis', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 574393 ; -- 2019-01-09T10:42:47.391 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Mindestpreis', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', Help=NULL WHERE AD_Element_ID = 574393 ; -- 2019-01-09T10:42:47.401 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name='Mindestpreis', Description='Erlaubt das Hinterlegen von Regeln, um einen minimalen Mindestpreis festzulegen.', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 574393 ; -- 2019-01-09T10:42:51.170 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2019-01-09 10:42:51','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Element_ID=574393 AND AD_Language='en_US' ; -- 2019-01-09T10:42:51.181 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(574393,'en_US') ; -- 2019-07-23T04:33:59.904Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Table SET Name='C_PriceLimit_Restriction',Updated=TO_TIMESTAMP('2019-07-23 06:33:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540962 ; -- 2019-07-23T04:38:28.568Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,576929,0,TO_TIMESTAMP('2019-07-23 06:38:28','YYYY-MM-DD HH24:MI:SS'),100,'Der Endpreis darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten','D','Y','Mindestaufschlag auf Standardpreis','Mindestufschlag auf Standardpreis',TO_TIMESTAMP('2019-07-23 06:38:28','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-07-23T04:38:28.570Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=576929 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2019-07-23T04:38:34.335Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2019-07-23 06:38:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='de_CH' ; -- 2019-07-23T04:38:34.337Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'de_CH') ; -- 2019-07-23T04:38:36.716Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2019-07-23 06:38:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='de_DE' ; -- 2019-07-23T04:38:36.718Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'de_DE') ; -- 2019-07-23T04:38:36.724Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(576929,'de_DE') ; -- 2019-07-23T04:41:00.257Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='The actual price may not be less than the price list''s price plus this surcharge', IsTranslated='Y', Name='Min surcharge', PrintName='Min surcharge',Updated=TO_TIMESTAMP('2019-07-23 06:41:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='en_US' ; -- 2019-07-23T04:41:00.258Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'en_US') ; -- 2019-07-23T04:41:38.299Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten', Name='Mindestaufschlag', PrintName='Mindesaufschlag',Updated=TO_TIMESTAMP('2019-07-23 06:41:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='de_DE' ; -- 2019-07-23T04:41:38.301Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'de_DE') ; -- 2019-07-23T04:41:38.311Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(576929,'de_DE') ; -- 2019-07-23T04:41:38.313Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName=NULL, Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten', Help=NULL WHERE AD_Element_ID=576929 ; -- 2019-07-23T04:41:38.317Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName=NULL, Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten', Help=NULL WHERE AD_Element_ID=576929 AND IsCentrallyMaintained='Y' ; -- 2019-07-23T04:41:38.318Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=576929) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 576929) ; -- 2019-07-23T04:41:38.327Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Mindesaufschlag', Name='Mindestaufschlag' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=576929) ; -- 2019-07-23T04:41:38.330Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten', Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 576929 ; -- 2019-07-23T04:41:38.332Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten', Help=NULL WHERE AD_Element_ID = 576929 ; -- 2019-07-23T04:41:38.332Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Mindestaufschlag', Description = 'Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 576929 ; -- 2019-07-23T04:41:48.022Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='The actual price may not be less than the price list''s price plus this surcharge.',Updated=TO_TIMESTAMP('2019-07-23 06:41:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='en_US' ; -- 2019-07-23T04:41:48.023Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'en_US') ; -- 2019-07-23T04:41:53.344Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET PrintName='Mindestaufschlag auf Standardpreis',Updated=TO_TIMESTAMP('2019-07-23 06:41:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='nl_NL' ; -- 2019-07-23T04:41:53.346Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'nl_NL') ; -- 2019-07-23T04:42:08.544Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Name='Mindestaufschlag', PrintName='Mindestaufschlag',Updated=TO_TIMESTAMP('2019-07-23 06:42:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='de_CH' ; -- 2019-07-23T04:42:08.546Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'de_CH') ; -- 2019-07-23T04:42:14.194Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten.',Updated=TO_TIMESTAMP('2019-07-23 06:42:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='de_DE' ; -- 2019-07-23T04:42:14.195Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'de_DE') ; -- 2019-07-23T04:42:14.209Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(576929,'de_DE') ; -- 2019-07-23T04:42:14.211Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName=NULL, Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten.', Help=NULL WHERE AD_Element_ID=576929 ; -- 2019-07-23T04:42:14.212Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName=NULL, Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten.', Help=NULL WHERE AD_Element_ID=576929 AND IsCentrallyMaintained='Y' ; -- 2019-07-23T04:42:14.213Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=576929) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 576929) ; -- 2019-07-23T04:42:14.221Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten.', Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 576929 ; -- 2019-07-23T04:42:14.223Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Mindestaufschlag', Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten.', Help=NULL WHERE AD_Element_ID = 576929 ; -- 2019-07-23T04:42:14.225Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Mindestaufschlag', Description = 'Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten.', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 576929 ; -- 2019-07-23T04:42:22.129Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='Der Preis pro Einheit darf den Listenstandardpreis plus Mindestaufschlag nicht unterschreiten.',Updated=TO_TIMESTAMP('2019-07-23 06:42:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=576929 AND AD_Language='de_CH' ; -- 2019-07-23T04:42:22.130Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(576929,'de_CH') ;
the_stack
use patstat go /* Those triple argument rules and their queries are derivatives of other doubule rules. E.g. N1W4W5b pairs can be obtained by intersection of pair set that follows N1W4 rule and N1W5b rule. Since certain double rules can be omitted in 4.1 and 4.2, the triple rules that are made up of them behave differently. If all double rules are used, the triple rules scores provide only an additional bonus for scoring on multiple rules. If some double rules are omitted, triple rules should score the pairs with the point scale established in 4.1 and 4.2. However, this step can be considered as a simplification of the notion that pairs scored by multiple rules are more valuable than simple addition of rule scores. As a result, simple bonus can be provided to those pairs irrespective of their previous (lack of) scoring. */ --Strong N + Weak W + Weak W --N1W4W5a if object_id('rule_N1W4W5a') is not null drop table rule_N1W4W5a select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_N1W4W5a from evaluated_patterns as a join evaluated_patterns as b on a.bib_numeric=b.bib_numeric and a.bibliographic_type=b.bibliographic_type and a.residual=b.residual where a.new_id < b.new_id go --N1W4W5b if object_id('rule_N1W4W5b') is not null drop table rule_N1W4W5b select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_N1W4W5b from evaluated_patterns as a join evaluated_patterns as b on a.bib_numeric=b.bib_numeric and a.bibliographic_type=b.bibliographic_type where a.new_id < b.new_id and a.residual is not null and b.residual is not null and (len(a.residual))>=10 and (len(b.residual))>=10 and dbo.ComputeDistancePerc(substring(a.residual, ((len(a.residual)/2)-5), 10), substring(b.residual, ((len(b.residual)/2)-5), 10)) >= 0.70 except (select * from rule_N1W4W5a) go --Strong N + Middle W + Weak W --N1W3bW4 if object_id('rule_N1W3bW4') is not null drop table rule_N1W3bW4 select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_N1W3bW4 from evaluated_patterns as a join evaluated_patterns as b on a.bib_numeric=b.bib_numeric and a.bibliographic_type=b.bibliographic_type where a.new_id < b.new_id and a.name is not null and b.name is not null and a.aetal is null and b.aetal is null and dbo.ComputeDistancePerc(a.name, b.name) >= 0.70 go --N1W2bW5b if object_id('rule_N1W2bW5b') is not null drop table rule_N1W2bW5b select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_N1W2bW5b from evaluated_patterns as a join evaluated_patterns as b on a.bib_numeric=b.bib_numeric where a.new_id < b.new_id and a.aetal is not null and b.aetal is not null and dbo.ComputeDistancePerc(a.aetal, b.aetal) >= 0.70 and a.residual is not null and b.residual is not null and (len(a.residual))>=10 and (len(b.residual))>=10 and dbo.ComputeDistancePerc(substring(a.residual, ((len(a.residual)/2)-5), 10), substring(b.residual, ((len(b.residual)/2)-5), 10)) >= 0.70 go --N2... --N2W3bW4 if object_id('rule_N2W3bW4') is not null drop table rule_N2W3bW4 select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_N2W3bW4 from evaluated_patterns as a join evaluated_patterns as b on (a.issn=b.issn or a.isbn=b.isbn) and (a.pages_start=b.pages_start and a.volume=b.volume and a.d_year=b.d_year) and a.bibliographic_type=b.bibliographic_type where a.new_id < b.new_id go /* --N2W3bW5b if object_id('rule_N2W3bW5b') is not null drop table rule_N2W3bW5b select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_N2W3bW5b from evaluated_patterns as a join evaluated_patterns as b on (a.issn=b.issn or a.isbn=b.isbn) and (a.pages_start=b.pages_start and a.volume=b.volume and a.d_year=b.d_year) where a.new_id < b.new_id and a.residual is not null and b.residual is not null and (len(a.residual))>=10 and (len(b.residual))>=10 and dbo.ComputeDistancePerc(substring(a.residual, ((len(a.residual)/2)-5), 10), substring(b.residual, ((len(b.residual)/2)-5), 10)) >= 0.70 go */ --Strong W + Weak N + Weak W --W1bN3bW4 if object_id('rule_W1bN3bW4') is not null drop table rule_W1bN3bW4 select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_W1bN3bW4 from evaluated_patterns as a join evaluated_patterns as b on (a.pages_start=b.pages_start and a.volume=b.volume and a.d_year=b.d_year) and a.bibliographic_type=b.bibliographic_type where a.new_id < b.new_id and a.bib_alphabetic is not null and b.bib_alphabetic is not null and len(a.bib_alphabetic)>=10 and len(b.bib_alphabetic)>=10 and dbo.ComputeDistancePerc(substring(a.bib_alphabetic, ((len(a.bib_alphabetic)/2)-5),10), substring(b.bib_alphabetic, ((len(a.bib_alphabetic)/2)-5),10)) >= 0.60 go --W2aN3bW4 if object_id('rule_W2aN3bW4') is not null drop table rule_W2aN3bW4 select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_W2aN3bW4 from evaluated_patterns as a join evaluated_patterns as b on a.aetal=b.aetal and (a.pages_start=b.pages_start and a.volume=b.volume and a.d_year=b.d_year) and a.bibliographic_type=b.bibliographic_type where a.new_id < b.new_id go --Strong W + Middle N + Weak N --W1aN3aN4 if object_id('rule_W1aN3aN4') is not null drop table rule_W1aN3aN4 select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_W1aN3aN4 from evaluated_patterns as a join evaluated_patterns as b on (a.pages_start=b.pages_start and a.pages_end=b.pages_end and a.volume=b.volume and a.issue=b.issue and a.d_year=b.d_year and a.d_month=b.d_month) --N3a and a.bib_alphabetic=b.bib_alphabetic --W1a and (a.count_of_numbers=b.count_of_numbers and a.sum_of_numbers=b.sum_of_numbers and a.count_of_numbers>6 and b.count_of_numbers>6) --N4 where a.new_id < b.new_id go --W1bN3aN4 if object_id('rule_W1bN3aN4') is not null drop table rule_W1bN3aN4 select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_W1bN3aN4 from evaluated_patterns as a join evaluated_patterns as b on (a.pages_start=b.pages_start and a.pages_end=b.pages_end and a.volume=b.volume and a.issue=b.issue and a.d_year=b.d_year and a.d_month=b.d_month) --N3a and (a.count_of_numbers=b.count_of_numbers and a.sum_of_numbers=b.sum_of_numbers and a.count_of_numbers>6 and b.count_of_numbers>6) --N4 where a.new_id < b.new_id and a.bib_alphabetic is not null and b.bib_alphabetic is not null and len(a.bib_alphabetic)>=10 and len(b.bib_alphabetic)>=10 and dbo.ComputeDistancePerc(substring(a.bib_alphabetic, ((len(a.bib_alphabetic)/2)-5),10), substring(b.bib_alphabetic, ((len(a.bib_alphabetic)/2)-5),10)) >= 0.60 except (select * from rule_W1aN3aN4) go --W2... --W2aN3aN4 if object_id('rule_W2aN3aN4') is not null drop table rule_W2aN3aN4 select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_W2aN3aN4 from evaluated_patterns as a join evaluated_patterns as b on (a.pages_start=b.pages_start and a.pages_end=b.pages_end and a.volume=b.volume and a.issue=b.issue and a.d_year=b.d_year and a.d_month=b.d_month) --N3a and a.aetal=b.aetal --W2a and (a.count_of_numbers=b.count_of_numbers and a.sum_of_numbers=b.sum_of_numbers and a.count_of_numbers>6 and b.count_of_numbers>6) --N4 where a.new_id < b.new_id go --W3aN3aN4 if object_id('rule_W3aN3aN4') is not null drop table rule_W3aN3aN4 select distinct a.new_id as new_id1, b.new_id as new_id2 into rule_W3aN3aN4 from evaluated_patterns as a join evaluated_patterns as b on (a.pages_start=b.pages_start and a.pages_end=b.pages_end and a.volume=b.volume and a.issue=b.issue and a.d_year=b.d_year and a.d_month=b.d_month) --N3a and a.name=b.name --W3a and (a.count_of_numbers=b.count_of_numbers and a.sum_of_numbers=b.sum_of_numbers and a.count_of_numbers>6 and b.count_of_numbers>6) --N4 where a.new_id < b.new_id and a.aetal is null and b.aetal is null go --SCORE PAIRS if object_id('pairs_tmp') is not null drop table pairs_tmp if object_id('publn_pairs_AB3x') is not null drop table publn_pairs_AB3x go --Score points declare @score_N1 int = 9 declare @score_N2 int = 7 declare @score_N3a int = 6 declare @score_N3b int = 3 declare @score_N4 int = 1 declare @score_W1a int = 9 declare @score_W1b int = 8 declare @score_W2a int = 7 declare @score_W3a int = 6 declare @score_W2b int = 5 declare @score_W3b int = 4 declare @score_W4 int = 3 declare @score_W5 int = 2 declare @score_W6 int = 1 declare @bonus int = 4 --Neg rule vars declare @threshold int = 13 --12 is the minimum a triple rule can score, needs 1 more point to be a valid duplicate. 9 for investigation, real: 13 declare @neg_pairs_pass_points int = 9 -- it gets added to the last used neg_pair_pass_points select a.new_id1, a.new_id2, score = sum(a.score) into pairs_tmp from ( select * from publn_pairs_AB union all --select new_id1, new_id2, (-(@neg_pairs_pass_points-@threshold)) as score from rule_A --union all select new_id1, new_id2, (@bonus) as score from rule_N1W4W5a union all select new_id1, new_id2, (@bonus) as score from rule_N1W4W5b union all select new_id1, new_id2, (@bonus) as score from rule_N1W3bW4 union all select new_id1, new_id2, (@bonus) as score from rule_N1W2bW5b union all select new_id1, new_id2, (@bonus) as score from rule_N2W3bW4 union all --select new_id1, new_id2, (@bonus) as score from rule_N2W3bW5b --union all select new_id1, new_id2, (@bonus) as score from rule_W1bN3bW4 union all select new_id1, new_id2, (@bonus) as score from rule_W2aN3bW4 union all select new_id1, new_id2, (@bonus) as score from rule_W1aN3aN4 union all select new_id1, new_id2, (@bonus) as score from rule_W1bN3aN4 union all select new_id1, new_id2, (@bonus) as score from rule_W2aN3aN4 union all select new_id1, new_id2, (@bonus) as score from rule_W3aN3aN4 ) as a group by a.new_id1, a.new_id2 --Prepare table for clustering algorithm select * into publn_pairs_AB3x from pairs_tmp as a where a.score>=@threshold go --Clean up if object_id('pairs_tmp') is not null drop table pairs_tmp go --Inspect select a.new_id1, d.npl_biblio, a.new_id2, e.npl_biblio, a.score from publn_pairs_AB3x as a join sample_glue as b on a.new_id1 = b.new_id join sample_glue as c on a.new_id2 = c.new_id join sample_table as d on b.npl_publn_id = d.npl_publn_id join sample_table as e on c.npl_publn_id = e.npl_publn_id order by a.score desc go
the_stack
-- 06.07.2015 18:04 -- URL zum Konzept UPDATE AD_Element SET Description='Anzahl der zu erstellenden/zu druckenden Exemplare',Updated=TO_TIMESTAMP('2015-07-06 18:04:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=505211 ; -- 06.07.2015 18:04 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=505211 ; -- 06.07.2015 18:04 -- URL zum Konzept UPDATE AD_Column SET ColumnName='Copies', Name='Kopien', Description='Anzahl der zu erstellenden/zu druckenden Exemplare', Help=NULL WHERE AD_Element_ID=505211 ; -- 06.07.2015 18:04 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='Copies', Name='Kopien', Description='Anzahl der zu erstellenden/zu druckenden Exemplare', Help=NULL, AD_Element_ID=505211 WHERE UPPER(ColumnName)='COPIES' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 06.07.2015 18:04 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='Copies', Name='Kopien', Description='Anzahl der zu erstellenden/zu druckenden Exemplare', Help=NULL WHERE AD_Element_ID=505211 AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:04 -- URL zum Konzept UPDATE AD_Field SET Name='Kopien', Description='Anzahl der zu erstellenden/zu druckenden Exemplare', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=505211) AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:04 -- URL zum Konzept INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SeqNo,Updated,UpdatedBy,ValueMin,Version) VALUES (0,552574,505211,0,11,540459,'N','Copies',TO_TIMESTAMP('2015-07-06 18:04:56','YYYY-MM-DD HH24:MI:SS'),100,'N','1','Anzahl der zu erstellenden/zu druckenden Exemplare','de.metas.printing',14,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','Kopien',0,TO_TIMESTAMP('2015-07-06 18:04:56','YYYY-MM-DD HH24:MI:SS'),100,'1',0) ; -- 06.07.2015 18:04 -- URL zum Konzept INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=552574 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 06.07.2015 18:08 -- URL zum Konzept UPDATE AD_Tab SET Name='Paket-Info',Updated=TO_TIMESTAMP('2015-07-06 18:08:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=540480 ; -- 06.07.2015 18:08 -- URL zum Konzept UPDATE AD_Tab_Trl SET IsTranslated='N' WHERE AD_Tab_ID=540480 ; -- 06.07.2015 18:09 -- URL zum Konzept UPDATE AD_Table SET IsHighVolume='Y',Updated=TO_TIMESTAMP('2015-07-06 18:09:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540459 ; -- 06.07.2015 18:09 -- URL zum Konzept UPDATE AD_Table SET IsDeleteable='N',Updated=TO_TIMESTAMP('2015-07-06 18:09:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540459 ; -- 06.07.2015 18:11 -- URL zum Konzept UPDATE AD_Table SET Name='Druckpaket',Updated=TO_TIMESTAMP('2015-07-06 18:11:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540459 ; -- 06.07.2015 18:11 -- URL zum Konzept UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=540459 ; -- 06.07.2015 18:11 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2015-07-06 18:11:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548272 ; -- 06.07.2015 18:11 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2015-07-06 18:11:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548274 ; -- 06.07.2015 18:11 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2015-07-06 18:11:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548269 ; -- 06.07.2015 18:12 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2015-07-06 18:12:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548264 ; -- 06.07.2015 18:12 -- URL zum Konzept UPDATE AD_Element SET Name='Druckpaket', PrintName='Druckpaket',Updated=TO_TIMESTAMP('2015-07-06 18:12:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541955 ; -- 06.07.2015 18:12 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541955 ; -- 06.07.2015 18:12 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Print_Package_ID', Name='Druckpaket', Description=NULL, Help=NULL WHERE AD_Element_ID=541955 ; -- 06.07.2015 18:12 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Package_ID', Name='Druckpaket', Description=NULL, Help=NULL, AD_Element_ID=541955 WHERE UPPER(ColumnName)='C_PRINT_PACKAGE_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 06.07.2015 18:12 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Package_ID', Name='Druckpaket', Description=NULL, Help=NULL WHERE AD_Element_ID=541955 AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:12 -- URL zum Konzept UPDATE AD_Field SET Name='Druckpaket', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541955) AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:12 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druckpaket', Name='Druckpaket' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541955) ; -- 06.07.2015 18:13 -- URL zum Konzept UPDATE AD_Tab SET IsInsertRecord='N', IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-06 18:13:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=540480 ; -- 06.07.2015 18:13 -- URL zum Konzept UPDATE AD_Tab SET IsInsertRecord='N', IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-06 18:13:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=540479 ; -- 06.07.2015 18:13 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2015-07-06 18:13:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548256 ; -- 06.07.2015 18:14 -- URL zum Konzept UPDATE AD_Column SET AD_Reference_ID=30,Updated=TO_TIMESTAMP('2015-07-06 18:14:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548787 ; -- 06.07.2015 18:14 -- URL zum Konzept UPDATE AD_Element SET Description=NULL, Name='Seitenzahl', PrintName='Seitenzahl',Updated=TO_TIMESTAMP('2015-07-06 18:14:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541957 ; -- 06.07.2015 18:14 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541957 ; -- 06.07.2015 18:14 -- URL zum Konzept UPDATE AD_Column SET ColumnName='PageCount', Name='Seitenzahl', Description=NULL, Help=NULL WHERE AD_Element_ID=541957 ; -- 06.07.2015 18:14 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='PageCount', Name='Seitenzahl', Description=NULL, Help=NULL, AD_Element_ID=541957 WHERE UPPER(ColumnName)='PAGECOUNT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 06.07.2015 18:14 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='PageCount', Name='Seitenzahl', Description=NULL, Help=NULL WHERE AD_Element_ID=541957 AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:14 -- URL zum Konzept UPDATE AD_Field SET Name='Seitenzahl', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541957) AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:14 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Seitenzahl', Name='Seitenzahl' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541957) ; -- 06.07.2015 18:15 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-06 18:15:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551470 ; -- 06.07.2015 18:15 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-06 18:15:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551473 ; -- 06.07.2015 18:15 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-06 18:15:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551468 ; -- 06.07.2015 18:15 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-06 18:15:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551511 ; -- 06.07.2015 18:15 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y', SeqNo=15, SeqNoGrid=15,Updated=TO_TIMESTAMP('2015-07-06 18:15:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551461 ; -- 06.07.2015 18:16 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-06 18:16:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551459 ; -- 06.07.2015 18:16 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y', SeqNo=35, SeqNoGrid=35,Updated=TO_TIMESTAMP('2015-07-06 18:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551454 ; -- 06.07.2015 18:16 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-06 18:16:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551450 ; -- 06.07.2015 18:17 -- URL zum Konzept UPDATE AD_Field SET SeqNo=5, SeqNoGrid=5,Updated=TO_TIMESTAMP('2015-07-06 18:17:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551447 ; -- 06.07.2015 18:18 -- URL zum Konzept INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,Description,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,Updated,UpdatedBy) VALUES (0,552574,556215,0,540480,0,TO_TIMESTAMP('2015-07-06 18:18:07','YYYY-MM-DD HH24:MI:SS'),100,'Anzahl der zu erstellenden/zu druckenden Exemplare',0,'de.metas.printing',0,'Y','Y','Y','Y','N','N','N','N','N','Kopien',35,35,0,TO_TIMESTAMP('2015-07-06 18:18:07','YYYY-MM-DD HH24:MI:SS'),100) ; -- 06.07.2015 18:18 -- URL zum Konzept INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556215 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 06.07.2015 18:18 -- URL zum Konzept INSERT INTO EXP_FormatLine (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,EntityType,EXP_Format_ID,EXP_FormatLine_ID,IsActive,IsMandatory,IsPartUniqueIndex,Name,Position,Type,Updated,UpdatedBy,Value) VALUES (0,552574,0,TO_TIMESTAMP('2015-07-06 18:18:40','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.printing',540214,550142,'Y','Y','N','Copies',200,'E',TO_TIMESTAMP('2015-07-06 18:18:40','YYYY-MM-DD HH24:MI:SS'),100,'Copies') ; -- 06.07.2015 18:27 -- URL zum Konzept UPDATE AD_Field SET SeqNo=34, SeqNoGrid=34,Updated=TO_TIMESTAMP('2015-07-06 18:27:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551510 ; -- 06.07.2015 18:28 -- URL zum Konzept UPDATE AD_Element SET Name='Druck-Warteschlangendatensatz', PrintName='Druck-Warteschlangendatensatz',Updated=TO_TIMESTAMP('2015-07-06 18:28:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541927 ; -- 06.07.2015 18:28 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541927 ; -- 06.07.2015 18:28 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Printing_Queue_ID', Name='Druck-Warteschlangendatensatz', Description=NULL, Help=NULL WHERE AD_Element_ID=541927 ; -- 06.07.2015 18:28 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Printing_Queue_ID', Name='Druck-Warteschlangendatensatz', Description=NULL, Help=NULL, AD_Element_ID=541927 WHERE UPPER(ColumnName)='C_PRINTING_QUEUE_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 06.07.2015 18:28 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Printing_Queue_ID', Name='Druck-Warteschlangendatensatz', Description=NULL, Help=NULL WHERE AD_Element_ID=541927 AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:28 -- URL zum Konzept UPDATE AD_Field SET Name='Druck-Warteschlangendatensatz', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541927) AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:28 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druck-Warteschlangendatensatz', Name='Druck-Warteschlangendatensatz' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541927) ; -- 06.07.2015 18:32 -- URL zum Konzept INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SeqNo,Updated,UpdatedBy,ValueMin,Version) VALUES (0,552575,505211,0,11,540435,'N','Copies',TO_TIMESTAMP('2015-07-06 18:32:25','YYYY-MM-DD HH24:MI:SS'),100,'N','1','Anzahl der zu erstellenden/zu druckenden Exemplare','de.metas.printing',14,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','Kopien',0,TO_TIMESTAMP('2015-07-06 18:32:25','YYYY-MM-DD HH24:MI:SS'),100,'1',0) ; -- 06.07.2015 18:32 -- URL zum Konzept INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=552575 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 06.07.2015 18:33 -- URL zum Konzept UPDATE AD_Table SET Name='Druckjob Position',Updated=TO_TIMESTAMP('2015-07-06 18:33:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540436 ; -- 06.07.2015 18:33 -- URL zum Konzept UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=540436 ; -- 06.07.2015 18:33 -- URL zum Konzept UPDATE AD_Table SET Name='Druckjob',Updated=TO_TIMESTAMP('2015-07-06 18:33:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540437 ; -- 06.07.2015 18:33 -- URL zum Konzept UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=540437 ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Element SET Name='Druckjob', PrintName='Druckjob',Updated=TO_TIMESTAMP('2015-07-06 18:34:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541929 ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541929 ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Print_Job_ID', Name='Druckjob', Description=NULL, Help=NULL WHERE AD_Element_ID=541929 ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_ID', Name='Druckjob', Description=NULL, Help=NULL, AD_Element_ID=541929 WHERE UPPER(ColumnName)='C_PRINT_JOB_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_ID', Name='Druckjob', Description=NULL, Help=NULL WHERE AD_Element_ID=541929 AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Field SET Name='Druckjob', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541929) AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druckjob', Name='Druckjob' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541929) ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Element SET Name='Druckjob Position', PrintName='Druckjob Position',Updated=TO_TIMESTAMP('2015-07-06 18:34:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541928 ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541928 ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Print_Job_Line_ID', Name='Druckjob Position', Description=NULL, Help=NULL WHERE AD_Element_ID=541928 ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_Line_ID', Name='Druckjob Position', Description=NULL, Help=NULL, AD_Element_ID=541928 WHERE UPPER(ColumnName)='C_PRINT_JOB_LINE_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_Line_ID', Name='Druckjob Position', Description=NULL, Help=NULL WHERE AD_Element_ID=541928 AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_Field SET Name='Druckjob Position', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541928) AND IsCentrallyMaintained='Y' ; -- 06.07.2015 18:34 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druckjob Position', Name='Druckjob Position' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541928) ; -- 06.07.2015 18:52 -- URL zum Konzept UPDATE AD_Field SET SeqNo=15, SeqNoGrid=15,Updated=TO_TIMESTAMP('2015-07-06 18:52:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551216 ; -- 06.07.2015 18:52 -- URL zum Konzept UPDATE AD_Field SET SeqNo=5, SeqNoGrid=5,Updated=TO_TIMESTAMP('2015-07-06 18:52:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551216 ; -- 06.07.2015 18:53 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-06 18:53:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551662 ; -- -- setting parent column in print-package into subtab! -- -- 07.07.2015 12:03 -- URL zum Konzept UPDATE AD_Tab SET AD_Column_ID=548269,Updated=TO_TIMESTAMP('2015-07-07 12:03:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=540480 ; DELETE FROM exp_formatline WHERE AD_Column_ID=552574; -- 07.07.2015 12:12 -- URL zum Konzept DELETE FROM AD_Field WHERE AD_Field_ID=556215 ; -- 07.07.2015 12:12 -- URL zum Konzept DELETE FROM AD_Column_Trl WHERE AD_Column_ID=552574 ; -- 07.07.2015 12:12 -- URL zum Konzept DELETE FROM AD_Column WHERE AD_Column_ID=552574 ; -- 07.07.2015 12:13 -- URL zum Konzept INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SeqNo,Updated,UpdatedBy,ValueMin,Version) VALUES (0,552578,505211,0,11,540458,'N','Copies',TO_TIMESTAMP('2015-07-07 12:13:12','YYYY-MM-DD HH24:MI:SS'),100,'N','1','Anzahl der zu erstellenden/zu druckenden Exemplare','de.metas.printing',14,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','Kopien',0,TO_TIMESTAMP('2015-07-07 12:13:12','YYYY-MM-DD HH24:MI:SS'),100,'1',0) ; -- 07.07.2015 12:13 -- URL zum Konzept INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=552578 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 07.07.2015 12:14 -- URL zum Konzept INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,Description,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,Updated,UpdatedBy) VALUES (0,552578,556217,0,540479,0,TO_TIMESTAMP('2015-07-07 12:14:59','YYYY-MM-DD HH24:MI:SS'),100,'Anzahl der zu erstellenden/zu druckenden Exemplare',0,'de.metas.printing',0,'Y','Y','Y','Y','N','N','N','N','Y','Kopien',8,8,0,TO_TIMESTAMP('2015-07-07 12:14:59','YYYY-MM-DD HH24:MI:SS'),100) ; -- 07.07.2015 12:14 -- URL zum Konzept INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556217 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Element SET Name='Anz Druckpaket-Infos', PrintName='Anz Druckpaket-Infos',Updated=TO_TIMESTAMP('2015-07-07 12:15:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541958 ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541958 ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Column SET ColumnName='PackageInfoCount', Name='Anz Druckpaket-Infos', Description='Number of different package infos for a given print package.', Help=NULL WHERE AD_Element_ID=541958 ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='PackageInfoCount', Name='Anz Druckpaket-Infos', Description='Number of different package infos for a given print package.', Help=NULL, AD_Element_ID=541958 WHERE UPPER(ColumnName)='PACKAGEINFOCOUNT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='PackageInfoCount', Name='Anz Druckpaket-Infos', Description='Number of different package infos for a given print package.', Help=NULL WHERE AD_Element_ID=541958 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Field SET Name='Anz Druckpaket-Infos', Description='Number of different package infos for a given print package.', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541958) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Anz Druckpaket-Infos', Name='Anz Druckpaket-Infos' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541958) ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Element SET Name='Anz. Druckpaket-Infos', PrintName='Anz. Druckpaket-Infos',Updated=TO_TIMESTAMP('2015-07-07 12:15:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541958 ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541958 ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Column SET ColumnName='PackageInfoCount', Name='Anz. Druckpaket-Infos', Description='Number of different package infos for a given print package.', Help=NULL WHERE AD_Element_ID=541958 ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='PackageInfoCount', Name='Anz. Druckpaket-Infos', Description='Number of different package infos for a given print package.', Help=NULL, AD_Element_ID=541958 WHERE UPPER(ColumnName)='PACKAGEINFOCOUNT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='PackageInfoCount', Name='Anz. Druckpaket-Infos', Description='Number of different package infos for a given print package.', Help=NULL WHERE AD_Element_ID=541958 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_Field SET Name='Anz. Druckpaket-Infos', Description='Number of different package infos for a given print package.', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541958) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 12:15 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Anz. Druckpaket-Infos', Name='Anz. Druckpaket-Infos' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541958) ; -- 07.07.2015 12:16 -- URL zum Konzept UPDATE AD_Element SET Name='Transaktions-ID', PrintName='Transaktions-ID',Updated=TO_TIMESTAMP('2015-07-07 12:16:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541956 ; -- 07.07.2015 12:16 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541956 ; -- 07.07.2015 12:16 -- URL zum Konzept UPDATE AD_Column SET ColumnName='TransactionID', Name='Transaktions-ID', Description=NULL, Help=NULL WHERE AD_Element_ID=541956 ; -- 07.07.2015 12:16 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='TransactionID', Name='Transaktions-ID', Description=NULL, Help=NULL, AD_Element_ID=541956 WHERE UPPER(ColumnName)='TRANSACTIONID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 12:16 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='TransactionID', Name='Transaktions-ID', Description=NULL, Help=NULL WHERE AD_Element_ID=541956 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 12:16 -- URL zum Konzept UPDATE AD_Field SET Name='Transaktions-ID', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541956) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 12:16 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Transaktions-ID', Name='Transaktions-ID' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541956) ; -- 07.07.2015 13:23 -- URL zum Konzept UPDATE AD_Element SET Name='Druckpaket-Info', PrintName='Druckpaket-Info',Updated=TO_TIMESTAMP('2015-07-07 13:23:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541959 ; -- 07.07.2015 13:23 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541959 ; -- 07.07.2015 13:23 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Print_PackageInfo_ID', Name='Druckpaket-Info', Description='Contains details for the print package, like printer, tray, pages from/to and print service name.', Help=NULL WHERE AD_Element_ID=541959 ; -- 07.07.2015 13:23 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_PackageInfo_ID', Name='Druckpaket-Info', Description='Contains details for the print package, like printer, tray, pages from/to and print service name.', Help=NULL, AD_Element_ID=541959 WHERE UPPER(ColumnName)='C_PRINT_PACKAGEINFO_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 13:23 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_PackageInfo_ID', Name='Druckpaket-Info', Description='Contains details for the print package, like printer, tray, pages from/to and print service name.', Help=NULL WHERE AD_Element_ID=541959 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:23 -- URL zum Konzept UPDATE AD_Field SET Name='Druckpaket-Info', Description='Contains details for the print package, like printer, tray, pages from/to and print service name.', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541959) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:23 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druckpaket-Info', Name='Druckpaket-Info' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541959) ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Element SET Name='Druck-Job Anweisung', PrintName='Druck-Job Anweisung',Updated=TO_TIMESTAMP('2015-07-07 13:24:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=542012 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=542012 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Print_Job_Instructions_ID', Name='Druck-Job Anweisung', Description=NULL, Help=NULL WHERE AD_Element_ID=542012 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_Instructions_ID', Name='Druck-Job Anweisung', Description=NULL, Help=NULL, AD_Element_ID=542012 WHERE UPPER(ColumnName)='C_PRINT_JOB_INSTRUCTIONS_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_Instructions_ID', Name='Druck-Job Anweisung', Description=NULL, Help=NULL WHERE AD_Element_ID=542012 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Field SET Name='Druck-Job Anweisung', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=542012) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druck-Job Anweisung', Name='Druck-Job Anweisung' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=542012) ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Element SET Name='Binärformat', PrintName='Binärformat',Updated=TO_TIMESTAMP('2015-07-07 13:24:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541965 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541965 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Column SET ColumnName='BinaryFormat', Name='Binärformat', Description='Binary format of the print package (e.g. postscript vs pdf)', Help=NULL WHERE AD_Element_ID=541965 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='BinaryFormat', Name='Binärformat', Description='Binary format of the print package (e.g. postscript vs pdf)', Help=NULL, AD_Element_ID=541965 WHERE UPPER(ColumnName)='BINARYFORMAT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='BinaryFormat', Name='Binärformat', Description='Binary format of the print package (e.g. postscript vs pdf)', Help=NULL WHERE AD_Element_ID=541965 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Field SET Name='Binärformat', Description='Binary format of the print package (e.g. postscript vs pdf)', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541965) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Binärformat', Name='Binärformat' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541965) ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Element SET Name='Nutzersitzung', PrintName='Nutzersitzung',Updated=TO_TIMESTAMP('2015-07-07 13:24:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=2029 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2029 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Column SET ColumnName='AD_Session_ID', Name='Nutzersitzung', Description='User Session Online or Web', Help='Online or Web Session Information' WHERE AD_Element_ID=2029 ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='AD_Session_ID', Name='Nutzersitzung', Description='User Session Online or Web', Help='Online or Web Session Information', AD_Element_ID=2029 WHERE UPPER(ColumnName)='AD_SESSION_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='AD_Session_ID', Name='Nutzersitzung', Description='User Session Online or Web', Help='Online or Web Session Information' WHERE AD_Element_ID=2029 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_Field SET Name='Nutzersitzung', Description='User Session Online or Web', Help='Online or Web Session Information' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=2029) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Nutzersitzung', Name='Nutzersitzung' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=2029) ; -- 07.07.2015 13:24 -- URL zum Konzept UPDATE C_Queue_WorkPackage SET AD_Issue_ID=3429044, IsError='N', LastDurationMillis=982, LastEndTime=TO_TIMESTAMP('2015-07-07 13:24:52','YYYY-MM-DD HH24:MI:SS'), Processed='N', SkippedAt=TO_TIMESTAMP('2015-07-07 13:24:52','YYYY-MM-DD HH24:MI:SS'), Skipped_Count=4659, Skipped_Last_Reason='Not processed yet. Postponed!', SkipTimeoutMillis=60000,Updated=TO_TIMESTAMP('2015-07-07 13:24:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=2187913 WHERE C_Queue_WorkPackage_ID=1406136 ; -- 07.07.2015 13:25 -- URL zum Konzept UPDATE AD_Table SET Name='Druckpaket',Updated=TO_TIMESTAMP('2015-07-07 13:25:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540458 ; -- 07.07.2015 13:25 -- URL zum Konzept UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=540458 ; -- 07.07.2015 13:25 -- URL zum Konzept UPDATE AD_Table SET Name='Druck-Job',Updated=TO_TIMESTAMP('2015-07-07 13:25:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540437 ; -- 07.07.2015 13:25 -- URL zum Konzept UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=540437 ; -- 07.07.2015 13:25 -- URL zum Konzept UPDATE AD_Element SET Name='Druck-Job', PrintName='Druck-Job',Updated=TO_TIMESTAMP('2015-07-07 13:25:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541929 ; -- 07.07.2015 13:25 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541929 ; -- 07.07.2015 13:25 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Print_Job_ID', Name='Druck-Job', Description=NULL, Help=NULL WHERE AD_Element_ID=541929 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_ID', Name='Druck-Job', Description=NULL, Help=NULL, AD_Element_ID=541929 WHERE UPPER(ColumnName)='C_PRINT_JOB_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_ID', Name='Druck-Job', Description=NULL, Help=NULL WHERE AD_Element_ID=541929 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Field SET Name='Druck-Job', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541929) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druck-Job', Name='Druck-Job' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541929) ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Table SET Name='Druck-Job Detail',Updated=TO_TIMESTAMP('2015-07-07 13:26:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540457 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=540457 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Element SET Name='Druck-Job Detail', PrintName='Druck-Job Detail',Updated=TO_TIMESTAMP('2015-07-07 13:26:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541952 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541952 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Print_Job_Detail_ID', Name='Druck-Job Detail', Description=NULL, Help=NULL WHERE AD_Element_ID=541952 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_Detail_ID', Name='Druck-Job Detail', Description=NULL, Help=NULL, AD_Element_ID=541952 WHERE UPPER(ColumnName)='C_PRINT_JOB_DETAIL_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_Detail_ID', Name='Druck-Job Detail', Description=NULL, Help=NULL WHERE AD_Element_ID=541952 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Field SET Name='Druck-Job Detail', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541952) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druck-Job Detail', Name='Druck-Job Detail' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541952) ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Element SET Name='Druck-Job Position', PrintName='Druck-Job Position',Updated=TO_TIMESTAMP('2015-07-07 13:26:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541928 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=541928 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Column SET ColumnName='C_Print_Job_Line_ID', Name='Druck-Job Position', Description=NULL, Help=NULL WHERE AD_Element_ID=541928 ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_Line_ID', Name='Druck-Job Position', Description=NULL, Help=NULL, AD_Element_ID=541928 WHERE UPPER(ColumnName)='C_PRINT_JOB_LINE_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='C_Print_Job_Line_ID', Name='Druck-Job Position', Description=NULL, Help=NULL WHERE AD_Element_ID=541928 AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_Field SET Name='Druck-Job Position', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=541928) AND IsCentrallyMaintained='Y' ; -- 07.07.2015 13:26 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Druck-Job Position', Name='Druck-Job Position' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=541928) ; -- 07.07.2015 16:39 -- URL zum Konzept INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SeqNo,Updated,UpdatedBy,ValueMin,Version) VALUES (0,552579,505211,0,11,540473,'N','Copies',TO_TIMESTAMP('2015-07-07 16:39:54','YYYY-MM-DD HH24:MI:SS'),100,'N','1','Anzahl der zu erstellenden/zu druckenden Exemplare','de.metas.printing',14,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','Kopien',0,TO_TIMESTAMP('2015-07-07 16:39:54','YYYY-MM-DD HH24:MI:SS'),100,'1',0) ; -- 07.07.2015 16:39 -- URL zum Konzept INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=552579 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 07.07.2015 16:39 -- URL zum Konzept ALTER TABLE C_Print_Job_Instructions ADD Copies NUMERIC(10) DEFAULT 1 NOT NULL ; -- 07.07.2015 16:40 -- URL zum Konzept UPDATE AD_Tab SET Name='Job-Druckanweisung',Updated=TO_TIMESTAMP('2015-07-07 16:40:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=540486 ; -- 07.07.2015 16:40 -- URL zum Konzept UPDATE AD_Tab_Trl SET IsTranslated='N' WHERE AD_Tab_ID=540486 ; -- 07.07.2015 16:41 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-07 16:41:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551676 ; -- 07.07.2015 16:41 -- URL zum Konzept INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,Description,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,Updated,UpdatedBy) VALUES (0,552579,556219,0,540486,0,TO_TIMESTAMP('2015-07-07 16:41:26','YYYY-MM-DD HH24:MI:SS'),100,'Anzahl der zu erstellenden/zu druckenden Exemplare',0,'de.metas.printing',0,'Y','Y','Y','Y','N','N','N','N','N','Kopien',35,35,0,TO_TIMESTAMP('2015-07-07 16:41:26','YYYY-MM-DD HH24:MI:SS'),100) ; -- 07.07.2015 16:41 -- URL zum Konzept INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556219 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 08.07.2015 14:41 -- URL zum Konzept ALTER TABLE C_Printing_Queue ADD Copies NUMERIC(10) DEFAULT 1 NOT NULL ; -- 08.07.2015 14:42 -- URL zum Konzept UPDATE AD_Element SET Name='Sprache', PrintName='Sprache',Updated=TO_TIMESTAMP('2015-07-08 14:42:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=2159 ; -- 08.07.2015 14:42 -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2159 ; -- 08.07.2015 14:42 -- URL zum Konzept UPDATE AD_Column SET ColumnName='AD_Language_ID', Name='Sprache', Description=NULL, Help=NULL WHERE AD_Element_ID=2159 ; -- 08.07.2015 14:42 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='AD_Language_ID', Name='Sprache', Description=NULL, Help=NULL, AD_Element_ID=2159 WHERE UPPER(ColumnName)='AD_LANGUAGE_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 08.07.2015 14:42 -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName='AD_Language_ID', Name='Sprache', Description=NULL, Help=NULL WHERE AD_Element_ID=2159 AND IsCentrallyMaintained='Y' ; -- 08.07.2015 14:42 -- URL zum Konzept UPDATE AD_Field SET Name='Sprache', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=2159) AND IsCentrallyMaintained='Y' ; -- 08.07.2015 14:42 -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Sprache', Name='Sprache' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=2159) ; -- 08.07.2015 14:43 -- URL zum Konzept UPDATE AD_Table SET Name='Druck-Warteschlange',Updated=TO_TIMESTAMP('2015-07-08 14:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540435 ; -- 08.07.2015 14:43 -- URL zum Konzept UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=540435 ; -- 08.07.2015 14:44 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-08 14:44:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551770 ; -- 08.07.2015 14:45 -- URL zum Konzept INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,Description,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,Updated,UpdatedBy) VALUES (0,552575,556221,0,540460,0,TO_TIMESTAMP('2015-07-08 14:45:34','YYYY-MM-DD HH24:MI:SS'),100,'Anzahl der zu erstellenden/zu druckenden Exemplare',0,'de.metas.printing',0,'Y','Y','Y','Y','N','N','N','N','N','Kopien',65,65,0,TO_TIMESTAMP('2015-07-08 14:45:34','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.07.2015 14:45 -- URL zum Konzept INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556221 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 08.07.2015 14:46 -- URL zum Konzept UPDATE AD_Field SET SeqNo=92, SeqNoGrid=92,Updated=TO_TIMESTAMP('2015-07-08 14:46:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551680 ; -- 08.07.2015 14:46 -- URL zum Konzept UPDATE AD_Tab SET IsReadOnly='N',Updated=TO_TIMESTAMP('2015-07-08 14:46:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=540460 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551556 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551191 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551194 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551510 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551198 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551199 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551197 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551557 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551582 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551680 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551771 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551195 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551770 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556183 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551193 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551196 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551559 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551558 ; -- 08.07.2015 14:47 -- URL zum Konzept UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-07-08 14:47:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551192 ; -- 08.07.2015 14:48 -- URL zum Konzept UPDATE AD_Table SET IsChangeLog='Y',Updated=TO_TIMESTAMP('2015-07-08 14:48:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=540435 ; -- 08.07.2015 14:49 -- URL zum Konzept ALTER TABLE C_Print_Package ADD Copies NUMERIC(10) DEFAULT 1 NOT NULL ; -- 08.07.2015 14:51 -- URL zum Konzept UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2015-07-08 14:51:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551512 ;
the_stack
CREATE SCHEMA FVT_DBSYSTEM_MANAGE; CREATE TABLE FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TAB_013(ID INT,ID2 INT); COMMENT ON TABLE FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TAB_013 IS 'PG_DESCRIPTION_TAB_013'; CREATE TABLE FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020(DESCRIPTION TEXT) INHERITS (PG_DESCRIPTION); INSERT INTO FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 SELECT * FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; SELECT description FROM FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; SELECT description FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; EXPLAIN (VERBOSE ON, COSTS OFF) UPDATE FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 SET DESCRIPTION = 'PG_DESCRIPTION_TAB_013_0' WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; UPDATE FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 SET DESCRIPTION = 'PG_DESCRIPTION_TAB_013_0' WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; SELECT description FROM FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; SELECT description FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; EXPLAIN (VERBOSE ON, COSTS OFF) UPDATE PG_DESCRIPTION SET DESCRIPTION = 'PG_DESCRIPTION_TAB_013_1' WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; UPDATE PG_DESCRIPTION SET DESCRIPTION = 'PG_DESCRIPTION_TAB_013_1' WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; SELECT description FROM FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; SELECT description FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; EXPLAIN (VERBOSE ON, COSTS OFF) DELETE FROM FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; DELETE FROM FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; SELECT description FROM FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; SELECT description FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; INSERT INTO FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 SELECT * FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; EXPLAIN (VERBOSE ON, COSTS OFF) DELETE FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; DELETE FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%'; SELECT description FROM FVT_DBSYSTEM_MANAGE.PG_DESCRIPTION_TABLE_020 WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; SELECT description FROM PG_DESCRIPTION WHERE DESCRIPTION LIKE 'PG_DESCRIPTION_TAB_013%' ORDER BY 1; DROP SCHEMA FVT_DBSYSTEM_MANAGE CASCADE; CREATE TABLE DELETE_XC_C(C1 INT, C2 DATE, C3 INT); CREATE TABLE DELETE_XC_D(D1 INT, D2 DATE, D3 INT); INSERT INTO DELETE_XC_C SELECT GENERATE_SERIES(1,100),NOW(), 1; INSERT INTO DELETE_XC_C SELECT GENERATE_SERIES(1,100),NOW(), 2; ALTER TABLE DELETE_XC_C ADD PRIMARY KEY (C3, C1); INSERT INTO DELETE_XC_D SELECT * FROM DELETE_XC_C; EXPLAIN (VERBOSE TRUE, COSTS FALSE) DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D2 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D2 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); DROP TABLE DELETE_XC_C; DROP TABLE DELETE_XC_D; -- ----/* Teset DML for replication table */ -- -- --- DELETE PREPARE -- DROP TABLE DELETE_XC_C; DROP TABLE DELETE_XC_D; CREATE TABLE DELETE_XC_C(C1 INT, C2 INT, C3 INT); CREATE TABLE DELETE_XC_D(D1 INT, D2 INT, D3 INT); INSERT INTO DELETE_XC_C SELECT GENERATE_SERIES(1,10), GENERATE_SERIES(1,5), 0; INSERT INTO DELETE_XC_C SELECT GENERATE_SERIES(1,10), GENERATE_SERIES(1,5), 1; INSERT INTO DELETE_XC_D SELECT * FROM DELETE_XC_C; -- ---- DELETE CASE1: UNIQUE NOT DEFERRABLE -- ALTER TABLE DELETE_XC_C ADD CONSTRAINT CON_DELETE UNIQUE (C3, C1); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 = 2; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C; ALTER TABLE DELETE_XC_C ALTER C1 SET NOT NULL; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 = 2; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C; ALTER TABLE DELETE_XC_C ALTER C3 SET NOT NULL; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 = 2; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; DELETE FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C3 = 0; DELETE FROM DELETE_XC_C WHERE C3 = 0; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C2 = 2; DELETE FROM DELETE_XC_C WHERE C2 = 2; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C; DELETE FROM DELETE_XC_C; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; -- ---- DELETE CASE2: UNIQUE DEFERRABLE -- ALTER TABLE DELETE_XC_C DROP CONSTRAINT CON_DELETE; ALTER TABLE DELETE_XC_C ADD CONSTRAINT CON_DELETE UNIQUE (C3, C1) DEFERRABLE; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 = 2; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C; -- -- DELETE CASE3: PRIMARY KEY NOT DEFERRABLE -- ALTER TABLE DELETE_XC_C DROP CONSTRAINT CON_DELETE; ALTER TABLE DELETE_XC_C ALTER C1 DROP NOT NULL; ALTER TABLE DELETE_XC_C ALTER C3 DROP NOT NULL; ALTER TABLE DELETE_XC_C ADD CONSTRAINT CON_DELETE PRIMARY KEY (C3, C1); TRUNCATE DELETE_XC_C; INSERT INTO DELETE_XC_C SELECT GENERATE_SERIES(1,10), GENERATE_SERIES(1,5), 0; INSERT INTO DELETE_XC_C SELECT GENERATE_SERIES(1,10), GENERATE_SERIES(1,5), 1; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 = 2; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; DELETE FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C3 = 0; DELETE FROM DELETE_XC_C WHERE C3 = 0; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C WHERE C2 = 2; DELETE FROM DELETE_XC_C WHERE C2 = 2; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; SELECT * FROM DELETE_XC_C; DELETE FROM DELETE_XC_C; SELECT * FROM DELETE_XC_C ORDER BY 1, 2, 3; -- -- DELETE CASE3: PRIMARY KEY DEFERRABLE -- ALTER TABLE DELETE_XC_C DROP CONSTRAINT CON_DELETE; ALTER TABLE DELETE_XC_C ADD CONSTRAINT CON_DELETE PRIMARY KEY (C3, C1) DEFERRABLE; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 IN (SELECT D3 FROM DELETE_XC_D WHERE C1 = D1 AND C2 = D2); EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C WHERE C2 = 2; EXPLAIN (VERBOSE TRUE, COSTS FALSE)DELETE FROM DELETE_XC_C; -- ---- CLEAN UP -- DROP TABLE DELETE_XC_C; DROP TABLE DELETE_XC_D; -- -- UPDATE: PREPARE -- DROP TABLE UPDATE_XC_C; DROP TABLE UPDATE_XC_D; CREATE TABLE UPDATE_XC_C(C1 INT, C2 INT, C3 INT); CREATE TABLE UPDATE_XC_D(D1 INT, D2 INT, D3 INT); INSERT INTO UPDATE_XC_C SELECT GENERATE_SERIES(1,10), GENERATE_SERIES(1,5), 0; INSERT INTO UPDATE_XC_C SELECT GENERATE_SERIES(1,10), GENERATE_SERIES(1,5), 1; INSERT INTO UPDATE_XC_D SELECT * FROM UPDATE_XC_C; -- ---- UPDATE CASE1: UNIQUE NOT DEFERRABLE -- ALTER TABLE UPDATE_XC_C ADD CONSTRAINT CON_UPDATE UNIQUE (C3, C1); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET (C2) = (SELECT D3 FROM UPDATE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1 WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C2 = 1; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1; ALTER TABLE UPDATE_XC_C ALTER C1 SET NOT NULL; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET (C2) = (SELECT D3 FROM UPDATE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1 WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C2 = 1; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1; ALTER TABLE UPDATE_XC_C ALTER C3 SET NOT NULL; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET (C2) = (SELECT D3 FROM UPDATE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1 WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C2 = 1; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1; SELECT C1, C3, C2, D3 AS REPLACE_C2 FROM UPDATE_XC_C, UPDATE_XC_D WHERE C3 = D3 AND C1 = D1 ORDER BY 1, 2, 2, 4; UPDATE UPDATE_XC_C SET (C2) = (SELECT D3 FROM UPDATE_XC_D WHERE C3 = D3 AND C1 = D1); SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; SELECT C1, C3, C2, 0 AS REPLACE_C2 FROM UPDATE_XC_C WHERE C3 = 1 AND C1 = 5 ORDER BY 1, 3, 2, 4; UPDATE UPDATE_XC_C SET C2 = 0 WHERE C3 = 1 AND C1 = 5; SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; SELECT C1, C3, C2, 1 AS REPLACE_C2 FROM UPDATE_XC_C WHERE C3 = 0 ORDER BY 1, 3, 3, 4; UPDATE UPDATE_XC_C SET C2 = 1 WHERE C3 = 0; SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; SELECT C1, C3, C2, 0 AS REPLACE_C2 FROM UPDATE_XC_C WHERE C2 = 1 ORDER BY 1, 2, 3, 4; UPDATE UPDATE_XC_C SET C2 = 0 WHERE C2 = 1; SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; SELECT C1, C3, C2, 1 AS REPLACE_C2 FROM UPDATE_XC_C ORDER BY 1, 2, 3, 4; UPDATE_XC_C SET C2 = 1; SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; -- ---- UPDATE CASE2: UNIQUE DEFERRABLE -- ALTER TABLE UPDATE_XC_C DROP CONSTRAINT CON_UPDATE; ALTER TABLE UPDATE_XC_C ADD CONSTRAINT CON_UPDATE UNIQUE (C3, C1) DEFERRABLE; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET (C2) = (SELECT D3 FROM UPDATE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1 WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C2 = 1; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1; -- ---- UPDATE CASE3: PRIMARY KEY NOT DEFERRABLE -- ALTER TABLE UPDATE_XC_C DROP CONSTRAINT CON_UPDATE; ALTER TABLE UPDATE_XC_C ALTER C1 DROP NOT NULL; ALTER TABLE UPDATE_XC_C ALTER C3 DROP NOT NULL; TRUNCATE UPDATE_XC_C; INSERT INTO UPDATE_XC_C SELECT GENERATE_SERIES(1,10), GENERATE_SERIES(1,5), 0; INSERT INTO UPDATE_XC_C SELECT GENERATE_SERIES(1,10), GENERATE_SERIES(1,5), 1; ALTER TABLE UPDATE_XC_C ADD CONSTRAINT CON_UPDATE PRIMARY KEY (C3, C1); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET (C2) = (SELECT D3 FROM UPDATE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1 WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C2 = 1; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1; SELECT C1, C3, C2, D3 AS REPLACE_C2 FROM UPDATE_XC_C, UPDATE_XC_D WHERE C3 = D3 AND C1 = D1 ORDER BY 1, 2, 2, 4; UPDATE UPDATE_XC_C SET (C2) = (SELECT D3 FROM UPDATE_XC_D WHERE C3 = D3 AND C1 = D1); SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; SELECT C1, C3, C2, 0 AS REPLACE_C2 FROM UPDATE_XC_C WHERE C3 = 1 AND C1 = 5 ORDER BY 1, 3, 2, 4; UPDATE UPDATE_XC_C SET C2 = 0 WHERE C3 = 1 AND C1 = 5; SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; SELECT C1, C3, C2, 1 AS REPLACE_C2 FROM UPDATE_XC_C WHERE C3 = 0 ORDER BY 1, 3, 3, 4; UPDATE UPDATE_XC_C SET C2 = 1 WHERE C3 = 0; SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; SELECT C1, C3, C2, 0 AS REPLACE_C2 FROM UPDATE_XC_C WHERE C2 = 1 ORDER BY 1, 2, 3, 4; UPDATE UPDATE_XC_C SET C2 = 0 WHERE C2 = 1; SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; SELECT C1, C3, C2, 1 AS REPLACE_C2 FROM UPDATE_XC_C ORDER BY 1, 2, 3, 4; UPDATE_XC_C SET C2 = 1; SELECT * FROM UPDATE_XC_C ORDER BY 1, 2, 3; -- ---- UPDATE CASE4: PRIMARY KEY DEFERRABLE -- ALTER TABLE UPDATE_XC_C DROP CONSTRAINT CON_UPDATE; ALTER TABLE UPDATE_XC_C ADD CONSTRAINT CON_UPDATE PRIMARY KEY (C3, C1) DEFERRABLE; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET (C2) = (SELECT D3 FROM UPDATE_XC_D WHERE C3 = D3 AND C1 = D1); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C3 = 1 AND C1 = 5; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1 WHERE C3 = 0; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 0 WHERE C2 = 1; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE UPDATE_XC_C SET C2 = 1; -- ---- UPDATE/DELETE REPLICATION TABLE WITH CHILD TABLE -- CREATE TABLE parent_replica_table (A INT, B INT, C INT, D VARCHAR(20)); ALTER TABLE parent_replica_table ADD PRIMARY KEY (A, B); INSERT INTO parent_replica_table VALUES(1, 2, 3, 'sadfadsgdsf'); CREATE TABLE son_hash_table() INHERITS (parent_replica_table); INSERT INTO son_hash_table VALUES(1, 2, 3, 'sadfadsgdsf'); INSERT INTO son_hash_table VALUES(1, 1, 1, 'sadfadsgdsf'); EXPLAIN (VERBOSE TRUE, COSTS FALSE) DELETE FROM parent_replica_table; DELETE FROM parent_replica_table WHERE A = 1 AND B = 1 AND C = 1; EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE parent_replica_table SET D='AAAAA' WHERE A > 0; UPDATE parent_replica_table SET D='AAAAA' WHERE A > 0; UPDATE parent_replica_table SET D='AAAAA' WHERE A > 0 AND B > 0; UPDATE parent_replica_table SET D='AAAAA' WHERE A > 0 AND B > 0 AND C > 0; DROP TABLE son_hash_table; CREATE TABLE son_replica_table() INHERITS (parent_replica_table); ALTER TABLE son_replica_table ADD PRIMARY KEY (A, B); INSERT INTO son_replica_table VALUES(1, 2, 3, 'sadfadsgdsf'); EXPLAIN (VERBOSE TRUE, COSTS FALSE) UPDATE parent_replica_table SET D='AAAAA' WHERE A > 0; UPDATE parent_replica_table SET D='AAAAA' WHERE A > 0; UPDATE parent_replica_table SET D='AAAAA' WHERE A > 0 AND B > 0; UPDATE parent_replica_table SET D='AAAAA' WHERE A > 0 AND B > 0 AND C > 0; DROP TABLE son_replica_table; DROP TABLE parent_replica_table; -- ---- CLEAN UP -- DROP TABLE UPDATE_XC_C; DROP TABLE UPDATE_XC_D;
the_stack
-- DDL for BEA WebLogic Server 9.0 Examples -- START -- jdbc.multidatasource, wlst.online DROP TABLE systables; CREATE TABLE systables (test varchar(15)); -- START -- resadapter.simple, ejb20.sequence, ejb20.basic DROP TABLE ejbAccounts; CREATE TABLE ejbAccounts (id varchar(15), bal float, type varchar(15)); INSERT INTO ejbAccounts (id,bal,type) VALUES ('10000',1000,'Checking'); INSERT INTO ejbAccounts (id,bal,type) VALUES ('10005',1000,'Savings'); DROP TABLE ejb21Accounts; CREATE TABLE ejb21Accounts (id varchar(15), bal float, type varchar(15)); -- DROP TABLE ejbTransLog; -- CREATE TABLE ejbTransLog (transId VARCHAR(32), transCommitDate DATE); DROP TABLE idGenerator; CREATE TABLE idGenerator (tablename varchar(32), maxkey int); DROP TABLE CUSTOMER; CREATE TABLE customer( custid int not null, name varchar(30), address varchar(30), city varchar(30), state varchar(2), zip varchar(5), area varchar(3), phone varchar(8)); insert into customer values (100,'Jackson','100 First St.','Pleasantville','CA','95404','707','555-1234'); insert into customer values (101,'Elliott','Arbor Lane, #3','Centre Town','CA','96539','415','787-5467'); insert into customer values (102,'Avery','14 Main','Arthur','CA','97675','510','834-7476'); -- DROP TABLE emp; -- CREATE TABLE emp ( -- empno int not null, -- ename varchar(10), -- job varchar(9), -- mgr int, -- hiredate date, -- sal float, -- comm float, -- deptno int); -- create unique index empno on emp(empno); -- insert into emp values -- (7369,'SMITH','CLERK',7902,DATE'1980-12-17',800,NULL,20); -- webapp.pubsub.stock DROP TABLE StockTable; create table StockTable( symbol varchar(10), price float, yearHigh float, yearLow float, volume int); -- START -- ejb20.basic.beanManaged, ejb20.basic.containerManaged DROP TABLE Accounts; create table Accounts ( acct_id varchar(50) constraint pk_acct primary key, bal numeric, type varchar(50), cust_name varchar(50)); DROP TABLE Customers; create table Customers ( cust_name varchar(50) constraint pk_cust primary key, acct_id varchar(50), cust_age integer, cust_level integer, cust_last date); -- END -- START -- ejb20.relationships, ejb20.ejbgen DROP TABLE fanclubs; DROP TABLE recordings; DROP TABLE band_artist; DROP TABLE artist_sequence; ALTER TABLE artists DROP CONSTRAINT artists_pk; DROP TABLE artists; ALTER TABLE bands DROP CONSTRAINT bands_pk; DROP TABLE bands; CREATE TABLE bands ( name VARCHAR(50), founder VARCHAR(50), startDate date, CONSTRAINT bands_pk PRIMARY KEY (name, founder)); CREATE TABLE recordings ( title VARCHAR(50), bandName VARCHAR(50), bandFounder VARCHAR(50), numberSold INT, sales NUMERIC(10, 2), recordingDate DATE, CONSTRAINT recordings_pk PRIMARY KEY (title, bandName, bandFounder), CONSTRAINT recordings_fk FOREIGN KEY (bandName, bandFounder) REFERENCES bands(name, founder) ON DELETE CASCADE); CREATE TABLE fanclubs ( text VARCHAR(1024), bandName VARCHAR(50), bandFounder VARCHAR(50), memberCount INT, CONSTRAINT fanclubs_pk PRIMARY KEY (bandName, bandFounder), CONSTRAINT fanclubs_fk FOREIGN KEY (bandName, bandFounder) REFERENCES bands(name, founder) ON DELETE CASCADE); CREATE TABLE artists ( name VARCHAR(50), id INT CONSTRAINT artists_pk PRIMARY KEY); CREATE TABLE band_artist ( band_name VARCHAR(50), band_founder VARCHAR(50), artist_id INT, CONSTRAINT band_artist_fk FOREIGN KEY (band_name, band_founder) REFERENCES bands(name, founder) ON DELETE CASCADE, CONSTRAINT band_artist_fk2 FOREIGN KEY (artist_id) REFERENCES artists(id) ON DELETE CASCADE); CREATE TABLE artist_sequence (sequence INT); INSERT INTO artist_sequence VALUES (1); -- END -- START -- ejb20.multitable -- DROP TABLE user_profile; -- DROP TABLE user_login; -- CREATE TABLE user_login ( -- username VARCHAR(50), -- password VARCHAR(50), -- CONSTRAINT user_pk PRIMARY KEY -- (username)); -- CREATE TABLE user_profile ( -- username VARCHAR(50), -- street VARCHAR(50), -- city VARCHAR(50), -- state VARCHAR(50), -- zip VARCHAR(10), -- CONSTRAINT user_profile_pk PRIMARY KEY -- (username)); -- END -- START -- ejb20.embeddedkey --drop table ORDERSKEYTABLE; -- create table ORDERSKEYTABLE (sequence INTEGER); -- insert into ORDERSKEYTABLE VALUES (0); -- END ejb20.embeddedkey -- START -- ejb20.sequence.userDesignated drop table NAMED_SEQUENCE_TABLE; create table NAMED_SEQUENCE_TABLE(SEQUENCE integer); insert into NAMED_SEQUENCE_TABLE values (100); -- END ejb20.sequence.userDesignated -- START -- MedRec data used by API Examples -- Drop sequences DROP TABLE patient_seq; -- Drop Medrec tables DROP TABLE address; DROP TABLE groups; DROP TABLE patient; DROP TABLE physician; DROP TABLE prescription; DROP TABLE record; -- DROP TABLE vital_signs; -- Create sequence CREATE TABLE patient_seq (sequence INTEGER); -- Create Medrec tables CREATE TABLE address ( id INTEGER NOT NULL CONSTRAINT address_pk PRIMARY KEY, street1 VARCHAR(60) NOT NULL, street2 VARCHAR(60), city VARCHAR(60) NOT NULL, state VARCHAR(2) NOT NULL, zip VARCHAR(10) NOT NULL, country VARCHAR(50) NOT NULL ); CREATE TABLE groups ( username VARCHAR(60) NOT NULL, group_name VARCHAR(60) NOT NULL ); CREATE TABLE patient ( id INTEGER CONSTRAINT patient_pk PRIMARY KEY, first_name VARCHAR(60) NOT NULL, middle_name VARCHAR(60), last_name VARCHAR(60) NOT NULL, dob DATE NOT NULL, gender VARCHAR(6) NOT NULL, ssn VARCHAR(9) NOT NULL, address_id INTEGER NOT NULL, phone VARCHAR(15), email VARCHAR(60) NOT NULL ); CREATE TABLE physician ( id INT NOT NULL CONSTRAINT physician_pk PRIMARY KEY, first_name VARCHAR(60) NOT NULL, middle_name VARCHAR(60), last_name VARCHAR(60) NOT NULL, phone VARCHAR(15), email VARCHAR(60) ); CREATE TABLE prescription ( id INTEGER NOT NULL CONSTRAINT prescription_pk PRIMARY KEY, pat_id INTEGER NOT NULL, date_prescribed DATE NOT NULL, drug VARCHAR(80) NOT NULL, record_id INTEGER NOT NULL, dosage VARCHAR(30) NOT NULL, frequency VARCHAR(30), refills_remaining INTEGER, instructions VARCHAR(255) ); CREATE TABLE record ( id INTEGER NOT NULL CONSTRAINT record_pk PRIMARY KEY, pat_id INTEGER NOT NULL, phys_id INTEGER NOT NULL, record_date DATE NOT NULL, vital_id INTEGER NOT NULL, symptoms VARCHAR(255) NOT NULL, diagnosis VARCHAR(255), notes VARCHAR(255) ); -- CREATE TABLE vital_signs ( -- id INTEGER NOT NULL CONSTRAINT vital_signs_pk PRIMARY KEY, -- temperature VARCHAR(4), -- blood_pressure VARCHAR(10), -- pulse VARCHAR(10), -- weight INTEGER, -- height INTEGER --); -- COMMIT; -- Create test data. -- Caution: This script deletes all existing data. -- Note: Sequence tables are created starting at 101. DELETE FROM address; DELETE FROM groups; DELETE FROM patient; DELETE FROM physician; DELETE FROM prescription; DELETE FROM record; -- DELETE FROM vital_signs; -- Address INSERT INTO address (id,street1,street2,city,state,zip,country) VALUES (101,'1224 Post St','Suite 100','San Francisco','CA','94115','United States'); INSERT INTO address (id,street1,street2,city,state,zip,country) VALUES (102,'235 Montgomery St','Suite 15','Ponte Verde','FL','32301','United States'); INSERT INTO address (id,street1,street2,city,state,zip,country) VALUES (103,'1234 Market','','San Diego','CA','92126','United States'); -- Groups INSERT INTO groups (username,group_name) VALUES ('fred@golf.com','MedRecPatients'); INSERT INTO groups (username,group_name) VALUES ('larry@bball.com','MedRecPatients'); INSERT INTO groups (username,group_name) VALUES ('charlie@star.com','MedRecPatients'); INSERT INTO groups (username,group_name) VALUES ('volley@ball.com','MedRecPatients'); INSERT INTO groups (username,group_name) VALUES ('page@fish.com','MedRecPatients'); -- Patient INSERT INTO patient (id,first_name,middle_name,last_name,dob,gender,ssn,address_id,phone,email) VALUES (101,'Fred','I','Winner',DATE'1965-03-26','Male','123456789',101,'4151234564','fred@golf.com'); INSERT INTO patient (id,first_name,middle_name,last_name,dob,gender,ssn,address_id,phone,email) VALUES (102 ,'Larry','J','Parrot',DATE'1959-02-13','Male','777777777',101,'4151234564','larry@bball.com'); INSERT INTO patient (id,first_name,middle_name,last_name,dob,gender,ssn,address_id,phone,email) VALUES (103 ,'Charlie','E','Florida',DATE'1973-10-29','Male','444444444',102,'4151234564','charlie@star.com'); INSERT INTO patient (id,first_name,middle_name,last_name,dob,gender,ssn,address_id,phone,email) VALUES (104 ,'Gabrielle','H','Spiker',DATE'1971-08-17','Female','333333333',101,'4151234564','volley@ball.com'); INSERT INTO patient (id,first_name,middle_name,last_name,dob,gender,ssn,address_id,phone,email) VALUES (105 ,'Page','A','Trout',DATE'1972-02-18','Male','888888888',102,'4151234564','page@fish.com'); -- Physician INSERT INTO physician (id,first_name,middle_name,last_name,phone,email) VALUES (101,'Mary','J','Blige','1234567812','maryj@dr.com'); INSERT INTO physician (id,first_name,middle_name,last_name,phone,email) VALUES (102 ,'Phil','B','Lance','1234567812','phil@syscon.com'); INSERT INTO physician (id,first_name,middle_name,last_name,phone,email) VALUES (103 ,'Kathy','E','Wilson','1234567812','kwilson@dr.com'); -- Record INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (101,101,102,DATE'1999-06-18',101,'Complains about chest pain.','Mild stroke. Aspiran advised.','Patient needs to stop smoking.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (102,101,103,DATE'1993-05-30',101,'Sneezing, coughing, stuffy head.','Common cold. Prescribed codiene cough syrup.','Call back if not better in 10 days.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (103,101,102,DATE'1989-07-05',101,'Twisted knee while playing soccer.','Severely sprained interior ligament. Surgery required.','Cast will be necessary before and after.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (104,103,103,DATE'2000-02-18',102,'Ya ya ya.','Blah, Blah, Blah.','Notes start here.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (105,105,101,DATE'1991-04-01',103,'Drowsy all day.','Allergic to coffee. Drink tea.','No notes.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (106,105,102,DATE'1987-01-13',101,'Blurred vision.','Increased loss of vision due to recent car accident.','Admit patient to hospital.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (107,105,101,DATE'1990-09-09',102,'Sore throat.','Strep thoart culture taken. Sleep needed.','Call if positive.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (108,102,102,DATE'2001-06-20',101,'Overjoyed with everything.','Patient is crazy. Recommend politics.',''); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (109,104,103,DATE'2002-11-03',101,'Sprained ankle.','Lite cast needed.','At least 20 sprained ankles since 15.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (110,103,103,DATE'1997-12-21',101,'Forgetful, short-term memory not as sharpe.','General old age.','Patient will someday be 120 years old.'); INSERT INTO record (id,pat_id,phys_id,record_date,vital_id,symptoms,diagnosis,notes) VALUES (111,104,102,DATE'2001-05-13',102,'Nothing is wrong.','This gal is fine.','Patient likes lobby magazines.'); -- Prescription INSERT INTO prescription (id,pat_id,date_prescribed,drug,record_id,dosage,frequency,refills_remaining,instructions) VALUES (101,101,DATE'1999-06-18','Advil',101,'100 tbls','1/4hrs',0,'No instructions'); INSERT INTO prescription (id,pat_id,date_prescribed,drug,record_id,dosage,frequency,refills_remaining,instructions) VALUES (102,101,DATE'1999-06-18','Drixoral',101,'16 oz','1tspn/4hrs',0,'No instructions'); INSERT INTO prescription (id,pat_id,date_prescribed,drug,record_id,dosage,frequency,refills_remaining,instructions) VALUES (103,101,DATE'1993-05-30','Codeine',102,'10 oz','1/6hrs',1,'No instructions'); INSERT INTO prescription (id,pat_id,date_prescribed,drug,record_id,dosage,frequency,refills_remaining,instructions) VALUES (104,102,DATE'2001-06-20','Valium',108,'50 pills','1/day',3,'No instructions'); -- Vital Signs --INSERT INTO vital_signs (id,temperature,blood_pressure,pulse,weight,height) VALUES (101,'98','125/85','75',180,70); --INSERT INTO vital_signs (id,temperature,blood_pressure,pulse,weight,height) VALUES (102,'100','120/80','85',199,69); --INSERT INTO vital_signs (id,temperature,blood_pressure,pulse,weight,height) VALUES (103,'98','110/75','95',300,76); -- Insert sequence ids INSERT INTO patient_seq VALUES (110); -- COMMIT; -- END MedRec data used by API Examples -- START jsf.basic DROP TABLE CustomerTable; CREATE TABLE CustomerTable( custid int not null, name varchar(30), address varchar(30), city varchar(30), state varchar(2), zip varchar(5), area varchar(3), phone varchar(8)); insert into CustomerTable values (100,'Jackson','100 First St.','Pleasantville','CA','95404','707','555-1234'); insert into CustomerTable values (101,'Elliott','Arbor Lane, #3','Centre Town','CA','96539','415','787-5467'); insert into CustomerTable values (102,'Avery','14 Main','Arthur','CA','97675','510','834-7476'); -- COMMIT; -- END -- START javaee6.jca.stockTransaction DROP TABLE bankaccount; create table bankaccount ( owner varchar(30) primary key, balance double precision not null ); insert into bankaccount (owner,balance) values ('Howard',10000); insert into bankaccount (owner,balance) values ('James',8000); DROP TABLE stockinf; create table stockinf ( stockname varchar(30) primary key, price double precision not null ); insert into stockinf (stockname,price) values ('Real Oil Corporation',80); insert into stockinf (stockname,price) values ('Sunshine Food Company',20); DROP TABLE stockholding; create table stockholding ( owner varchar(30) not null, stockname varchar(30) not null, quantity int default 0, primary key(owner, stockName) ); insert into stockholding (owner, stockname, quantity) values ('Howard', 'Real Oil Corporation', 60); insert into stockholding (owner, stockname, quantity) values ('Howard', 'Sunshine Food Company', 20); insert into stockholding (owner, stockname, quantity) values ('James', 'Real Oil Corporation', 30); insert into stockholding (owner, stockname, quantity) values ('James', 'Sunshine Food Company', 50); -- COMMIT; -- END -- START javaee6.cdi DROP TABLE JAVAEE6_CDI_USER; CREATE TABLE JAVAEE6_CDI_USER ( USERID VARCHAR(50) NOT NULL, EMAIL VARCHAR(50), MOBILEPHONE VARCHAR(50), NAME VARCHAR(50), PASSWORD VARCHAR(50), SALARY VARCHAR(50), CONSTRAINT JAVAEE6_USER_pk PRIMARY KEY (USERID)); insert into JAVAEE6_CDI_USER (USERID,PASSWORD,NAME,SALARY) values ('001','111','Jack','6880'); insert into JAVAEE6_CDI_USER (USERID,PASSWORD,NAME,SALARY) values ('002','222','Lily','30'); insert into JAVAEE6_CDI_USER (USERID,PASSWORD,NAME,SALARY) values ('003','333','Tom','3912'); -- END
the_stack
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for bif_company -- ---------------------------- DROP TABLE IF EXISTS `bif_company`; CREATE TABLE `bif_company` ( `id` bigint(20) NOT NULL, `code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '统一社会信用代码', `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称', `type` int(4) NULL DEFAULT NULL COMMENT '企业类型', `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `fax` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `zip` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮编', `email` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `website` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `person` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人', `state` int(4) NULL DEFAULT 0, `rdt` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `id`(`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '公司表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of bif_company -- ---------------------------- INSERT INTO `bif_company` VALUES (299935790530603, 'bif', '张学友公司', 1, '河南省邓州市', '0377-62958337', '0377-62958337', '474172', 'dym6295@163.com', 'http://ok.com', '杜燕明', 0, '2016-07-17 11:41:00'); INSERT INTO `bif_company` VALUES (299935790530604, 'ndtech', '北京恩维协同', 1, '北京市朝阳区', '010-62958337', '010-62958337', '10000', 'duyanming@ndtech.com', 'http://www.ndtech.com.cn', '王五', 0, '2016-10-02 11:41:00'); -- ---------------------------- -- Table structure for sys_func -- ---------------------------- DROP TABLE IF EXISTS `sys_func`; CREATE TABLE `sys_func` ( `id` bigint(20) NOT NULL, `fname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `fcode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `forder` float(50, 0) NULL DEFAULT NULL, `pid` bigint(20) NULL DEFAULT NULL, `furl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `show` smallint(2) NULL DEFAULT 1, `icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `id`(`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_func -- ---------------------------- INSERT INTO `sys_func` VALUES (47826128347136, 'NetMQ', 'netmq', 8, 299935790530590, 'https://netmq.readthedocs.io/en/latest/', 1, ''); INSERT INTO `sys_func` VALUES (100876538834944, 'k8s', 'k8s', 1, 299935790530590, '', 1, ''); INSERT INTO `sys_func` VALUES (100878287302656, 'jimmysong', 'k8s', 2, 100876538834944, 'https://jimmysong.io/kubernetes-handbook/', 1, ''); INSERT INTO `sys_func` VALUES (101163644395520, 'k8s-Centos7 搭建', 'k8s', 3, 100876538834944, 'http://www.maogx.win/posts/32/', 0, ''); INSERT INTO `sys_func` VALUES (101163940139008, '每天5分钟玩转 Kubernetes', 'k8s', 1, 100876538834944, 'https://mp.weixin.qq.com/s/RK6DDc8AUBklsUS7rssW2w', 0, ''); INSERT INTO `sys_func` VALUES (101164278681600, 'k8s-dashboard', 'k8s', 4, 100876538834944, 'https://www.cnblogs.com/RainingNight/p/deploying-k8s-dashboard-ui.html', 0, ''); INSERT INTO `sys_func` VALUES (132054338420736, '集群监控', 'xtjk', 3, NULL, '', 1, 'el-icon-monitor'); INSERT INTO `sys_func` VALUES (132054501289984, '链路追踪', 'dylzz', 1, 132054338420736, 'html/trace/index.html', 1, 'el-icon-connection'); INSERT INTO `sys_func` VALUES (132054881103872, '服务监控', 'cm', 2, 132054338420736, '/html/welcome.html', 1, 'el-icon-monitor'); INSERT INTO `sys_func` VALUES (187965062586368, 'NSmartProx监控', 'NSmartProx', 3, 132054338420736, 'http://140.143.207.244:12309/#dashboard', 1, ''); INSERT INTO `sys_func` VALUES (276132205633536, '模拟工具', 'Simulation', 4, NULL, '', 1, 'el-icon-connection'); INSERT INTO `sys_func` VALUES (276132575506432, '模拟请求', 'Simulation', 1, 276132205633536, '/home/simulation', 1, 'el-icon-s-platform'); INSERT INTO `sys_func` VALUES (290153378975744, '路由信息', 'router', 3, 132054338420736, 'html/trace/router.html?appName=HelloWorld', 1, 'el-icon-connection'); INSERT INTO `sys_func` VALUES (299935790530579, '会员列表-Old', 'mlist', 1, 299935790530582, 'html/mlist.html', 0, 'el-icon-user'); INSERT INTO `sys_func` VALUES (299935790530580, '系统管理', 'sysm', 99999, NULL, '', 1, 'el-icon-setting'); INSERT INTO `sys_func` VALUES (299935790530582, '系统会员', 'sys_m', 0, 299935790530580, '', 1, 'el-icon-user'); INSERT INTO `sys_func` VALUES (299935790530583, '系统配置', 'sys_roles', 1, 299935790530580, '', 1, 'el-icon-location'); INSERT INTO `sys_func` VALUES (299935790530584, '角色配置', 'frc', 1, 299935790530583, 'html/func_roles_config.html', 1, 'el-icon-view'); INSERT INTO `sys_func` VALUES (299935790530585, '公司列表-Old', 'componylist', 3, 299935790530582, 'html/carrier.html?Tname=colist', 0, 'el-icon-office-building'); INSERT INTO `sys_func` VALUES (299935790530586, '功能配置', 'sys_func_config', 1, 299935790530583, 'html/fconfig.html', 1, 'el-icon-copy-document'); INSERT INTO `sys_func` VALUES (299935790530590, '查阅资料', 'lsfzl', 5, NULL, '', 1, 'el-icon-notebook-2'); INSERT INTO `sys_func` VALUES (299935790530592, 'Redis', 'lsfzl', 2, 299935790530590, 'http://doc.redisfans.com/', 1, ''); INSERT INTO `sys_func` VALUES (299935790530593, 'MongoDB-csharp', 'lsfzl', 3, 299935790530590, 'https://docs.mongodb.com/getting-started/csharp/', 1, ''); INSERT INTO `sys_func` VALUES (299935790530594, 'ECMAScript 6', 'lsfzl', 4, 299935790530590, 'http://es6.ruanyifeng.com/', 1, ''); INSERT INTO `sys_func` VALUES (299935790530595, '内涵段子', 'joker', 5, 299935790530590, 'html/Joker/beauty.html', 0, ''); INSERT INTO `sys_func` VALUES (324175695159296, '开发文档', 'viperDoc', 2, NULL, 'https://duyanming.github.io/', 1, 'el-icon-help'); INSERT INTO `sys_func` VALUES (324581934501888, '集群服务总览', 'jqfwzl', 0, 132054338420736, 'html/service/dashboard.html', 0, 'el-icon-guide'); INSERT INTO `sys_func` VALUES (324834648502272, '集群总览', 'jqzl', 0, 132054338420736, 'html/service/cluster_dashboard.html', 1, 'el-icon-guide'); INSERT INTO `sys_func` VALUES (341861272510464, '开发文档', 'viperDoc', 2, 324175695159296, 'https://duyanming.github.io/docs', 1, 'el-icon-guide'); INSERT INTO `sys_func` VALUES (351817298649088, '公司列表', 'componylistNew', 0, 299935790530582, '/html/company/index.html', 1, 'el-icon-office-building'); INSERT INTO `sys_func` VALUES (351817486770176, '会员列表', 'mlistNew', 1, 299935790530582, 'html/mlist/index.html', 1, 'el-icon-user'); INSERT INTO `sys_func` VALUES (2975002949320704, 'Rabbitmq', 'rabbitmq', 6, 299935790530590, 'https://www.rabbitmq.com/getstarted.html', 1, ''); INSERT INTO `sys_func` VALUES (3957341116563456, 'postgresql', 'postgresqltutorial', 7, 299935790530590, 'http://www.postgresqltutorial.com', 1, ''); -- ---------------------------- -- Table structure for sys_func_roles_link -- ---------------------------- DROP TABLE IF EXISTS `sys_func_roles_link`; CREATE TABLE `sys_func_roles_link` ( `id` bigint(20) NOT NULL, `fid` bigint(20) NULL DEFAULT NULL, `rid` bigint(20) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `id`(`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_func_roles_link -- ---------------------------- INSERT INTO `sys_func_roles_link` VALUES (47826205687822, 47826128347136, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (49553696141318, 49552713900032, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (100878479306760, 100876538834944, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (100878479306761, 100878287302656, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (101164434472970, 101163940139008, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (101164434472972, 101163644395520, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (101164434472973, 101164278681600, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (101991211909127, 101990373568512, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (109378342379528, 109378174894080, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (111791747018759, 111791689408512, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (123920583868416, 299935790530590, 299935790530578); INSERT INTO `sys_func_roles_link` VALUES (127005557727239, 49552772186112, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (132054955646982, 132054338420736, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (132054955646983, 132054501289984, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (132054955646984, 132054881103872, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (274991608692736, 299935790530590, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696832, 100876538834944, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696833, 101163940139008, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696834, 100878287302656, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696835, 101163644395520, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696836, 101164278681600, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696838, 299935790530592, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696839, 299935790530593, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696840, 299935790530594, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696842, 2975002949320704, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696843, 3957341116563456, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696844, 47826128347136, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696845, 132054338420736, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696846, 132054501289984, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696847, 132054881103872, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696849, 299935790530580, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (274991608696850, 299935790530582, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (276132686950400, 276132205633536, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (276132686950401, 276132575506432, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (276132735111173, 276132205633536, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (276132735111174, 276132575506432, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (290153444339736, 290153378975744, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (290966135451666, 290153378975744, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (299935790530605, 299935790530579, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530606, 299935790530580, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530608, 299935790530582, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530609, 299935790530583, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530610, 299935790530584, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530611, 299935790530585, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530612, 299935790530586, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530616, 299935790530590, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530617, 299935790530591, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530618, 299935790530592, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530619, 299935790530593, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530620, 299935790530594, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (299935790530621, 299935790530595, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (313598404460544, 299935790530596, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (313598404460545, 299935790530597, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (313598404460546, 299935790530598, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (313598404460547, 299935790530600, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (313598404460548, 299935790530601, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (313598404460549, 299935790530599, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (324175910170624, 324175695159296, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (324175958253568, 324175695159296, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (324581989511191, 324581934501888, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (324834703384601, 324834648502272, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (324849852428305, 324834648502272, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (341861383299073, 341861272510464, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (341861407686657, 341861272510464, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (351817584726047, 351817298649088, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (351817584726049, 351817486770176, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (351817671946250, 351817298649088, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (352187569582104, 351817486770176, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (352187569582105, 299935790530583, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (352187569582106, 299935790530584, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (352187569582107, 299935790530586, 48079494410240); INSERT INTO `sys_func_roles_link` VALUES (1229232533405702, 299935790530590, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (1229232533405703, 299935790530591, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (1229232533405704, 299935790530592, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (1229232533405705, 299935790530593, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (1229232533405706, 299935790530594, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (1229232533405707, 299935790530595, 299935790530575); INSERT INTO `sys_func_roles_link` VALUES (2975114438115340, 2975002949320704, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (3957546389995533, 3957341116563456, 299935790530574); INSERT INTO `sys_func_roles_link` VALUES (13892844284542976, 299935790530580, 299935790530578); INSERT INTO `sys_func_roles_link` VALUES (13892844284542977, 299935790530582, 299935790530578); INSERT INTO `sys_func_roles_link` VALUES (13892844284542978, 299935790530585, 299935790530578); INSERT INTO `sys_func_roles_link` VALUES (13892844284542979, 299935790530579, 299935790530578); -- ---------------------------- -- Table structure for sys_log -- ---------------------------- DROP TABLE IF EXISTS `sys_log`; CREATE TABLE `sys_log` ( `Id` bigint(8) NOT NULL, `TraceId` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '链路追踪TraceId', `Title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '日志名称', `Uname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人', `LogType` int(4) UNSIGNED NULL DEFAULT 0 COMMENT '日志类型', `AppName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '应用名称', `Content` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作内容', `Timespan` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录时间', PRIMARY KEY (`Id`) USING BTREE, UNIQUE INDEX `id`(`Id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_log -- ---------------------------- INSERT INTO `sys_log` VALUES (363854395404288, 'f7395527-f982-4b7e-b49f-58c62c6adce9', '你传入的x,y值,计算前Log', 'admin', 0, 'HelloWorld', '{\"x\":88,\"y\":7}', '2021-02-01 16:40:06'); INSERT INTO `sys_log` VALUES (363854395514880, 'f7395527-f982-4b7e-b49f-58c62c6adce9', '你传入的x,y值,计算后Log', 'admin', 0, 'HelloWorld', '81', '2021-02-01 16:40:06'); -- ---------------------------- -- Table structure for sys_member -- ---------------------------- DROP TABLE IF EXISTS `sys_member`; CREATE TABLE `sys_member` ( `id` bigint(20) NOT NULL, `account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `coid` bigint(20) NOT NULL DEFAULT -1 COMMENT '公司ID', `position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `state` smallint(1) NULL DEFAULT 1 COMMENT '1 启用 0 禁用', `profile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `timespan` datetime(0) NULL DEFAULT NULL, `rdt` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '注册时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `id`(`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_member -- ---------------------------- INSERT INTO `sys_member` VALUES (49552092442624, 'jiangwen', 'nsiFvHyFuoM=', 0, '导演', '姜文', 0, 'b3133ecec9794867989bd98491872354', '2018-12-25 12:00:14', '2018-08-28 13:40:46'); INSERT INTO `sys_member` VALUES (60545176104960, 'qbs', 'nsiFvHyFuoM=', 0, '架构师', '乔布斯', 0, 'HAqvhBLt3SGTGvu4T1RUDj6my3MWQEpnoRpLmV8aJBFMA0F9ijiLsQ==', '2020-01-06 21:20:19', '2018-09-28 15:11:44'); INSERT INTO `sys_member` VALUES (210527169232896, 'anno', 'nsiFvHyFuoM=', 0, 'Anno Admin', 'anno', 1, 'wfzfGLtNOOPVE/UPxh4EH3CceI5MGIOYMH0Ox43mYLthWMKLt3vpqaQjTAkWoSoF', '2021-01-06 10:57:04', '2019-11-26 10:30:02'); INSERT INTO `sys_member` VALUES (225114735435776, '20120106', 'nsiFvHyFuoM=', 0, '20120106', '20120106', 0, 'Gujxq7PRRrIv65cSxa0iAtzV9uRVe0dvx6qHH3rnLlcEiSqDvH7nGcEJZOHpJ19h', '2020-01-06 15:47:08', '2020-01-06 15:46:59'); INSERT INTO `sys_member` VALUES (299935786336256, 'admin', 'q5Oslccyl9Y=', 299935790530603, '.NET 工程师', '杜燕明', 1, 'mZEyRTJP5DuQaR4rsl00X/s9juc1wzK+CZAKoWI9LYL1VEIM0yfECg==', '2021-02-01 15:21:41', '2016-07-11 22:52:57'); INSERT INTO `sys_member` VALUES (299935790530560, 'yrm', 'nsiFvHyFuoM=', 299935790530603, 'BIF主管', '于瑞敏', 1, 'fSFhFv5d4ZlC/JTz1EvoBIDKA3zMwvhsligEfxuY2aV5sbPIex8Bu0Jv4CGWq5bA', '2021-01-06 10:23:34', '2016-07-12 22:52:57'); INSERT INTO `sys_member` VALUES (299935790530561, 'duyanming', 'nsiFvHyFuoM=', 299935790530604, 'TestPostion', 'DuYanming', 0, 'af15f81694e64513b9ed99c5b8a84ad9', '2016-07-06 22:09:15', '2016-07-13 22:52:57'); INSERT INTO `sys_member` VALUES (299935790530562, 'bjcz', 'myjMrb9Iey8=', 299935790530604, '管理员', '北京传智播客', 0, '02db5beda74a46b0bd0b7bee7bf29fd1', '2016-07-10 08:59:50', '2016-07-14 22:52:57'); INSERT INTO `sys_member` VALUES (299935790530563, 'lishanfeng', 'nsiFvHyFuoM=', 299935790530603, '全栈工程师', '王大锤', 0, 'fSFhFv5d4ZnxJ12sqaTR3ilrblZkOwmblSYfRlWoco+3PUFIrn3J91uEwimNZ2MyY7b2K0YzYG4=', '2020-10-28 21:07:29', '2016-12-27 15:44:54'); INSERT INTO `sys_member` VALUES (299935790530564, 'xijinping', 'myjMrb9Iey8=', 299935790530604, '第一老大', '习近平', 0, '8e72c9ce0b5b45158032a78b514a2f05', '2017-01-14 17:35:01', '2017-01-10 10:48:15'); INSERT INTO `sys_member` VALUES (299935790530565, '123', 'myjMrb9Iey8=', 299935790530603, '123', '123', 0, NULL, NULL, '2017-01-12 10:18:58'); INSERT INTO `sys_member` VALUES (299935790530566, 'User1', 'myjMrb9Iey8=', 299935790530604, 'CEO', 'Updateable', 0, NULL, NULL, '2017-02-15 14:03:01'); INSERT INTO `sys_member` VALUES (299935790530567, 'tlp', 'nsiFvHyFuoM=', 299935790530603, '美国总统', '特朗普·川普', 0, '33d6e1bdbde2471bb887fb7d47dc56ca', '2018-04-14 20:09:49', '2017-02-22 10:31:14'); INSERT INTO `sys_member` VALUES (299935790530568, '18510994063', 'nsiFvHyFuoM=', 0, '玩家', '王五', 0, 'fSFhFv5d4ZksCKNevTyzZz2Lk3zoiwsjj7+CZwASm19rpbMOHrYo3Rf0PsWZWrkc', '2020-09-20 22:52:18', NULL); INSERT INTO `sys_member` VALUES (299935790530569, '1', 'jvnKWN3f6mU=', 0, '1', '老刘', 0, '2e750e5a0d9244f1b0ec7385b92c7ecd', '2018-05-05 18:34:10', NULL); INSERT INTO `sys_member` VALUES (299935790530570, 'laosan', 'jvnKWN3f6mU=', 0, '12', '老三', 0, 'a4a5e22112634c5ea9cbdfc1a086f283', '2018-10-31 17:48:17', NULL); -- ---------------------------- -- Table structure for sys_member_roles_link -- ---------------------------- DROP TABLE IF EXISTS `sys_member_roles_link`; CREATE TABLE `sys_member_roles_link` ( `id` bigint(20) NOT NULL, `mid` bigint(20) NULL DEFAULT NULL, `rid` bigint(20) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `id`(`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_member_roles_link -- ---------------------------- INSERT INTO `sys_member_roles_link` VALUES (49552092565504, 49552092442624, 48079494410240); INSERT INTO `sys_member_roles_link` VALUES (60545176219648, 60545176104960, 299935790530575); INSERT INTO `sys_member_roles_link` VALUES (65063157125120, 299935790530563, 299935790530574); INSERT INTO `sys_member_roles_link` VALUES (144703322042368, 60545176104960, 299935790530574); INSERT INTO `sys_member_roles_link` VALUES (225114735976448, 225114735435776, 48079494410240); INSERT INTO `sys_member_roles_link` VALUES (274991678836736, 210527169232896, 48079494410240); INSERT INTO `sys_member_roles_link` VALUES (299935790530573, 299935786336256, 299935790530574); INSERT INTO `sys_member_roles_link` VALUES (314193764941824, 299935790530567, 299935790530575); INSERT INTO `sys_member_roles_link` VALUES (325531112050688, 299935790530560, 48079494410240); INSERT INTO `sys_member_roles_link` VALUES (1227636298743808, 299935790530566, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (1227732721598464, 299935790530565, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (1227813260623872, 299935790530564, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (1227977350184960, 299935790530562, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (1228043624382464, 299935790530561, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (1228205608402944, 299935790530570, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (1228268883673088, 299935790530569, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (1228325875875840, 299935790530568, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (13892695328030720, 299935790530563, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (35462212902453248, 299935786336256, 299935790530577); INSERT INTO `sys_member_roles_link` VALUES (35462213049253888, 299935786336256, 299935790530578); INSERT INTO `sys_member_roles_link` VALUES (35462213061836800, 299935786336256, 299935790530575); INSERT INTO `sys_member_roles_link` VALUES (35462213078614016, 299935786336256, 299935790530576); INSERT INTO `sys_member_roles_link` VALUES (36694368303710208, 299935790530564, 299935790530575); -- ---------------------------- -- Table structure for sys_roles -- ---------------------------- DROP TABLE IF EXISTS `sys_roles`; CREATE TABLE `sys_roles` ( `id` bigint(20) NOT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `id`(`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_roles -- ---------------------------- INSERT INTO `sys_roles` VALUES (48079494410240, '体验者'); INSERT INTO `sys_roles` VALUES (299935790530574, 'System'); INSERT INTO `sys_roles` VALUES (299935790530575, '管理员'); INSERT INTO `sys_roles` VALUES (299935790530576, '供应商'); INSERT INTO `sys_roles` VALUES (299935790530577, '采购商'); INSERT INTO `sys_roles` VALUES (299935790530578, '玩家'); -- ---------------------------- -- Table structure for sys_trace -- ---------------------------- DROP TABLE IF EXISTS `sys_trace`; CREATE TABLE `sys_trace` ( `id` bigint(20) NOT NULL, `GlobalTraceId` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `TraceId` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '调用链唯一标识', `PreTraceId` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上级调用链唯一标识', `AppNameTarget` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目标App名称', `AppName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'App名称', `TTL` int(10) NULL DEFAULT NULL COMMENT '跳转次数', `Request` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '请求参数', `Response` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '响应参数', `Ip` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人IP', `Target` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目标地址', `UserId` bigint(20) NULL DEFAULT NULL COMMENT '操作人ID', `Timespan` datetime(6) NULL DEFAULT NULL COMMENT '记录时间', `Askchannel` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '请求管道', `Askrouter` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '请求路由', `Askmethod` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '业务方法', `Uname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', `UseTimeMs` double(28, 0) NULL DEFAULT -1, `Rlt` tinyint(1) NULL DEFAULT 1 COMMENT '处理结果', PRIMARY KEY (`id`) USING BTREE, INDEX `sys_trace_Timespan_index`(`Timespan`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of sys_trace -- ---------------------------- -- ---------------------------- -- Function structure for getChildList -- ---------------------------- DROP FUNCTION IF EXISTS `getChildList`; delimiter ;; CREATE FUNCTION `getChildList`(rootId VARCHAR(50)) RETURNS varchar(1000) CHARSET utf8 READS SQL DATA BEGIN DECLARE sTemp VARCHAR(1000); DECLARE sTempChd VARCHAR(1000); SET sTemp = '$'; SET sTempChd =cast(rootId as CHAR); WHILE sTempChd is not null DO SET sTemp = concat(sTemp,',',sTempChd); SELECT group_concat(TraceId) INTO sTempChd FROM sys_trace where FIND_IN_SET(PreTraceId,sTempChd)>0; END WHILE; RETURN sTemp; END ;; delimiter ; SET FOREIGN_KEY_CHECKS = 1;
the_stack
---- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64) ---- ---- Host: localhost Database: healthapp ---- ------------------------------------------------------ ---- Server version 5.7.19-0ubuntu0.16.04.1 -- --/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; --/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; --/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; --/*!40101 SET NAMES utf8 */; --/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; --/*!40103 SET TIME_ZONE='+00:00' */; --/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; --/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; --/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; --/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- ---- ---- Table structure for table `ClientDetails` ---- -- DROP TABLE IF EXISTS `ClientDetails`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ClientDetails` ( `appId` varchar(255) NOT NULL, `resourceIds` varchar(255) DEFAULT NULL, `appSecret` varchar(255) DEFAULT NULL, `scope` varchar(255) DEFAULT NULL, `grantTypes` varchar(255) DEFAULT NULL, `redirectUrl` varchar(255) DEFAULT NULL, `authorities` varchar(255) DEFAULT NULL, `access_token_validity` int(11) DEFAULT NULL, `refresh_token_validity` int(11) DEFAULT NULL, `additionalInformation` varchar(4096) DEFAULT NULL, `autoApproveScopes` varchar(255) DEFAULT NULL, PRIMARY KEY (`appId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ClientDetails` -- LOCK TABLES `ClientDetails` WRITE; /*!40000 ALTER TABLE `ClientDetails` DISABLE KEYS */; /*!40000 ALTER TABLE `ClientDetails` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user` -- DROP TABLE IF EXISTS `user`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `email` varchar(50) NOT NULL, `password` varchar(20) NOT NULL, `first_name` varchar(20) NOT NULL, `last_name` varchar(20) DEFAULT NULL, `age` int(11) DEFAULT NULL, `gender` int(11) DEFAULT NULL, `contact_number` varchar(15) DEFAULT NULL, `alternate_contact_number` varchar(15) DEFAULT NULL, `address` varchar(100) DEFAULT NULL, `city_code` varchar(20) DEFAULT NULL, `state_code` varchar(20) DEFAULT NULL, `country_code` varchar(20) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `role` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user` -- LOCK TABLES `user` WRITE; /*!40000 ALTER TABLE `user` DISABLE KEYS */; INSERT INTO `user` VALUES (25,'aiyana@gmail.com','book','Aiyana Shukla',NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,'2017-08-08 11:57:42','2017-08-08 11:57:42',1),(26,'anisha@gmail.com','book','Anisha Shukla',NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,'2017-08-08 11:58:02','2017-08-08 11:58:02',0); /*!40000 ALTER TABLE `user` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -- -- Table structure for table `doctor` -- DROP TABLE IF EXISTS `doctor`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `doctor` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `speciality_code` varchar(20) NOT NULL DEFAULT 'physician', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `user_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_user_id` (`user_id`), CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `doctor` -- LOCK TABLES `doctor` WRITE; /*!40000 ALTER TABLE `doctor` DISABLE KEYS */; INSERT INTO `doctor` VALUES (10,'PHYSICIAN','2017-08-08 12:02:06','2017-08-08 12:02:06',25); /*!40000 ALTER TABLE `doctor` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `health_centre` -- DROP TABLE IF EXISTS `health_centre`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `health_centre` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `address` varchar(200) NOT NULL, `city_code` varchar(20) NOT NULL, `state_code` varchar(20) NOT NULL, `country_code` varchar(20) NOT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `health_centre` -- LOCK TABLES `health_centre` WRITE; /*!40000 ALTER TABLE `health_centre` DISABLE KEYS */; /*!40000 ALTER TABLE `health_centre` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `doctor_location` -- DROP TABLE IF EXISTS `doctor_location`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `doctor_location` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `doctor_id` bigint(20) NOT NULL, `address_id` bigint(20) NOT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `doctor_location_id_fk` (`doctor_id`), KEY `address_id_fk` (`address_id`), CONSTRAINT `address_id_fk` FOREIGN KEY (`address_id`) REFERENCES `health_centre` (`id`), CONSTRAINT `doctor_location_id_fk` FOREIGN KEY (`doctor_id`) REFERENCES `doctor` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `doctor_location` -- LOCK TABLES `doctor_location` WRITE; /*!40000 ALTER TABLE `doctor_location` DISABLE KEYS */; /*!40000 ALTER TABLE `doctor_location` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `doctor_qualification` -- DROP TABLE IF EXISTS `doctor_qualification`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `doctor_qualification` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `doctor_id` bigint(20) NOT NULL, `degree_code` varchar(10) NOT NULL DEFAULT 'mbbs', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `doctor_id_fk` (`doctor_id`), CONSTRAINT `doctor_id_fk` FOREIGN KEY (`doctor_id`) REFERENCES `doctor` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `doctor_qualification` -- LOCK TABLES `doctor_qualification` WRITE; /*!40000 ALTER TABLE `doctor_qualification` DISABLE KEYS */; /*!40000 ALTER TABLE `doctor_qualification` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `oauth_access_token` -- DROP TABLE IF EXISTS `oauth_access_token`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `oauth_access_token` ( `token_id` varchar(255) DEFAULT NULL, `token` mediumblob, `authentication_id` varchar(255) NOT NULL, `user_name` varchar(255) DEFAULT NULL, `client_id` varchar(255) DEFAULT NULL, `authentication` mediumblob, `refresh_token` varchar(255) DEFAULT NULL, PRIMARY KEY (`authentication_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `oauth_access_token` -- LOCK TABLES `oauth_access_token` WRITE; /*!40000 ALTER TABLE `oauth_access_token` DISABLE KEYS */; /*!40000 ALTER TABLE `oauth_access_token` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `oauth_approvals` -- DROP TABLE IF EXISTS `oauth_approvals`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `oauth_approvals` ( `userId` varchar(255) DEFAULT NULL, `clientId` varchar(255) DEFAULT NULL, `scope` varchar(255) DEFAULT NULL, `status` varchar(10) DEFAULT NULL, `expiresAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `lastModifiedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `oauth_approvals` -- LOCK TABLES `oauth_approvals` WRITE; /*!40000 ALTER TABLE `oauth_approvals` DISABLE KEYS */; /*!40000 ALTER TABLE `oauth_approvals` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `oauth_client_details` -- DROP TABLE IF EXISTS `oauth_client_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `oauth_client_details` ( `client_id` varchar(255) NOT NULL, `resource_ids` varchar(255) DEFAULT NULL, `client_secret` varchar(255) DEFAULT NULL, `scope` varchar(255) DEFAULT NULL, `authorized_grant_types` varchar(255) DEFAULT NULL, `web_server_redirect_uri` varchar(255) DEFAULT NULL, `authorities` varchar(255) DEFAULT NULL, `access_token_validity` int(11) DEFAULT NULL, `refresh_token_validity` int(11) DEFAULT NULL, `additional_information` varchar(4096) DEFAULT NULL, `autoapprove` varchar(255) DEFAULT NULL, PRIMARY KEY (`client_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `oauth_client_details` -- LOCK TABLES `oauth_client_details` WRITE; /*!40000 ALTER TABLE `oauth_client_details` DISABLE KEYS */; /*!40000 ALTER TABLE `oauth_client_details` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `oauth_client_token` -- DROP TABLE IF EXISTS `oauth_client_token`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `oauth_client_token` ( `token_id` varchar(255) DEFAULT NULL, `token` mediumblob, `authentication_id` varchar(255) NOT NULL, `user_name` varchar(255) DEFAULT NULL, `client_id` varchar(255) DEFAULT NULL, PRIMARY KEY (`authentication_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `oauth_client_token` -- LOCK TABLES `oauth_client_token` WRITE; /*!40000 ALTER TABLE `oauth_client_token` DISABLE KEYS */; /*!40000 ALTER TABLE `oauth_client_token` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `oauth_code` -- DROP TABLE IF EXISTS `oauth_code`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `oauth_code` ( `code` varchar(255) DEFAULT NULL, `authentication` mediumblob ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `oauth_code` -- LOCK TABLES `oauth_code` WRITE; /*!40000 ALTER TABLE `oauth_code` DISABLE KEYS */; /*!40000 ALTER TABLE `oauth_code` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `oauth_refresh_token` -- DROP TABLE IF EXISTS `oauth_refresh_token`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `oauth_refresh_token` ( `token_id` varchar(255) DEFAULT NULL, `token` mediumblob, `authentication` mediumblob ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `oauth_refresh_token` -- LOCK TABLES `oauth_refresh_token` WRITE; /*!40000 ALTER TABLE `oauth_refresh_token` DISABLE KEYS */; /*!40000 ALTER TABLE `oauth_refresh_token` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `rx` -- DROP TABLE IF EXISTS `rx`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `rx` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL, `doctor_id` bigint(20) NOT NULL, `symptoms` varchar(250) DEFAULT NULL, `medicine` varchar(250) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `rx_user_id_fk` (`user_id`), KEY `rx_doctor_id_fk` (`doctor_id`), CONSTRAINT `rx_doctor_id_fk` FOREIGN KEY (`doctor_id`) REFERENCES `doctor` (`id`), CONSTRAINT `rx_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `rx` -- LOCK TABLES `rx` WRITE; /*!40000 ALTER TABLE `rx` DISABLE KEYS */; INSERT INTO `rx` VALUES (8,26,10,'cold & fever','cetrizine','2017-08-08 12:02:39','2017-08-08 12:02:39'); /*!40000 ALTER TABLE `rx` ENABLE KEYS */; UNLOCK TABLES; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2017-08-08 17:06:35
the_stack
BEGIN; set client_min_messages to error; set client_encoding = 'UTF8'; drop schema if exists store cascade; create schema store; set search_path = store; create table store.items ( id serial primary key, name text not null unique, price numeric, weight numeric ); create table store.invoices ( id serial primary key, person_id integer not null references peeps.people(id), order_date date not null default current_date, payment_date date, payment_info text, subtotal numeric, shipping numeric, total numeric, country char(2) references peeps.countries(code), address text, ship_date date, ship_info text ); create index on store.invoices(person_id); create index unshipped on store.invoices(payment_date, ship_date, address); create table store.lineitems ( id serial primary key, invoice_id integer not null references store.invoices(id) on delete cascade, item_id integer not null references store.items(id) on delete restrict, quantity smallint not null default 1 check (quantity > 0), price numeric, unique(invoice_id, item_id) ); create index on store.lineitems(invoice_id); create table store.shipchart ( id serial primary key, country char(2) references peeps.countries(code), weight numeric not null, -- up to this (invoice.weight <= shipchart.weight) cost numeric not null ); create index on store.shipchart(country, weight); drop view if exists store.invoice_view cascade; create view store.invoice_view as select v.id, v.person_id, p.name, v.order_date, v.payment_date, v.payment_info, v.subtotal, v.shipping, v.total, v.country, v.address, v.ship_date, v.ship_info, ( select json_agg(ll) as lineitems from ( select l.id, l.item_id, i.name, l.quantity, l.price from store.lineitems l join store.items i on l.item_id = i.id where l.invoice_id = v.id ) ll ) from store.invoices v join peeps.people p on v.person_id = p.id; -- invoice_id : does it need a shipment? (regardless of whether it has one or not) create or replace function store.invoice_needs_shipment(integer) returns boolean as $$ begin perform i.id from store.items i join store.lineitems l on i.id = l.item_id where l.invoice_id = $1 and i.weight is not null; if found then return true; else return false; end if; end; $$ language plpgsql; -- input: invoice_id output: numeric cost of shipping current lineitems create or replace function store.invoice_shipcost(integer, out cost numeric) as $$ begin select store.shipcost(v.country, sum(coalesce(i.weight, 0) * l.quantity)) into cost from store.invoices v join store.lineitems l on v.id = l.invoice_id join store.items i on l.item_id = i.id where v.id = $1 group by v.country; end; $$ language plpgsql; -- input: country, weight output: numeric cost create or replace function store.shipcost(char(2), numeric) returns numeric as $$ declare -- query into this. return when not null. c numeric; begin -- zero weight = zero cost if $2 = 0 then return 0; end if; -- weights out of range? $1000 :-) if ($2 < 0) or ($2 > 999) then return 1000; end if; -- is specific country in shipchart? select cost into c from store.shipchart where country = $1 and weight >= $2 order by cost asc limit 1; if c is not null then return c; end if; -- if country didn't match, null means "rest of world" select cost into c from store.shipchart where country is null and weight >= $2 order by cost asc limit 1; if c is not null then return c; end if; -- could it ever come to this? return 1001; end; $$ language plpgsql; -- input: person_id -- output: invoices.id that's still open aka "cart" - null if none create or replace function store.cart_get_id(integer, out id integer) as $$ begin select v.id into id from store.invoices v where person_id = $1 and payment_date is null; end; $$ language plpgsql; -- input: person_id -- output: new invoices.id create or replace function store.cart_new_id(integer, out id integer) as $$ begin insert into store.invoices (person_id, country) select p.id, p.country from peeps.people p where p.id = $1 returning store.invoices.id into id; end; $$ language plpgsql; create or replace function store.lineitem_calc() returns trigger as $$ declare invid integer; lsum numeric; begin -- if not deleting, update lineitem price if (tg_op != 'DELETE') then update store.lineitems l set price = l.quantity * i.price from store.items i where l.item_id = i.id and l.id = new.id; end if; -- get invoice_id whether adding or deleting if (tg_op = 'INSERT' or tg_op = 'UPDATE') then invid := new.invoice_id; elsif (tg_op = 'DELETE') then invid := old.invoice_id; end if; -- whether insert|update|delete, these should work: select sum(price) into lsum from store.lineitems where invoice_id = invid; update store.invoices set subtotal = lsum, shipping = store.invoice_shipcost(invid), total = (lsum + store.invoice_shipcost(invid)) where id = invid; return new; end; $$ language plpgsql; drop trigger if exists lineitem_calc on store.lineitems cascade; create trigger lineitem_calc after insert or delete or update of item_id, quantity on store.lineitems for each row execute procedure store.lineitem_calc(); create or replace function store.no_alter_paid_lineitem() returns trigger as $$ declare paid_invoice integer; begin select v.id into paid_invoice from store.invoices v where v.id = old.invoice_id and v.payment_date is not null; if found then raise 'no_alter_paid_lineitem'; end if; if (tg_op = 'DELETE') then return old; else return new; end if; end; $$ language plpgsql; drop trigger if exists no_alter_paid_lineitem on store.lineitems cascade; create trigger no_alter_paid_lineitem before delete or update on store.lineitems for each row execute procedure store.no_alter_paid_lineitem(); create or replace function store.no_alter_shipped_invoice() returns trigger as $$ begin if old.ship_date is not null then raise 'no_alter_shipped_invoice'; end if; if (tg_op = 'DELETE') then return old; else return new; end if; end; $$ language plpgsql; drop trigger if exists no_alter_shipped_invoice on store.invoices cascade; create trigger no_alter_shipped_invoice before delete or update on store.invoices for each row execute procedure store.no_alter_shipped_invoice(); -- invoices.id, country, create or replace function store.invoice_update(integer, char(2), out status smallint, out js json) as $$ declare e6 text; e7 text; e8 text; e9 text; begin update store.invoices set country = $2 where id = $1; status := 200; js := row_to_json(r) from ( select * from store.invoice_view where id = $1 ) r; if js is null then status := 404; js := '{}'; end if; exception when others then get stacked diagnostics e6=returned_sqlstate, e7=message_text, e8=pg_exception_detail, e9=pg_exception_context; js := json_build_object('code',e6,'message',e7,'detail',e8,'context',e9); status := 500; end; $$ language plpgsql; -- invoices.id, country, address create or replace function store.invoice_update(integer, char(2), text, out status smallint, out js json) as $$ declare e6 text; e7 text; e8 text; e9 text; begin update store.invoices set country = $2, address = $3 where id = $1; status := 200; js := row_to_json(r) from ( select * from store.invoice_view where id = $1 ) r; if js is null then status := 404; js := '{}'; end if; exception when others then get stacked diagnostics e6=returned_sqlstate, e7=message_text, e8=pg_exception_detail, e9=pg_exception_context; js := json_build_object('code',e6,'message',e7,'detail',e8,'context',e9); status := 500; end; $$ language plpgsql; -- person_id, item_id, quantity create or replace function store.lineitem_add(integer, integer, integer, out status smallint, out js json) as $$ declare cart_id integer; line_id integer; e6 text; e7 text; e8 text; e9 text; begin select id into cart_id from store.cart_get_id($1); if cart_id is null then select id into cart_id from store.cart_new_id($1); end if; select id into line_id from store.lineitems where invoice_id = cart_id and item_id = $2; if line_id is null then insert into store.lineitems (invoice_id, item_id, quantity) values (cart_id, $2, $3) returning id into line_id; else update store.lineitems set quantity = quantity + $3 where id = line_id; end if; status := 200; js := row_to_json(r.*) from store.lineitems r where id = line_id; exception when others then get stacked diagnostics e6=returned_sqlstate, e7=message_text, e8=pg_exception_detail, e9=pg_exception_context; js := json_build_object('code',e6,'message',e7,'detail',e8,'context',e9); status := 500; end; $$ language plpgsql; create or replace function store.invoices_get( out status smallint, out js json) as $$ begin js := json_agg(r) from ( select * from store.invoice_view order by id ) r; status := 200; if js is null then js := '[]'; end if; end; $$ language plpgsql; -- person_id create or replace function store.items_get_for(integer, out status smallint, out js json) as $$ begin js := json_agg(r) from ( select i.id, i.name from store.items i join store.lineitems l on i.id = l.item_id join store.invoices v on l.invoice_id = v.id where v.person_id = $1 and v.payment_date is not null order by name ) r; status := 200; if js is null then js := '[]'; end if; end; $$ language plpgsql; create or replace function store.items_get( out status smallint, out js json) as $$ begin js := json_agg(r) from ( select * from store.items order by name ) r; status := 200; if js is null then js := '[]'; end if; end; $$ language plpgsql; -- invoices.id, shipment info create or replace function store.invoice_shipped(integer, text, out status smallint, out js json) as $$ declare e6 text; e7 text; e8 text; e9 text; begin update store.invoices set ship_date = now(), ship_info = $2 where id = $1 and ship_date is null; select x.status, x.js into status, js from store.invoice_get($1) x; exception when others then get stacked diagnostics e6=returned_sqlstate, e7=message_text, e8=pg_exception_detail, e9=pg_exception_context; js := json_build_object('code',e6,'message',e7,'detail',e8,'context',e9); status := 500; end; $$ language plpgsql; create or replace function store.invoice_delete(integer, out status smallint, out js json) as $$ declare e6 text; e7 text; e8 text; e9 text; begin js := row_to_json(r.*) from store.invoice_view r where id = $1; status := 200; if js is null then status := 404; js := '{}'; else delete from store.invoices where id = $1; end if; exception when others then get stacked diagnostics e6=returned_sqlstate, e7=message_text, e8=pg_exception_detail, e9=pg_exception_context; js := json_build_object('code',e6,'message',e7,'detail',e8,'context',e9); status := 500; end; $$ language plpgsql; -- person_id create or replace function store.invoices_get_for(integer, out status smallint, out js json) as $$ begin js := json_agg(r) from ( select * from store.invoice_view where person_id = $1 order by id ) r; status := 200; if js is null then js := '[]'; end if; end; $$ language plpgsql; create or replace function store.invoices_unshipped( out status smallint, out js json) as $$ begin js := json_agg(r) from ( select * from store.invoice_view where payment_date is not null and ship_date is null and address is not null order by id ) r; status := 200; if js is null then js := '[]'; end if; end; $$ language plpgsql; -- person_id create or replace function store.cart_get(integer, out status smallint, out js json) as $$ declare cart_id integer; begin select id into cart_id from store.cart_get_id($1); if cart_id is null then status := 404; js := '{}'; else status := 200; js := row_to_json(r) from ( select * from store.invoice_view where id = cart_id ) r; end if; end; $$ language plpgsql; -- lineitems.id, quantity create or replace function store.lineitem_update(integer, integer, out status smallint, out js json) as $$ declare e6 text; e7 text; e8 text; e9 text; begin perform 1 from store.lineitems where id = $1; if not found then status := 404; js := '{}'; elsif $2 > 0 then update store.lineitems set quantity = $2 where id = $1; status := 200; js := row_to_json(r.*) from store.lineitems r where id = $1; else delete from store.lineitems where id = $1; status := 200; js := '{}'; end if; exception when others then get stacked diagnostics e6=returned_sqlstate, e7=message_text, e8=pg_exception_detail, e9=pg_exception_context; js := json_build_object('code',e6,'message',e7,'detail',e8,'context',e9); status := 500; end; $$ language plpgsql; create or replace function store.invoice_get(integer, out status smallint, out js json) as $$ begin js := row_to_json(r) from ( select * from store.invoice_view where id = $1 ) r; status := 200; if js is null then js := '{}'; status := 404; end if; end; $$ language plpgsql; -- person_id create or replace function store.addresses_get(integer, out status smallint, out js json) as $$ begin js := json_agg(r) from ( select id, country, address from store.invoices where person_id = $1 and address is not null order by id ) r; status := 200; if js is null then js := '[]'; end if; end; $$ language plpgsql; create or replace function store.lineitem_delete(integer, out status smallint, out js json) as $$ declare e6 text; e7 text; e8 text; e9 text; begin js := row_to_json(r.*) from store.lineitems r where id = $1; status := 200; if js is null then status := 404; js := '{}'; else delete from store.lineitems where id = $1; end if; exception when others then get stacked diagnostics e6=returned_sqlstate, e7=message_text, e8=pg_exception_detail, e9=pg_exception_context; js := json_build_object('code',e6,'message',e7,'detail',e8,'context',e9); status := 500; end; $$ language plpgsql; -- invoices.id, payment info create or replace function store.invoice_paid(integer, text, out status smallint, out js json) as $$ declare e6 text; e7 text; e8 text; e9 text; begin update store.invoices set payment_date = now(), payment_info = $2 where id = $1 and payment_date is null; select x.status, x.js into status, js from store.invoice_get($1) x; exception when others then get stacked diagnostics e6=returned_sqlstate, e7=message_text, e8=pg_exception_detail, e9=pg_exception_context; js := json_build_object('code',e6,'message',e7,'detail',e8,'context',e9); status := 500; end; $$ language plpgsql; COMMIT;
the_stack
CREATE DATABASE IF NOT EXISTS `linkedSPLs` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `linkedSPLs`; -- MySQL dump 10.13 Distrib 5.5.40, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: linkedSPLs -- ------------------------------------------------------ -- Server version 5.5.40-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `ChEBI_DRUGBANK_BIO2RDF` -- DROP TABLE IF EXISTS `ChEBI_DRUGBANK_BIO2RDF`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ChEBI_DRUGBANK_BIO2RDF` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ChEBI_OBO` varchar(200) NOT NULL, `ChEBI_BIO2RDF` varchar(200) NOT NULL, `DRUGBANK_CA` varchar(200) NOT NULL, `DRUGBANK_BIO2RDF` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `FDAPharmgxTable` -- DROP TABLE IF EXISTS `FDAPharmgxTable`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `FDAPharmgxTable` ( `id` int(11) NOT NULL AUTO_INCREMENT, `activeMoiety` varchar(200) NOT NULL, `therapeuticApplication` varchar(500) NOT NULL, `biomarker` varchar(50) NOT NULL, `setId` varchar(200) NOT NULL, `SPLSection` varchar(500) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `FDAPharmgxTableToOntologyMap` -- DROP TABLE IF EXISTS `FDAPharmgxTableToOntologyMap`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `FDAPharmgxTableToOntologyMap` ( `id` int(11) NOT NULL AUTO_INCREMENT, `FDAReferencedSubgroup` varchar(200) NOT NULL, `HGNCGeneSymbol` varchar(100), `Synonymns` varchar(500) , `AlleleVariant` varchar(100), `Pharmgkb` varchar(100), `URI` varchar(200), `Ontology` varchar(200), `CuratorComments` varchar(500), PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Table structure for table `FDAPreferredSubstanceToRxNORM` -- DROP TABLE IF EXISTS `FDAPreferredSubstanceToRxNORM`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `FDAPreferredSubstanceToRxNORM` ( `id` int(11) NOT NULL AUTO_INCREMENT, `PreferredSubstance` varchar(200) NOT NULL, `RxNORM` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=32768 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `FDAPreferredSubstanceToUNII` -- DROP TABLE IF EXISTS `FDAPreferredSubstanceToUNII`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `FDAPreferredSubstanceToUNII` ( `id` int(11) NOT NULL AUTO_INCREMENT, `PreferredSubstance` varchar(200) NOT NULL, `UNII` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=524281 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `FDA_EPC_Table` -- DROP TABLE IF EXISTS `FDA_EPC_Table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `FDA_EPC_Table` ( `id` int(11) NOT NULL AUTO_INCREMENT, `setId` varchar(200) NOT NULL, `UNII` varchar(50) NOT NULL, `NUI` varchar(50) NOT NULL, `PreferredNameAndRole` varchar(300) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=16384 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `FDA_SUBSTANCE_TO_DRUGBANK_BIO2RDF` -- DROP TABLE IF EXISTS `FDA_SUBSTANCE_TO_DRUGBANK_BIO2RDF`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `FDA_SUBSTANCE_TO_DRUGBANK_BIO2RDF` ( `id` int(11) NOT NULL AUTO_INCREMENT, `PreferredSubstance` varchar(200) NOT NULL, `DRUGBANK_CA` varchar(200) NOT NULL, `DRUGBANK_BIO2RDF` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4096 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `FDA_UNII_to_ChEBI` -- DROP TABLE IF EXISTS `FDA_UNII_to_ChEBI`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `FDA_UNII_to_ChEBI` ( `id` int(11) NOT NULL AUTO_INCREMENT, `PreferredSubstance` varchar(200) NOT NULL, `ChEBI` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8192 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- -- -- Table structure for table `OMOP_RXCUI` -- -- -- DROP TABLE IF EXISTS `OMOP_RXCUI`; -- /*!40101 SET @saved_cs_client = @@character_set_client */; -- /*!40101 SET character_set_client = utf8 */; -- CREATE TABLE `linkedSPLs`.`OMOP_RXCUI` ( -- `Id` INT NOT NULL AUTO_INCREMENT, -- `OMOPConceptId` VARCHAR(20) NOT NULL, -- `RxCUI` VARCHAR(20) NOT NULL, -- PRIMARY KEY (`Id`) -- ) ENGINE=InnoDB AUTO_INCREMENT=4096 DEFAULT CHARSET=utf8; -- /*!40101 SET character_set_client = @saved_cs_client */;; -- -- Table structure for table `RXNORM_NDFRT_INGRED_Table` -- DROP TABLE IF EXISTS `RXNORM_NDFRT_INGRED_Table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `RXNORM_NDFRT_INGRED_Table` ( `id` int(11) NOT NULL AUTO_INCREMENT, `RxNORM` varchar(200) NOT NULL, `NUI` varchar(200) NOT NULL, `NDFRT_LABEL` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=16384 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `SPLSetIDToRxNORM` -- DROP TABLE IF EXISTS `SPLSetIDToRxNORM`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `SPLSetIDToRxNORM` ( `id` int(11) NOT NULL AUTO_INCREMENT, `setId` varchar(200) NOT NULL, `RxCUI` varchar(50) NOT NULL, `RxClinicalDrug` varchar(1000) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=196606 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `abuse` -- DROP TABLE IF EXISTS `abuse`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `abuse` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `abuse_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1316 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `accessories` -- DROP TABLE IF EXISTS `accessories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `accessories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `accessories_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `active_moiety` -- DROP TABLE IF EXISTS `active_moiety`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `active_moiety` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(300) CHARACTER SET latin1 NOT NULL, `UNII` varchar(50) CHARACTER SET latin1 NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=117117 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `adverse_reactions` -- DROP TABLE IF EXISTS `adverse_reactions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `adverse_reactions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `adverse_reactions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=25246 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `animal_pharmacology_and_or_toxicology` -- DROP TABLE IF EXISTS `animal_pharmacology_and_or_toxicology`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `animal_pharmacology_and_or_toxicology` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `animal_pharmacology_and_or_toxicology_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2953 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `assembly_or_installation_instructions` -- DROP TABLE IF EXISTS `assembly_or_installation_instructions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `assembly_or_installation_instructions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `assembly_or_installation_instructions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `boxed_warning` -- DROP TABLE IF EXISTS `boxed_warning`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `boxed_warning` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `boxed_warning_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8890 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `calibration_instructions` -- DROP TABLE IF EXISTS `calibration_instructions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `calibration_instructions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `calibration_instructions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `carcinogenesis_and_mutagenesis_and_impairment_of_fertility` -- DROP TABLE IF EXISTS `carcinogenesis_and_mutagenesis_and_impairment_of_fertility`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `carcinogenesis_and_mutagenesis_and_impairment_of_fertility` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `carci_and_mutag_and_impair_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=16439 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `cleaning_disinfecting_and_sterilization_instructions` -- DROP TABLE IF EXISTS `cleaning_disinfecting_and_sterilization_instructions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cleaning_disinfecting_and_sterilization_instructions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `cleaning_disinfecting_and_sterilization_instructions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `clinical_pharmacology` -- DROP TABLE IF EXISTS `clinical_pharmacology`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `clinical_pharmacology` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `clinical_pharmacology_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=24053 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `clinical_studies` -- DROP TABLE IF EXISTS `clinical_studies`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `clinical_studies` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `clinical_studies_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=10085 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `components` -- DROP TABLE IF EXISTS `components`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `components` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `components_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `contraindications` -- DROP TABLE IF EXISTS `contraindications`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `contraindications` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `contraindications_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=24413 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `controlled_substance` -- DROP TABLE IF EXISTS `controlled_substance`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `controlled_substance` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `controlled_substance_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1711 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `dependence` -- DROP TABLE IF EXISTS `dependence`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `dependence` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `dependence_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1404 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `description` -- DROP TABLE IF EXISTS `description`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `description` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `description_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=26059 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `disposal_and_waste_handling` -- DROP TABLE IF EXISTS `disposal_and_waste_handling`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `disposal_and_waste_handling` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `disposal_and_waste_handling_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `dosage_and_administration` -- DROP TABLE IF EXISTS `dosage_and_administration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `dosage_and_administration` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `dosage_and_administration_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=52967 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `dosage_forms_and_strengths` -- DROP TABLE IF EXISTS `dosage_forms_and_strengths`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `dosage_forms_and_strengths` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `dosage_forms_and_strengths_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5955 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `drug_abuse_and_dependence` -- DROP TABLE IF EXISTS `drug_abuse_and_dependence`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drug_abuse_and_dependence` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `drug_abuse_and_dependence_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5534 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `drug_and_or_laboratory_test_interactions` -- DROP TABLE IF EXISTS `drug_and_or_laboratory_test_interactions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drug_and_or_laboratory_test_interactions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `drug_and_or_laboratory_test_interactions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3517 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `drug_interactions` -- DROP TABLE IF EXISTS `drug_interactions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `drug_interactions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `drug_interactions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=17004 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `environmental_warning` -- DROP TABLE IF EXISTS `environmental_warning`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `environmental_warning` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `environmental_warning_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `food_safety_warning` -- DROP TABLE IF EXISTS `food_safety_warning`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `food_safety_warning` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `food_safety_warning_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `general_precautions` -- DROP TABLE IF EXISTS `general_precautions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `general_precautions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `general_precautions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=10074 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `geriatric_use` -- DROP TABLE IF EXISTS `geriatric_use`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `geriatric_use` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `geriatric_use_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=14261 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `guaranteed_analysis_of_feed` -- DROP TABLE IF EXISTS `guaranteed_analysis_of_feed`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `guaranteed_analysis_of_feed` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `guaranteed_analysis_of_feed_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `health_care_provider_letter_section` -- DROP TABLE IF EXISTS `health_care_provider_letter_section`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `health_care_provider_letter_section` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `health_care_provider_letter_section_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `health_claim` -- DROP TABLE IF EXISTS `health_claim`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `health_claim` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `health_claim_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `how_supplied` -- DROP TABLE IF EXISTS `how_supplied`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `how_supplied` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `how_supplied_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=24234 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `inactive_ingredient` -- DROP TABLE IF EXISTS `inactive_ingredient`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `inactive_ingredient` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `inactive_ingredient_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=30317 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `indications_and_usage` -- DROP TABLE IF EXISTS `indications_and_usage`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `indications_and_usage` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `indications_and_usage_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=53373 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `information_for_owners_caregivers` -- DROP TABLE IF EXISTS `information_for_owners_caregivers`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `information_for_owners_caregivers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `information_for_owners_caregivers_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `information_for_patients` -- DROP TABLE IF EXISTS `information_for_patients`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `information_for_patients` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `information_for_patients_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=16738 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `instructions_for_use` -- DROP TABLE IF EXISTS `instructions_for_use`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `instructions_for_use` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `instructions_for_use_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=578 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `intended_use_of_the_device` -- DROP TABLE IF EXISTS `intended_use_of_the_device`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `intended_use_of_the_device` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `intended_use_of_the_device_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `labor_and_delivery` -- DROP TABLE IF EXISTS `labor_and_delivery`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `labor_and_delivery` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `labor_and_delivery_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5403 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `laboratory_tests` -- DROP TABLE IF EXISTS `laboratory_tests`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `laboratory_tests` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `laboratory_tests_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6248 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `loinc` -- DROP TABLE IF EXISTS `loinc`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `loinc` ( `loinc` varchar(7) NOT NULL, `dailymed_name` varchar(300) NOT NULL, `table_name` varchar(300) NOT NULL, PRIMARY KEY (`loinc`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `mechanism_of_action` -- DROP TABLE IF EXISTS `mechanism_of_action`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `mechanism_of_action` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `mechanism_of_action_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7444 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `microbiology` -- DROP TABLE IF EXISTS `microbiology`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `microbiology` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `microbiology_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1480 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `nonclinical_toxicology` -- DROP TABLE IF EXISTS `nonclinical_toxicology`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `nonclinical_toxicology` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `nonclinical_toxicology_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5863 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `nonteratogenic_effects` -- DROP TABLE IF EXISTS `nonteratogenic_effects`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `nonteratogenic_effects` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `nonteratogenic_effects_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2805 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `nursing_mothers` -- DROP TABLE IF EXISTS `nursing_mothers`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `nursing_mothers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `nursing_mothers_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=17684 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_active_ingredient` -- DROP TABLE IF EXISTS `otc_active_ingredient`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_active_ingredient` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_active_ingredient_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=30329 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_ask_doctor` -- DROP TABLE IF EXISTS `otc_ask_doctor`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_ask_doctor` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_ask_doctor_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=12858 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_ask_doctor_pharmacist` -- DROP TABLE IF EXISTS `otc_ask_doctor_pharmacist`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_ask_doctor_pharmacist` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_ask_doctor_pharmacist_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7573 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_do_not_use` -- DROP TABLE IF EXISTS `otc_do_not_use`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_do_not_use` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_do_not_use_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=15100 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_keep_out_of_reach_of_children` -- DROP TABLE IF EXISTS `otc_keep_out_of_reach_of_children`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_keep_out_of_reach_of_children` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_keep_out_of_reach_of_children_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=28981 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_pregnancy_or_breast_feeding` -- DROP TABLE IF EXISTS `otc_pregnancy_or_breast_feeding`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_pregnancy_or_breast_feeding` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_pregnancy_or_breast_feeding_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9568 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_purpose` -- DROP TABLE IF EXISTS `otc_purpose`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_purpose` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_purpose_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=28830 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_questions` -- DROP TABLE IF EXISTS `otc_questions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_questions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_questions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=15382 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_stop_use` -- DROP TABLE IF EXISTS `otc_stop_use`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_stop_use` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_stop_use_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=20323 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `otc_when_using` -- DROP TABLE IF EXISTS `otc_when_using`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `otc_when_using` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `otc_when_using_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=16697 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `other_safety_information` -- DROP TABLE IF EXISTS `other_safety_information`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `other_safety_information` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `other_safety_information_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2069 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `overdosage` -- DROP TABLE IF EXISTS `overdosage`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `overdosage` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `overdosage_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=22363 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `package_label_principal_display_panel` -- DROP TABLE IF EXISTS `package_label_principal_display_panel`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `package_label_principal_display_panel` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `package_label_principal_display_panel_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=56165 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `patient_medication_information` -- DROP TABLE IF EXISTS `patient_medication_information`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `patient_medication_information` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `patient_medication_information_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `pediatric_use` -- DROP TABLE IF EXISTS `pediatric_use`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pediatric_use` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `pediatric_use_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=17728 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `pharmacodynamics` -- DROP TABLE IF EXISTS `pharmacodynamics`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pharmacodynamics` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `pharmacodynamics_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5993 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `pharmacogenomics` -- DROP TABLE IF EXISTS `pharmacogenomics`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pharmacogenomics` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `pharmacogenomics_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `pharmacokinetics` -- DROP TABLE IF EXISTS `pharmacokinetics`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pharmacokinetics` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `pharmacokinetics_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11023 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `precautions` -- DROP TABLE IF EXISTS `precautions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `precautions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `precautions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=18504 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `pregnancy` -- DROP TABLE IF EXISTS `pregnancy`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pregnancy` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `pregnancy_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=17683 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `recent_major_changes` -- DROP TABLE IF EXISTS `recent_major_changes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `recent_major_changes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `recent_major_changes_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3347 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `references` -- DROP TABLE IF EXISTS `references`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `references` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `references_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4610 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `residue_warning` -- DROP TABLE IF EXISTS `residue_warning`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `residue_warning` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `residue_warning_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `route_method_and_frequency_of_administration` -- DROP TABLE IF EXISTS `route_method_and_frequency_of_administration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `route_method_and_frequency_of_administration` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `route_method_and_frequency_of_administration_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `safe_handling_warning` -- DROP TABLE IF EXISTS `safe_handling_warning`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `safe_handling_warning` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `safe_handling_warning_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=189 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `side_effects` -- DROP TABLE IF EXISTS `side_effects`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `side_effects` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `side_effects_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `spl_has_active_moiety` -- DROP TABLE IF EXISTS `spl_has_active_moiety`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `spl_has_active_moiety` ( `spl` int(11) NOT NULL, `active_moiety` int(11) NOT NULL, PRIMARY KEY (`spl`,`active_moiety`), KEY `spl_id` (`spl`), KEY `active_moiety_id` (`active_moiety`), CONSTRAINT `spl_has_active_moiety_ibfk_1` FOREIGN KEY (`spl`) REFERENCES `structuredProductLabelMetadata` (`id`), CONSTRAINT `spl_has_active_moiety_ibfk_2` FOREIGN KEY (`active_moiety`) REFERENCES `active_moiety` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `spl_indexing_data_elements` -- DROP TABLE IF EXISTS `spl_indexing_data_elements`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `spl_indexing_data_elements` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `spl_indexing_data_elements_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `spl_medguide` -- DROP TABLE IF EXISTS `spl_medguide`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `spl_medguide` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `spl_medguide_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `spl_patient_package_insert` -- DROP TABLE IF EXISTS `spl_patient_package_insert`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `spl_patient_package_insert` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `spl_patient_package_insert_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2945 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `spl_product_data_elements` -- DROP TABLE IF EXISTS `spl_product_data_elements`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `spl_product_data_elements` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `spl_product_data_elements_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=56239 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `spl_unclassified` -- DROP TABLE IF EXISTS `spl_unclassified`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `spl_unclassified` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `spl_unclassified_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=33185 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Temporary table structure for view `spl_view` -- DROP TABLE IF EXISTS `spl_view`; /*!50001 DROP VIEW IF EXISTS `spl_view`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `spl_view` ( `id` tinyint NOT NULL, `setId` tinyint NOT NULL, `versionNumber` tinyint NOT NULL, `fullName` tinyint NOT NULL, `routeOfAdministration` tinyint NOT NULL, `genericMedicine` tinyint NOT NULL, `representedOrganization` tinyint NOT NULL, `effectiveTime` tinyint NOT NULL, `active_moieties` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; -- -- Table structure for table `statement_of_identity` -- DROP TABLE IF EXISTS `statement_of_identity`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `statement_of_identity` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `statement_of_identity_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `storage_and_handling` -- DROP TABLE IF EXISTS `storage_and_handling`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `storage_and_handling` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `storage_and_handling_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=20591 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `structuredProductLabelMetadata` -- DROP TABLE IF EXISTS `structuredProductLabelMetadata`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `structuredProductLabelMetadata` ( `id` int(11) NOT NULL AUTO_INCREMENT, `setId` varchar(100) NOT NULL, `versionNumber` varchar(10) NOT NULL, `fullName` varchar(500) DEFAULT NULL, `routeOfAdministration` varchar(500) DEFAULT NULL, `drugbank_id` varchar(15) DEFAULT NULL, `genericMedicine` varchar(500) DEFAULT NULL, `representedOrganization` varchar(500) DEFAULT NULL, `effectiveTime` date DEFAULT NULL, `filename` varchar(100) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `setId` (`setId`), KEY `drugbank_id` (`drugbank_id`) ) ENGINE=InnoDB AUTO_INCREMENT=56810 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `summary_of_safety_and_effectiveness` -- DROP TABLE IF EXISTS `summary_of_safety_and_effectiveness`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `summary_of_safety_and_effectiveness` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `summary_of_safety_and_effectiveness_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `supplemental_patient_material` -- DROP TABLE IF EXISTS `supplemental_patient_material`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `supplemental_patient_material` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `supplemental_patient_material_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `supplemental_patient_material_section` -- DROP TABLE IF EXISTS `supplemental_patient_material_section`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `supplemental_patient_material_section` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `supplemental_patient_material_section_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `teratogenic_effects` -- DROP TABLE IF EXISTS `teratogenic_effects`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `teratogenic_effects` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `teratogenic_effects_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7343 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `use_in_specific_populations` -- DROP TABLE IF EXISTS `use_in_specific_populations`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `use_in_specific_populations` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `use_in_specific_populations_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6441 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `user_safety_warnings` -- DROP TABLE IF EXISTS `user_safety_warnings`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_safety_warnings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `user_safety_warnings_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `veterinary_indications` -- DROP TABLE IF EXISTS `veterinary_indications`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `veterinary_indications` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `veterinary_indications_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `warnings` -- DROP TABLE IF EXISTS `warnings`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `warnings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `spl_id` (`splId`), CONSTRAINT `warnings_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=46752 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `warnings_and_precautions` -- DROP TABLE IF EXISTS `warnings_and_precautions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `warnings_and_precautions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `splId` int(11) NOT NULL, `field` longtext NOT NULL, PRIMARY KEY (`id`), KEY `splId` (`splId`), CONSTRAINT `warnings_and_precautions_ibfk_1` FOREIGN KEY (`splId`) REFERENCES `structuredProductLabelMetadata` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6933 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `DrOn_ChEBI_RXCUI_DRUG` -- DROP TABLE IF EXISTS `DrOn_ChEBI_RXCUI_DRUG`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `DrOn_ChEBI_RXCUI_DRUG` ( `id` int(11) NOT NULL AUTO_INCREMENT, `dron_id` varchar(30) NOT NULL, `ChEBI` varchar(50) NOT NULL, `rxcui` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6933 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `DrOn_ChEBI_RXCUI_INGREDIENT` -- DROP TABLE IF EXISTS `DrOn_ChEBI_RXCUI_INGREDIENT`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `DrOn_ChEBI_RXCUI_INGREDIENT` ( `id` int(11) NOT NULL AUTO_INCREMENT, `dron_id` varchar(30) NOT NULL, `ChEBI` varchar(50) NOT NULL, `rxcui` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6933 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Final view structure for view `spl_view` -- /*!50001 DROP TABLE IF EXISTS `spl_view`*/; /*!50001 DROP VIEW IF EXISTS `spl_view`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `spl_view` AS select `spl`.`id` AS `id`,`spl`.`setId` AS `setId`,`spl`.`versionNumber` AS `versionNumber`,`spl`.`fullName` AS `fullName`,`spl`.`routeOfAdministration` AS `routeOfAdministration`,`spl`.`genericMedicine` AS `genericMedicine`,`spl`.`representedOrganization` AS `representedOrganization`,`spl`.`effectiveTime` AS `effectiveTime`,group_concat(`am`.`name` separator ',') AS `active_moieties` from ((`structuredProductLabelMetadata` `spl` join `spl_has_active_moiety` `splam` on((`spl`.`id` = `splam`.`spl`))) join `active_moiety` `am` on((`splam`.`active_moiety` = `am`.`id`))) group by `spl`.`id` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2014-11-05 14:48:02
the_stack
-- -- -- delimiter // drop procedure if exists _consume_statement // create procedure _consume_statement( in id_from int unsigned, in id_to int unsigned, in expect_single tinyint unsigned, out consumed_to_id int unsigned, in depth int unsigned, in is_loop tinyint unsigned, in should_execute_statement tinyint unsigned ) comment 'Reads (possibly nested) statement' language SQL deterministic modifies sql data sql security invoker main_body: begin declare first_token text; declare first_state text; declare statement_level int unsigned; declare id_end_statement int unsigned; declare statement_delimiter_found tinyint unsigned; declare expression text charset utf8; declare expression_statement text charset utf8; declare expression_result tinyint unsigned; declare peek_match tinyint unsigned; declare matched_token text charset utf8; declare loop_iteration_count bigint unsigned; declare while_statement_id_from int unsigned; declare while_statement_id_to int unsigned; declare while_otherwise_statement_id_from int unsigned; declare while_otherwise_statement_id_to int unsigned; declare foreach_statement_id_from int unsigned; declare foreach_statement_id_to int unsigned; declare foreach_otherwise_statement_id_from int unsigned; declare foreach_otherwise_statement_id_to int unsigned; declare function_statement_id_from int unsigned; declare function_statement_id_to int unsigned; declare split_statement_id_from int unsigned; declare split_statement_id_to int unsigned; declare split_options varchar(2048) charset utf8; declare if_statement_id_from int unsigned; declare if_statement_id_to int unsigned; declare else_statement_id_from int unsigned; declare else_statement_id_to int unsigned; declare try_statement_error_found tinyint unsigned; declare try_statement_id_from int unsigned; declare try_statement_id_to int unsigned; declare catch_statement_id_from int unsigned; declare catch_statement_id_to int unsigned; declare foreach_variables_statement text charset utf8; declare foreach_collection text charset utf8; declare foreach_variables_array_id int unsigned; declare foreach_variables_delaration_id int unsigned; declare function_arguments_array_id int unsigned; declare function_arguments_declaration_id int unsigned; declare function_declaration_id int unsigned; declare declared_function_name text charset utf8; declare split_table_schema tinytext charset utf8; declare split_table_name tinytext charset utf8; declare split_injected_action_statement text charset utf8; declare split_injected_text text charset utf8; declare reset_query text charset utf8; if is_loop then set @_common_schema_script_loop_nesting_level := @_common_schema_script_loop_nesting_level + 1; end if; statement_loop: while id_from <= id_to do if @_common_schema_script_break_type IS NOT NULL then set consumed_to_id := id_to; leave statement_loop; end if; set @_statement_level=null, @_first_token=null, @_first_state=null; SELECT level, token, state FROM _sql_tokens WHERE id = id_from INTO @_statement_level, @_first_token, @_first_state; set statement_level=@_statement_level; set first_token=@_first_token; set first_state=@_first_state; case when first_state in ('whitespace', 'single line comment', 'multi line comment') then begin -- Ignore whitespace set id_from := id_from + 1; iterate statement_loop; end; when first_state = 'left braces' then begin -- Start new block SELECT MIN(id) FROM _sql_tokens WHERE id > id_from AND state = 'right braces' AND level = statement_level INTO @_id_end_statement; set id_end_statement=@_id_end_statement; if id_end_statement IS NULL then call _throw_script_error(id_from, 'Unmatched "{" brace'); end if; call _consume_statement(id_from+1, id_end_statement-1, FALSE, @_common_schema_dummy, depth+1, false, should_execute_statement); set consumed_to_id := id_end_statement; end; when first_state = 'alpha' AND (SELECT COUNT(*) = 1 FROM _script_statements WHERE _script_statements.statement = first_token) then begin -- This is a SQL statement call _validate_statement_end(id_from, id_to, id_end_statement, statement_delimiter_found); call _resolve_and_consume_sql_or_script_statement(id_from, id_to, id_from + 1, id_end_statement - IF(statement_delimiter_found, 1, 0), depth, first_token, should_execute_statement); set consumed_to_id := id_end_statement; end; when first_state = 'alpha' AND first_token = 'while' then begin call _consume_expression(id_from + 1, id_to, TRUE, consumed_to_id, expression, expression_statement, should_execute_statement); set id_from := consumed_to_id + 1; -- consume single statement (possible compound by {}) call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, true, FALSE); set while_statement_id_from := id_from; set while_statement_id_to := consumed_to_id; -- Is there an 'otherwise' clause? set while_otherwise_statement_id_from := NULL; call _consume_if_exists(consumed_to_id + 1, id_to, consumed_to_id, 'otherwise', NULL, peek_match, @_common_schema_dummy); if peek_match then set id_from := consumed_to_id + 1; call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, false, FALSE); set while_otherwise_statement_id_from := id_from; set while_otherwise_statement_id_to := consumed_to_id; end if; if should_execute_statement then -- Simulate "while" loop: set loop_iteration_count := 0; interpret_while_loop: while TRUE do -- Check for 'break'/'return'; if @_common_schema_script_break_type IS NOT NULL then if @_common_schema_script_break_type = 'break' then set @_common_schema_script_break_type := NULL; end if; leave interpret_while_loop; end if; -- Evaluate 'while' expression: call _evaluate_expression(expression, expression_statement, expression_result); if NOT expression_result then leave interpret_while_loop; end if; -- Expression holds true. We (re)visit 'while' block set loop_iteration_count := loop_iteration_count + 1; call _consume_statement(while_statement_id_from, while_statement_id_to, TRUE, @_common_schema_dummy, depth+1, true, TRUE); end while; if loop_iteration_count = 0 then -- no iterations made. -- If there's an "otherwise" statement -- invoke it! if while_otherwise_statement_id_from IS NOT NULL then call _consume_statement(while_otherwise_statement_id_from, while_otherwise_statement_id_to, TRUE, @_common_schema_dummy, depth+1, false, TRUE); end if; end if; end if; end; when first_state = 'alpha' AND first_token = 'loop' then begin -- consume single statement (possible compound by {}) set id_from := id_from + 1; call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, true, FALSE); set while_statement_id_from := id_from; set while_statement_id_to := consumed_to_id; call _consume_if_exists(consumed_to_id + 1, id_to, consumed_to_id, 'while', NULL, peek_match, @_common_schema_dummy); if peek_match then call _consume_expression(consumed_to_id + 1, id_to, TRUE, consumed_to_id, expression, expression_statement, should_execute_statement); set id_from := consumed_to_id + 1; else call _throw_script_error(id_from, CONCAT('Expcted "while" on loop-while expression')); end if; call _expect_statement_delimiter(consumed_to_id + 1, id_to, consumed_to_id); set id_from := consumed_to_id + 1; if should_execute_statement then interpret_while_loop: while TRUE do -- Check for 'break'/'return'; if @_common_schema_script_break_type IS NOT NULL then if @_common_schema_script_break_type = 'break' then set @_common_schema_script_break_type := NULL; end if; leave interpret_while_loop; end if; -- Execute statement: call _consume_statement(while_statement_id_from, while_statement_id_to, TRUE, @_common_schema_dummy, depth+1, true, TRUE); -- Evaluate 'while' expression: call _evaluate_expression(expression, expression_statement, expression_result); if NOT expression_result then leave interpret_while_loop; end if; end while; end if; end; when first_state = 'alpha' AND first_token = 'foreach' then begin call _consume_foreach_expression(id_from + 1, id_to, consumed_to_id, depth, foreach_collection, foreach_variables_array_id, foreach_variables_delaration_id, should_execute_statement); set id_from := consumed_to_id + 1; -- consume single statement (possible compound by {}) call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, true, FALSE); set foreach_statement_id_from := id_from; set foreach_statement_id_to := consumed_to_id; update _qs_variables set scope_end_id = foreach_statement_id_to where declaration_id = foreach_variables_delaration_id and (function_scope = _get_current_variables_function_scope()) ; -- Is there an 'otherwise' clause? set foreach_otherwise_statement_id_from := NULL; call _consume_if_exists(consumed_to_id + 1, id_to, consumed_to_id, 'otherwise', NULL, peek_match, @_common_schema_dummy); if peek_match then set id_from := consumed_to_id + 1; call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, false, FALSE); set foreach_otherwise_statement_id_from := id_from; set foreach_otherwise_statement_id_to := consumed_to_id; end if; if should_execute_statement then call _foreach(foreach_collection, NULL, foreach_statement_id_from, foreach_statement_id_to, TRUE, @_common_schema_dummy, foreach_variables_array_id, depth+1, TRUE, loop_iteration_count); if loop_iteration_count = 0 then -- no iterations made. -- If there's an "otherwise" statement -- invoke it! if foreach_otherwise_statement_id_from IS NOT NULL then call _consume_statement(foreach_otherwise_statement_id_from, foreach_otherwise_statement_id_to, TRUE, @_common_schema_dummy, depth+1, true, TRUE); end if; end if; end if; call _drop_array(foreach_variables_array_id); end; when first_state = 'alpha' AND first_token = 'function' then begin if @_common_schema_script_function_scope != '' then call _throw_script_error(id_from, 'Function nesting is not allowed'); end if; set function_declaration_id := id_from; call _consume_function_expression(id_from + 1, id_to, consumed_to_id, 1, function_arguments_array_id, function_arguments_declaration_id, declared_function_name, should_execute_statement); set id_from := consumed_to_id + 1; -- consume single statement (possible compound by {}) call _push_current_variables_function_scope(declared_function_name); call _consume_statement(id_from, id_to, TRUE, consumed_to_id, 1, false, FALSE); call _pop_current_variables_function_scope(); set function_statement_id_from := id_from; set function_statement_id_to := consumed_to_id; call _declare_function(declared_function_name, function_declaration_id, function_arguments_declaration_id, function_statement_id_from, function_statement_id_to, function_arguments_array_id, not should_execute_statement); -- function body is not consumed at this stage! call _drop_array(function_arguments_array_id); end; when first_state = 'alpha' AND first_token = 'split' then begin call _consume_split_statement(id_from + 1, id_to, consumed_to_id, depth, split_table_schema, split_table_name, split_injected_action_statement, split_injected_text, split_options, should_execute_statement); set id_from := consumed_to_id + 1; -- consume single statement (possible compound by {}) call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, true, FALSE); set split_statement_id_from := id_from; set split_statement_id_to := consumed_to_id; if should_execute_statement then begin end; call _split(split_table_schema, split_table_name, split_options, split_injected_action_statement, split_injected_text, split_statement_id_from, split_statement_id_to, TRUE, @_common_schema_dummy, depth+1, TRUE); end if; end; when first_state = 'alpha' AND first_token = 'if' then begin call _consume_expression(id_from + 1, id_to, TRUE, consumed_to_id, expression, expression_statement, should_execute_statement); set id_from := consumed_to_id + 1; -- consume single statement (possible compound by {}) call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, false, FALSE); set if_statement_id_from := id_from; set if_statement_id_to := consumed_to_id; -- Is there an 'else' clause? set else_statement_id_from := NULL; call _consume_if_exists(consumed_to_id + 1, id_to, consumed_to_id, 'else', NULL, peek_match, @_common_schema_dummy); if peek_match then set id_from := consumed_to_id + 1; call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, false, FALSE); set else_statement_id_from := id_from; set else_statement_id_to := consumed_to_id; end if; if should_execute_statement then -- Simulate "if" condition: call _evaluate_expression(expression, expression_statement, expression_result); if expression_result then -- "if" condition holds! call _consume_statement(if_statement_id_from, if_statement_id_to, TRUE, @_common_schema_dummy, depth+1, false, TRUE); else -- If there's an "else" statement -- invoke it! if else_statement_id_from IS NOT NULL then call _consume_statement(else_statement_id_from, else_statement_id_to, TRUE, @_common_schema_dummy, depth+1, false, TRUE); end if; end if; end if; end; when first_state = 'alpha' AND first_token = 'try' then begin -- consume single statement (possible compound by {}) set id_from := id_from + 1; call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, false, FALSE); set try_statement_id_from := id_from; set try_statement_id_to := consumed_to_id; -- There must be an 'catch' clause call _consume_if_exists(consumed_to_id + 1, id_to, consumed_to_id, 'catch', NULL, peek_match, @_common_schema_dummy); if peek_match then set id_from := consumed_to_id + 1; call _consume_statement(id_from, id_to, TRUE, consumed_to_id, depth+1, false, FALSE); set catch_statement_id_from := id_from; set catch_statement_id_to := consumed_to_id; else call _throw_script_error(id_from, CONCAT('Expected "catch" on try-catch block')); end if; if should_execute_statement then call _consume_try_statement(try_statement_id_from, try_statement_id_to, TRUE, @_common_schema_dummy, depth+1, TRUE, try_statement_error_found); if try_statement_error_found then call _consume_statement(catch_statement_id_from, catch_statement_id_to, TRUE, @_common_schema_dummy, depth+1, false, TRUE); end if; end if; end; when first_state = 'alpha' AND first_token in ('break', 'return', 'exit') then begin call _expect_statement_delimiter(id_from + 1, id_to, consumed_to_id); if first_token = 'break' and @_common_schema_script_loop_nesting_level = 0 and not should_execute_statement then -- nothing to break; discard. call _throw_script_error(id_from, '''break'' found, but code not inside loop'); end if; if should_execute_statement then set @_common_schema_script_break_type := first_token; end if; end; when first_state = 'statement delimiter' then begin call _throw_script_error(id_from, CONCAT('Empty statement not allowed. Use {} instead')); end; when first_state = 'start' then begin if expect_single then call _throw_script_error(id_from, CONCAT('Unexpected end of script. Expected statement')); end if; set consumed_to_id := id_from; end; else begin select * from _sql_tokens; select first_state; call _throw_script_error(id_from, CONCAT('Unsupported token: "', first_token, '"')); end; end case; if expect_single then leave statement_loop; end if; set id_from := consumed_to_id + 1; end while; set id_from := consumed_to_id + 1; if is_loop then set @_common_schema_script_loop_nesting_level := @_common_schema_script_loop_nesting_level - 1; end if; -- End of scope -- Reset local variables: remove mapping to user-defined-variables; reset value snapshots if any. SELECT GROUP_CONCAT('SET ', mapped_user_defined_variable_name, ' := NULL ' SEPARATOR ';') FROM _qs_variables WHERE declaration_depth = depth and (function_scope = _get_current_variables_function_scope()) INTO @_reset_query; set reset_query=@_reset_query; call exec(reset_query); UPDATE _qs_variables SET value_snapshot = NULL WHERE declaration_depth = depth and (function_scope = _get_current_variables_function_scope()) ; end; // delimiter ;
the_stack
SET LOCAL yb_non_ddl_txn_for_sys_tables_allowed TO true; -- This migration is due to an ICU version upgrade from 67.1 to 70.1. After upgrading, -- 3 collations appear to be removed as they are not added after initdb/reinitb. -- This would cause issues for anybody using these deleted collations, but the risk of that -- happening is very low since collations are a new feature. Ultimately, We are relying on -- nobody using it since it was introduced just recently and we don't want to delay the upgrade. DO $$ DECLARE pg_version VARCHAR; DECLARE platform VARCHAR; DECLARE en_us_utf8 VARCHAR; DECLARE ucs_basic_oid INTEGER; DECLARE pg_collation_count INTEGER; BEGIN -- The collation "en_US.utf8" on Linux is called "en_US.UTF-8" on Mac OS. SELECT version() into pg_version; platform = substr(pg_version, strpos(pg_version, ' on ') + 3); platform = substr(platform, 1, strpos(platform, ', compiled by') - 1); IF platform LIKE '%linux%' THEN en_us_utf8 = 'en_US.utf8'; ELSIF platform LIKE '%apple%' THEN en_us_utf8 = 'en_US.UTF-8'; ELSE RAISE EXCEPTION 'unknown platform %', platform; END IF; -- Instead of loading collations via pg_import_system_collations, we use PL/pgSQL to -- improve performance by doing direct inserts. IF NOT EXISTS ( -- doi-x-icu is one of the new collations introduced, so use that for idempotency. SELECT FROM pg_catalog.pg_collation WHERE collname = 'doi-x-icu' AND collencoding = -1 AND collnamespace = 11 ) THEN -- Need to delete some old descriptions from pg_description and collations from pg_collation -- that are no longer supported in ICU version 70. -- nds-x-icu, nds-DE-x-icu, nds-NL-x-icu are gone entirely, but mi-x-icu and mi-NZ-x-icu -- only have their descriptions removed. WITH descr_delete_oids(pg_coll_oid) AS ( SELECT oid FROM pg_catalog.pg_collation WHERE collname IN ('nds-x-icu', 'nds-DE-x-icu', 'nds-NL-x-icu', 'mi-x-icu', 'mi-NZ-x-icu') ) DELETE FROM pg_catalog.pg_description WHERE objoid IN (SELECT pg_coll_oid FROM descr_delete_oids); DELETE FROM pg_catalog.pg_collation WHERE collname IN ('nds-x-icu', 'nds-DE-x-icu', 'nds-NL-x-icu'); -- There are also case changes for some descriptions: (World) becomes (world). WITH descr_update_oids(row_number, pg_coll_oid) AS ( SELECT ROW_NUMBER() OVER (ORDER BY oid) AS row_number, oid FROM pg_catalog.pg_collation WHERE collname IN ('ar-001-x-icu', 'en-001-x-icu', 'eo-001-x-icu', 'ia-001-x-icu', 'yi-001-x-icu') ) UPDATE pg_catalog.pg_description SET description = updated_values.description FROM ( VALUES (1, 'Arabic (world)'), (2, 'English (world)'), (3, 'Esperanto (world)'), (4, 'Interlingua (world)'), (5, 'Yiddish (world)') ) AS updated_values ( row_number, description ) INNER JOIN descr_update_oids ON updated_values.row_number = descr_update_oids.row_number WHERE objoid = descr_update_oids.pg_coll_oid; -- We cannot delete all the rows in pg_collation and then re-insert them because it -- continues allocating new OIDs rather than re-using, resulting in OID bloat. -- Instead, we only insert the new collations introduced with the ICU version upgrade -- and bulk update the rest of the rows. UPDATE pg_catalog.pg_collation SET collname = updated_values.collname, collnamespace = updated_values.collnamespace, collowner = updated_values.collowner, collprovider = updated_values.collprovider, collencoding = updated_values.collencoding, collcollate = updated_values.collcollate, collctype = updated_values.collctype, collversion = updated_values.collversion FROM ( VALUES ('und-x-icu', 11, 10, 'i', -1, 'und', 'und', '153.112'), ('af-x-icu', 11, 10, 'i', -1, 'af', 'af', '153.112.40'), ('af-NA-x-icu', 11, 10, 'i', -1, 'af-NA', 'af-NA', '153.112.40'), ('af-ZA-x-icu', 11, 10, 'i', -1, 'af-ZA', 'af-ZA', '153.112.40'), ('agq-x-icu', 11, 10, 'i', -1, 'agq', 'agq', '153.112'), ('agq-CM-x-icu', 11, 10, 'i', -1, 'agq-CM', 'agq-CM', '153.112'), ('ak-x-icu', 11, 10, 'i', -1, 'ak', 'ak', '153.112'), ('ak-GH-x-icu', 11, 10, 'i', -1, 'ak-GH', 'ak-GH', '153.112'), ('am-x-icu', 11, 10, 'i', -1, 'am', 'am', '153.112.40'), ('am-ET-x-icu', 11, 10, 'i', -1, 'am-ET', 'am-ET', '153.112.40'), ('ar-x-icu', 11, 10, 'i', -1, 'ar', 'ar', '153.112.40'), ('ar-001-x-icu', 11, 10, 'i', -1, 'ar-001', 'ar-001', '153.112.40'), ('ar-AE-x-icu', 11, 10, 'i', -1, 'ar-AE', 'ar-AE', '153.112.40'), ('ar-BH-x-icu', 11, 10, 'i', -1, 'ar-BH', 'ar-BH', '153.112.40'), ('ar-DJ-x-icu', 11, 10, 'i', -1, 'ar-DJ', 'ar-DJ', '153.112.40'), ('ar-DZ-x-icu', 11, 10, 'i', -1, 'ar-DZ', 'ar-DZ', '153.112.40'), ('ar-EG-x-icu', 11, 10, 'i', -1, 'ar-EG', 'ar-EG', '153.112.40'), ('ar-EH-x-icu', 11, 10, 'i', -1, 'ar-EH', 'ar-EH', '153.112.40'), ('ar-ER-x-icu', 11, 10, 'i', -1, 'ar-ER', 'ar-ER', '153.112.40'), ('ar-IL-x-icu', 11, 10, 'i', -1, 'ar-IL', 'ar-IL', '153.112.40'), ('ar-IQ-x-icu', 11, 10, 'i', -1, 'ar-IQ', 'ar-IQ', '153.112.40'), ('ar-JO-x-icu', 11, 10, 'i', -1, 'ar-JO', 'ar-JO', '153.112.40'), ('ar-KM-x-icu', 11, 10, 'i', -1, 'ar-KM', 'ar-KM', '153.112.40'), ('ar-KW-x-icu', 11, 10, 'i', -1, 'ar-KW', 'ar-KW', '153.112.40'), ('ar-LB-x-icu', 11, 10, 'i', -1, 'ar-LB', 'ar-LB', '153.112.40'), ('ar-LY-x-icu', 11, 10, 'i', -1, 'ar-LY', 'ar-LY', '153.112.40'), ('ar-MA-x-icu', 11, 10, 'i', -1, 'ar-MA', 'ar-MA', '153.112.40'), ('ar-MR-x-icu', 11, 10, 'i', -1, 'ar-MR', 'ar-MR', '153.112.40'), ('ar-OM-x-icu', 11, 10, 'i', -1, 'ar-OM', 'ar-OM', '153.112.40'), ('ar-PS-x-icu', 11, 10, 'i', -1, 'ar-PS', 'ar-PS', '153.112.40'), ('ar-QA-x-icu', 11, 10, 'i', -1, 'ar-QA', 'ar-QA', '153.112.40'), ('ar-SA-x-icu', 11, 10, 'i', -1, 'ar-SA', 'ar-SA', '153.112.40'), ('ar-SD-x-icu', 11, 10, 'i', -1, 'ar-SD', 'ar-SD', '153.112.40'), ('ar-SO-x-icu', 11, 10, 'i', -1, 'ar-SO', 'ar-SO', '153.112.40'), ('ar-SS-x-icu', 11, 10, 'i', -1, 'ar-SS', 'ar-SS', '153.112.40'), ('ar-SY-x-icu', 11, 10, 'i', -1, 'ar-SY', 'ar-SY', '153.112.40'), ('ar-TD-x-icu', 11, 10, 'i', -1, 'ar-TD', 'ar-TD', '153.112.40'), ('ar-TN-x-icu', 11, 10, 'i', -1, 'ar-TN', 'ar-TN', '153.112.40'), ('ar-YE-x-icu', 11, 10, 'i', -1, 'ar-YE', 'ar-YE', '153.112.40'), ('as-x-icu', 11, 10, 'i', -1, 'as', 'as', '153.112.40'), ('as-IN-x-icu', 11, 10, 'i', -1, 'as-IN', 'as-IN', '153.112.40'), ('asa-x-icu', 11, 10, 'i', -1, 'asa', 'asa', '153.112'), ('asa-TZ-x-icu', 11, 10, 'i', -1, 'asa-TZ', 'asa-TZ', '153.112'), ('ast-x-icu', 11, 10, 'i', -1, 'ast', 'ast', '153.112'), ('ast-ES-x-icu', 11, 10, 'i', -1, 'ast-ES', 'ast-ES', '153.112'), ('az-x-icu', 11, 10, 'i', -1, 'az', 'az', '153.112.40'), ('az-Cyrl-x-icu', 11, 10, 'i', -1, 'az-Cyrl', 'az-Cyrl', '153.112.40'), ('az-Cyrl-AZ-x-icu', 11, 10, 'i', -1, 'az-Cyrl-AZ', 'az-Cyrl-AZ', '153.112.40'), ('az-Latn-x-icu', 11, 10, 'i', -1, 'az-Latn', 'az-Latn', '153.112.40'), ('az-Latn-AZ-x-icu', 11, 10, 'i', -1, 'az-Latn-AZ', 'az-Latn-AZ', '153.112.40'), ('bas-x-icu', 11, 10, 'i', -1, 'bas', 'bas', '153.112'), ('bas-CM-x-icu', 11, 10, 'i', -1, 'bas-CM', 'bas-CM', '153.112'), ('be-x-icu', 11, 10, 'i', -1, 'be', 'be', '153.112.40'), ('be-BY-x-icu', 11, 10, 'i', -1, 'be-BY', 'be-BY', '153.112.40'), ('bem-x-icu', 11, 10, 'i', -1, 'bem', 'bem', '153.112'), ('bem-ZM-x-icu', 11, 10, 'i', -1, 'bem-ZM', 'bem-ZM', '153.112'), ('bez-x-icu', 11, 10, 'i', -1, 'bez', 'bez', '153.112'), ('bez-TZ-x-icu', 11, 10, 'i', -1, 'bez-TZ', 'bez-TZ', '153.112'), ('bg-x-icu', 11, 10, 'i', -1, 'bg', 'bg', '153.112.40'), ('bg-BG-x-icu', 11, 10, 'i', -1, 'bg-BG', 'bg-BG', '153.112.40'), ('bm-x-icu', 11, 10, 'i', -1, 'bm', 'bm', '153.112'), ('bm-ML-x-icu', 11, 10, 'i', -1, 'bm-ML', 'bm-ML', '153.112'), ('bn-x-icu', 11, 10, 'i', -1, 'bn', 'bn', '153.112.40'), ('bn-BD-x-icu', 11, 10, 'i', -1, 'bn-BD', 'bn-BD', '153.112.40'), ('bn-IN-x-icu', 11, 10, 'i', -1, 'bn-IN', 'bn-IN', '153.112.40'), ('bo-x-icu', 11, 10, 'i', -1, 'bo', 'bo', '153.112.40'), ('bo-CN-x-icu', 11, 10, 'i', -1, 'bo-CN', 'bo-CN', '153.112.40'), ('bo-IN-x-icu', 11, 10, 'i', -1, 'bo-IN', 'bo-IN', '153.112.40'), ('br-x-icu', 11, 10, 'i', -1, 'br', 'br', '153.112.40'), ('br-FR-x-icu', 11, 10, 'i', -1, 'br-FR', 'br-FR', '153.112.40'), ('brx-x-icu', 11, 10, 'i', -1, 'brx', 'brx', '153.112'), ('brx-IN-x-icu', 11, 10, 'i', -1, 'brx-IN', 'brx-IN', '153.112'), ('bs-x-icu', 11, 10, 'i', -1, 'bs', 'bs', '153.112.40'), ('bs-Cyrl-x-icu', 11, 10, 'i', -1, 'bs-Cyrl', 'bs-Cyrl', '153.112.40'), ('bs-Cyrl-BA-x-icu', 11, 10, 'i', -1, 'bs-Cyrl-BA', 'bs-Cyrl-BA', '153.112.40'), ('bs-Latn-x-icu', 11, 10, 'i', -1, 'bs-Latn', 'bs-Latn', '153.112.40'), ('bs-Latn-BA-x-icu', 11, 10, 'i', -1, 'bs-Latn-BA', 'bs-Latn-BA', '153.112.40'), ('ca-x-icu', 11, 10, 'i', -1, 'ca', 'ca', '153.112'), ('ca-AD-x-icu', 11, 10, 'i', -1, 'ca-AD', 'ca-AD', '153.112'), ('ca-ES-x-icu', 11, 10, 'i', -1, 'ca-ES', 'ca-ES', '153.112'), ('ca-FR-x-icu', 11, 10, 'i', -1, 'ca-FR', 'ca-FR', '153.112'), ('ca-IT-x-icu', 11, 10, 'i', -1, 'ca-IT', 'ca-IT', '153.112'), ('ccp-x-icu', 11, 10, 'i', -1, 'ccp', 'ccp', '153.112'), ('ccp-BD-x-icu', 11, 10, 'i', -1, 'ccp-BD', 'ccp-BD', '153.112'), ('ccp-IN-x-icu', 11, 10, 'i', -1, 'ccp-IN', 'ccp-IN', '153.112'), ('ce-x-icu', 11, 10, 'i', -1, 'ce', 'ce', '153.112'), ('ce-RU-x-icu', 11, 10, 'i', -1, 'ce-RU', 'ce-RU', '153.112'), ('ceb-x-icu', 11, 10, 'i', -1, 'ceb', 'ceb', '153.112.40'), ('ceb-PH-x-icu', 11, 10, 'i', -1, 'ceb-PH', 'ceb-PH', '153.112.40'), ('cgg-x-icu', 11, 10, 'i', -1, 'cgg', 'cgg', '153.112'), ('cgg-UG-x-icu', 11, 10, 'i', -1, 'cgg-UG', 'cgg-UG', '153.112'), ('chr-x-icu', 11, 10, 'i', -1, 'chr', 'chr', '153.112.40'), ('chr-US-x-icu', 11, 10, 'i', -1, 'chr-US', 'chr-US', '153.112.40'), ('ckb-x-icu', 11, 10, 'i', -1, 'ckb', 'ckb', '153.112'), ('ckb-IQ-x-icu', 11, 10, 'i', -1, 'ckb-IQ', 'ckb-IQ', '153.112'), ('ckb-IR-x-icu', 11, 10, 'i', -1, 'ckb-IR', 'ckb-IR', '153.112'), ('cs-x-icu', 11, 10, 'i', -1, 'cs', 'cs', '153.112.40'), ('cs-CZ-x-icu', 11, 10, 'i', -1, 'cs-CZ', 'cs-CZ', '153.112.40'), ('cy-x-icu', 11, 10, 'i', -1, 'cy', 'cy', '153.112.40'), ('cy-GB-x-icu', 11, 10, 'i', -1, 'cy-GB', 'cy-GB', '153.112.40'), ('da-x-icu', 11, 10, 'i', -1, 'da', 'da', '153.112.40'), ('da-DK-x-icu', 11, 10, 'i', -1, 'da-DK', 'da-DK', '153.112.40'), ('da-GL-x-icu', 11, 10, 'i', -1, 'da-GL', 'da-GL', '153.112.40'), ('dav-x-icu', 11, 10, 'i', -1, 'dav', 'dav', '153.112'), ('dav-KE-x-icu', 11, 10, 'i', -1, 'dav-KE', 'dav-KE', '153.112'), ('de-x-icu', 11, 10, 'i', -1, 'de', 'de', '153.112'), ('de-AT-x-icu', 11, 10, 'i', -1, 'de-AT', 'de-AT', '153.112'), ('de-BE-x-icu', 11, 10, 'i', -1, 'de-BE', 'de-BE', '153.112'), ('de-CH-x-icu', 11, 10, 'i', -1, 'de-CH', 'de-CH', '153.112'), ('de-DE-x-icu', 11, 10, 'i', -1, 'de-DE', 'de-DE', '153.112'), ('de-IT-x-icu', 11, 10, 'i', -1, 'de-IT', 'de-IT', '153.112'), ('de-LI-x-icu', 11, 10, 'i', -1, 'de-LI', 'de-LI', '153.112'), ('de-LU-x-icu', 11, 10, 'i', -1, 'de-LU', 'de-LU', '153.112'), ('dje-x-icu', 11, 10, 'i', -1, 'dje', 'dje', '153.112'), ('dje-NE-x-icu', 11, 10, 'i', -1, 'dje-NE', 'dje-NE', '153.112'), ('doi-x-icu', 11, 10, 'i', -1, 'doi', 'doi', '153.112'), ('doi-IN-x-icu', 11, 10, 'i', -1, 'doi-IN', 'doi-IN', '153.112'), ('dsb-x-icu', 11, 10, 'i', -1, 'dsb', 'dsb', '153.112.40'), ('dsb-DE-x-icu', 11, 10, 'i', -1, 'dsb-DE', 'dsb-DE', '153.112.40'), ('dua-x-icu', 11, 10, 'i', -1, 'dua', 'dua', '153.112'), ('dua-CM-x-icu', 11, 10, 'i', -1, 'dua-CM', 'dua-CM', '153.112'), ('dyo-x-icu', 11, 10, 'i', -1, 'dyo', 'dyo', '153.112'), ('dyo-SN-x-icu', 11, 10, 'i', -1, 'dyo-SN', 'dyo-SN', '153.112'), ('dz-x-icu', 11, 10, 'i', -1, 'dz', 'dz', '153.112'), ('dz-BT-x-icu', 11, 10, 'i', -1, 'dz-BT', 'dz-BT', '153.112'), ('ebu-x-icu', 11, 10, 'i', -1, 'ebu', 'ebu', '153.112'), ('ebu-KE-x-icu', 11, 10, 'i', -1, 'ebu-KE', 'ebu-KE', '153.112'), ('ee-x-icu', 11, 10, 'i', -1, 'ee', 'ee', '153.112.40'), ('ee-GH-x-icu', 11, 10, 'i', -1, 'ee-GH', 'ee-GH', '153.112.40'), ('ee-TG-x-icu', 11, 10, 'i', -1, 'ee-TG', 'ee-TG', '153.112.40'), ('el-x-icu', 11, 10, 'i', -1, 'el', 'el', '153.112.40'), ('el-CY-x-icu', 11, 10, 'i', -1, 'el-CY', 'el-CY', '153.112.40'), ('el-GR-x-icu', 11, 10, 'i', -1, 'el-GR', 'el-GR', '153.112.40'), ('en-x-icu', 11, 10, 'i', -1, 'en', 'en', '153.112'), ('en-001-x-icu', 11, 10, 'i', -1, 'en-001', 'en-001', '153.112'), ('en-150-x-icu', 11, 10, 'i', -1, 'en-150', 'en-150', '153.112'), ('en-AE-x-icu', 11, 10, 'i', -1, 'en-AE', 'en-AE', '153.112'), ('en-AG-x-icu', 11, 10, 'i', -1, 'en-AG', 'en-AG', '153.112'), ('en-AI-x-icu', 11, 10, 'i', -1, 'en-AI', 'en-AI', '153.112'), ('en-AS-x-icu', 11, 10, 'i', -1, 'en-AS', 'en-AS', '153.112'), ('en-AT-x-icu', 11, 10, 'i', -1, 'en-AT', 'en-AT', '153.112'), ('en-AU-x-icu', 11, 10, 'i', -1, 'en-AU', 'en-AU', '153.112'), ('en-BB-x-icu', 11, 10, 'i', -1, 'en-BB', 'en-BB', '153.112'), ('en-BE-x-icu', 11, 10, 'i', -1, 'en-BE', 'en-BE', '153.112'), ('en-BI-x-icu', 11, 10, 'i', -1, 'en-BI', 'en-BI', '153.112'), ('en-BM-x-icu', 11, 10, 'i', -1, 'en-BM', 'en-BM', '153.112'), ('en-BS-x-icu', 11, 10, 'i', -1, 'en-BS', 'en-BS', '153.112'), ('en-BW-x-icu', 11, 10, 'i', -1, 'en-BW', 'en-BW', '153.112'), ('en-BZ-x-icu', 11, 10, 'i', -1, 'en-BZ', 'en-BZ', '153.112'), ('en-CA-x-icu', 11, 10, 'i', -1, 'en-CA', 'en-CA', '153.112'), ('en-CC-x-icu', 11, 10, 'i', -1, 'en-CC', 'en-CC', '153.112'), ('en-CH-x-icu', 11, 10, 'i', -1, 'en-CH', 'en-CH', '153.112'), ('en-CK-x-icu', 11, 10, 'i', -1, 'en-CK', 'en-CK', '153.112'), ('en-CM-x-icu', 11, 10, 'i', -1, 'en-CM', 'en-CM', '153.112'), ('en-CX-x-icu', 11, 10, 'i', -1, 'en-CX', 'en-CX', '153.112'), ('en-CY-x-icu', 11, 10, 'i', -1, 'en-CY', 'en-CY', '153.112'), ('en-DE-x-icu', 11, 10, 'i', -1, 'en-DE', 'en-DE', '153.112'), ('en-DG-x-icu', 11, 10, 'i', -1, 'en-DG', 'en-DG', '153.112'), ('en-DK-x-icu', 11, 10, 'i', -1, 'en-DK', 'en-DK', '153.112'), ('en-DM-x-icu', 11, 10, 'i', -1, 'en-DM', 'en-DM', '153.112'), ('en-ER-x-icu', 11, 10, 'i', -1, 'en-ER', 'en-ER', '153.112'), ('en-FI-x-icu', 11, 10, 'i', -1, 'en-FI', 'en-FI', '153.112'), ('en-FJ-x-icu', 11, 10, 'i', -1, 'en-FJ', 'en-FJ', '153.112'), ('en-FK-x-icu', 11, 10, 'i', -1, 'en-FK', 'en-FK', '153.112'), ('en-FM-x-icu', 11, 10, 'i', -1, 'en-FM', 'en-FM', '153.112'), ('en-GB-x-icu', 11, 10, 'i', -1, 'en-GB', 'en-GB', '153.112'), ('en-GD-x-icu', 11, 10, 'i', -1, 'en-GD', 'en-GD', '153.112'), ('en-GG-x-icu', 11, 10, 'i', -1, 'en-GG', 'en-GG', '153.112'), ('en-GH-x-icu', 11, 10, 'i', -1, 'en-GH', 'en-GH', '153.112'), ('en-GI-x-icu', 11, 10, 'i', -1, 'en-GI', 'en-GI', '153.112'), ('en-GM-x-icu', 11, 10, 'i', -1, 'en-GM', 'en-GM', '153.112'), ('en-GU-x-icu', 11, 10, 'i', -1, 'en-GU', 'en-GU', '153.112'), ('en-GY-x-icu', 11, 10, 'i', -1, 'en-GY', 'en-GY', '153.112'), ('en-HK-x-icu', 11, 10, 'i', -1, 'en-HK', 'en-HK', '153.112'), ('en-IE-x-icu', 11, 10, 'i', -1, 'en-IE', 'en-IE', '153.112'), ('en-IL-x-icu', 11, 10, 'i', -1, 'en-IL', 'en-IL', '153.112'), ('en-IM-x-icu', 11, 10, 'i', -1, 'en-IM', 'en-IM', '153.112'), ('en-IN-x-icu', 11, 10, 'i', -1, 'en-IN', 'en-IN', '153.112'), ('en-IO-x-icu', 11, 10, 'i', -1, 'en-IO', 'en-IO', '153.112'), ('en-JE-x-icu', 11, 10, 'i', -1, 'en-JE', 'en-JE', '153.112'), ('en-JM-x-icu', 11, 10, 'i', -1, 'en-JM', 'en-JM', '153.112'), ('en-KE-x-icu', 11, 10, 'i', -1, 'en-KE', 'en-KE', '153.112'), ('en-KI-x-icu', 11, 10, 'i', -1, 'en-KI', 'en-KI', '153.112'), ('en-KN-x-icu', 11, 10, 'i', -1, 'en-KN', 'en-KN', '153.112'), ('en-KY-x-icu', 11, 10, 'i', -1, 'en-KY', 'en-KY', '153.112'), ('en-LC-x-icu', 11, 10, 'i', -1, 'en-LC', 'en-LC', '153.112'), ('en-LR-x-icu', 11, 10, 'i', -1, 'en-LR', 'en-LR', '153.112'), ('en-LS-x-icu', 11, 10, 'i', -1, 'en-LS', 'en-LS', '153.112'), ('en-MG-x-icu', 11, 10, 'i', -1, 'en-MG', 'en-MG', '153.112'), ('en-MH-x-icu', 11, 10, 'i', -1, 'en-MH', 'en-MH', '153.112'), ('en-MO-x-icu', 11, 10, 'i', -1, 'en-MO', 'en-MO', '153.112'), ('en-MP-x-icu', 11, 10, 'i', -1, 'en-MP', 'en-MP', '153.112'), ('en-MS-x-icu', 11, 10, 'i', -1, 'en-MS', 'en-MS', '153.112'), ('en-MT-x-icu', 11, 10, 'i', -1, 'en-MT', 'en-MT', '153.112'), ('en-MU-x-icu', 11, 10, 'i', -1, 'en-MU', 'en-MU', '153.112'), ('en-MW-x-icu', 11, 10, 'i', -1, 'en-MW', 'en-MW', '153.112'), ('en-MY-x-icu', 11, 10, 'i', -1, 'en-MY', 'en-MY', '153.112'), ('en-NA-x-icu', 11, 10, 'i', -1, 'en-NA', 'en-NA', '153.112'), ('en-NF-x-icu', 11, 10, 'i', -1, 'en-NF', 'en-NF', '153.112'), ('en-NG-x-icu', 11, 10, 'i', -1, 'en-NG', 'en-NG', '153.112'), ('en-NL-x-icu', 11, 10, 'i', -1, 'en-NL', 'en-NL', '153.112'), ('en-NR-x-icu', 11, 10, 'i', -1, 'en-NR', 'en-NR', '153.112'), ('en-NU-x-icu', 11, 10, 'i', -1, 'en-NU', 'en-NU', '153.112'), ('en-NZ-x-icu', 11, 10, 'i', -1, 'en-NZ', 'en-NZ', '153.112'), ('en-PG-x-icu', 11, 10, 'i', -1, 'en-PG', 'en-PG', '153.112'), ('en-PH-x-icu', 11, 10, 'i', -1, 'en-PH', 'en-PH', '153.112'), ('en-PK-x-icu', 11, 10, 'i', -1, 'en-PK', 'en-PK', '153.112'), ('en-PN-x-icu', 11, 10, 'i', -1, 'en-PN', 'en-PN', '153.112'), ('en-PR-x-icu', 11, 10, 'i', -1, 'en-PR', 'en-PR', '153.112'), ('en-PW-x-icu', 11, 10, 'i', -1, 'en-PW', 'en-PW', '153.112'), ('en-RW-x-icu', 11, 10, 'i', -1, 'en-RW', 'en-RW', '153.112'), ('en-SB-x-icu', 11, 10, 'i', -1, 'en-SB', 'en-SB', '153.112'), ('en-SC-x-icu', 11, 10, 'i', -1, 'en-SC', 'en-SC', '153.112'), ('en-SD-x-icu', 11, 10, 'i', -1, 'en-SD', 'en-SD', '153.112'), ('en-SE-x-icu', 11, 10, 'i', -1, 'en-SE', 'en-SE', '153.112'), ('en-SG-x-icu', 11, 10, 'i', -1, 'en-SG', 'en-SG', '153.112'), ('en-SH-x-icu', 11, 10, 'i', -1, 'en-SH', 'en-SH', '153.112'), ('en-SI-x-icu', 11, 10, 'i', -1, 'en-SI', 'en-SI', '153.112'), ('en-SL-x-icu', 11, 10, 'i', -1, 'en-SL', 'en-SL', '153.112'), ('en-SS-x-icu', 11, 10, 'i', -1, 'en-SS', 'en-SS', '153.112'), ('en-SX-x-icu', 11, 10, 'i', -1, 'en-SX', 'en-SX', '153.112'), ('en-SZ-x-icu', 11, 10, 'i', -1, 'en-SZ', 'en-SZ', '153.112'), ('en-TC-x-icu', 11, 10, 'i', -1, 'en-TC', 'en-TC', '153.112'), ('en-TK-x-icu', 11, 10, 'i', -1, 'en-TK', 'en-TK', '153.112'), ('en-TO-x-icu', 11, 10, 'i', -1, 'en-TO', 'en-TO', '153.112'), ('en-TT-x-icu', 11, 10, 'i', -1, 'en-TT', 'en-TT', '153.112'), ('en-TV-x-icu', 11, 10, 'i', -1, 'en-TV', 'en-TV', '153.112'), ('en-TZ-x-icu', 11, 10, 'i', -1, 'en-TZ', 'en-TZ', '153.112'), ('en-UG-x-icu', 11, 10, 'i', -1, 'en-UG', 'en-UG', '153.112'), ('en-UM-x-icu', 11, 10, 'i', -1, 'en-UM', 'en-UM', '153.112'), ('en-US-x-icu', 11, 10, 'i', -1, 'en-US', 'en-US', '153.112'), ('en-US-u-va-posix-x-icu', 11, 10, 'i', -1, 'en-US-u-va-posix', 'en-US-u-va-posix', '153.112.40'), ('en-VC-x-icu', 11, 10, 'i', -1, 'en-VC', 'en-VC', '153.112'), ('en-VG-x-icu', 11, 10, 'i', -1, 'en-VG', 'en-VG', '153.112'), ('en-VI-x-icu', 11, 10, 'i', -1, 'en-VI', 'en-VI', '153.112'), ('en-VU-x-icu', 11, 10, 'i', -1, 'en-VU', 'en-VU', '153.112'), ('en-WS-x-icu', 11, 10, 'i', -1, 'en-WS', 'en-WS', '153.112'), ('en-ZA-x-icu', 11, 10, 'i', -1, 'en-ZA', 'en-ZA', '153.112'), ('en-ZM-x-icu', 11, 10, 'i', -1, 'en-ZM', 'en-ZM', '153.112'), ('en-ZW-x-icu', 11, 10, 'i', -1, 'en-ZW', 'en-ZW', '153.112'), ('eo-x-icu', 11, 10, 'i', -1, 'eo', 'eo', '153.112.40'), ('eo-001-x-icu', 11, 10, 'i', -1, 'eo-001', 'eo-001', '153.112.40'), ('es-x-icu', 11, 10, 'i', -1, 'es', 'es', '153.112.40'), ('es-419-x-icu', 11, 10, 'i', -1, 'es-419', 'es-419', '153.112.40'), ('es-AR-x-icu', 11, 10, 'i', -1, 'es-AR', 'es-AR', '153.112.40'), ('es-BO-x-icu', 11, 10, 'i', -1, 'es-BO', 'es-BO', '153.112.40'), ('es-BR-x-icu', 11, 10, 'i', -1, 'es-BR', 'es-BR', '153.112.40'), ('es-BZ-x-icu', 11, 10, 'i', -1, 'es-BZ', 'es-BZ', '153.112.40'), ('es-CL-x-icu', 11, 10, 'i', -1, 'es-CL', 'es-CL', '153.112.40'), ('es-CO-x-icu', 11, 10, 'i', -1, 'es-CO', 'es-CO', '153.112.40'), ('es-CR-x-icu', 11, 10, 'i', -1, 'es-CR', 'es-CR', '153.112.40'), ('es-CU-x-icu', 11, 10, 'i', -1, 'es-CU', 'es-CU', '153.112.40'), ('es-DO-x-icu', 11, 10, 'i', -1, 'es-DO', 'es-DO', '153.112.40'), ('es-EA-x-icu', 11, 10, 'i', -1, 'es-EA', 'es-EA', '153.112.40'), ('es-EC-x-icu', 11, 10, 'i', -1, 'es-EC', 'es-EC', '153.112.40'), ('es-ES-x-icu', 11, 10, 'i', -1, 'es-ES', 'es-ES', '153.112.40'), ('es-GQ-x-icu', 11, 10, 'i', -1, 'es-GQ', 'es-GQ', '153.112.40'), ('es-GT-x-icu', 11, 10, 'i', -1, 'es-GT', 'es-GT', '153.112.40'), ('es-HN-x-icu', 11, 10, 'i', -1, 'es-HN', 'es-HN', '153.112.40'), ('es-IC-x-icu', 11, 10, 'i', -1, 'es-IC', 'es-IC', '153.112.40'), ('es-MX-x-icu', 11, 10, 'i', -1, 'es-MX', 'es-MX', '153.112.40'), ('es-NI-x-icu', 11, 10, 'i', -1, 'es-NI', 'es-NI', '153.112.40'), ('es-PA-x-icu', 11, 10, 'i', -1, 'es-PA', 'es-PA', '153.112.40'), ('es-PE-x-icu', 11, 10, 'i', -1, 'es-PE', 'es-PE', '153.112.40'), ('es-PH-x-icu', 11, 10, 'i', -1, 'es-PH', 'es-PH', '153.112.40'), ('es-PR-x-icu', 11, 10, 'i', -1, 'es-PR', 'es-PR', '153.112.40'), ('es-PY-x-icu', 11, 10, 'i', -1, 'es-PY', 'es-PY', '153.112.40'), ('es-SV-x-icu', 11, 10, 'i', -1, 'es-SV', 'es-SV', '153.112.40'), ('es-US-x-icu', 11, 10, 'i', -1, 'es-US', 'es-US', '153.112.40'), ('es-UY-x-icu', 11, 10, 'i', -1, 'es-UY', 'es-UY', '153.112.40'), ('es-VE-x-icu', 11, 10, 'i', -1, 'es-VE', 'es-VE', '153.112.40'), ('et-x-icu', 11, 10, 'i', -1, 'et', 'et', '153.112.40'), ('et-EE-x-icu', 11, 10, 'i', -1, 'et-EE', 'et-EE', '153.112.40'), ('eu-x-icu', 11, 10, 'i', -1, 'eu', 'eu', '153.112'), ('eu-ES-x-icu', 11, 10, 'i', -1, 'eu-ES', 'eu-ES', '153.112'), ('ewo-x-icu', 11, 10, 'i', -1, 'ewo', 'ewo', '153.112'), ('ewo-CM-x-icu', 11, 10, 'i', -1, 'ewo-CM', 'ewo-CM', '153.112'), ('fa-x-icu', 11, 10, 'i', -1, 'fa', 'fa', '153.112.40'), ('fa-AF-x-icu', 11, 10, 'i', -1, 'fa-AF', 'fa-AF', '153.112.40'), ('fa-IR-x-icu', 11, 10, 'i', -1, 'fa-IR', 'fa-IR', '153.112.40'), ('ff-x-icu', 11, 10, 'i', -1, 'ff', 'ff', '153.112'), ('ff-Adlm-x-icu', 11, 10, 'i', -1, 'ff-Adlm', 'ff-Adlm', '153.112.40'), ('ff-Adlm-BF-x-icu', 11, 10, 'i', -1, 'ff-Adlm-BF', 'ff-Adlm-BF', '153.112.40'), ('ff-Adlm-CM-x-icu', 11, 10, 'i', -1, 'ff-Adlm-CM', 'ff-Adlm-CM', '153.112.40'), ('ff-Adlm-GH-x-icu', 11, 10, 'i', -1, 'ff-Adlm-GH', 'ff-Adlm-GH', '153.112.40'), ('ff-Adlm-GM-x-icu', 11, 10, 'i', -1, 'ff-Adlm-GM', 'ff-Adlm-GM', '153.112.40'), ('ff-Adlm-GN-x-icu', 11, 10, 'i', -1, 'ff-Adlm-GN', 'ff-Adlm-GN', '153.112.40'), ('ff-Adlm-GW-x-icu', 11, 10, 'i', -1, 'ff-Adlm-GW', 'ff-Adlm-GW', '153.112.40'), ('ff-Adlm-LR-x-icu', 11, 10, 'i', -1, 'ff-Adlm-LR', 'ff-Adlm-LR', '153.112.40'), ('ff-Adlm-MR-x-icu', 11, 10, 'i', -1, 'ff-Adlm-MR', 'ff-Adlm-MR', '153.112.40'), ('ff-Adlm-NE-x-icu', 11, 10, 'i', -1, 'ff-Adlm-NE', 'ff-Adlm-NE', '153.112.40'), ('ff-Adlm-NG-x-icu', 11, 10, 'i', -1, 'ff-Adlm-NG', 'ff-Adlm-NG', '153.112.40'), ('ff-Adlm-SL-x-icu', 11, 10, 'i', -1, 'ff-Adlm-SL', 'ff-Adlm-SL', '153.112.40'), ('ff-Adlm-SN-x-icu', 11, 10, 'i', -1, 'ff-Adlm-SN', 'ff-Adlm-SN', '153.112.40'), ('ff-Latn-x-icu', 11, 10, 'i', -1, 'ff-Latn', 'ff-Latn', '153.112'), ('ff-Latn-BF-x-icu', 11, 10, 'i', -1, 'ff-Latn-BF', 'ff-Latn-BF', '153.112'), ('ff-Latn-CM-x-icu', 11, 10, 'i', -1, 'ff-Latn-CM', 'ff-Latn-CM', '153.112'), ('ff-Latn-GH-x-icu', 11, 10, 'i', -1, 'ff-Latn-GH', 'ff-Latn-GH', '153.112'), ('ff-Latn-GM-x-icu', 11, 10, 'i', -1, 'ff-Latn-GM', 'ff-Latn-GM', '153.112'), ('ff-Latn-GN-x-icu', 11, 10, 'i', -1, 'ff-Latn-GN', 'ff-Latn-GN', '153.112'), ('ff-Latn-GW-x-icu', 11, 10, 'i', -1, 'ff-Latn-GW', 'ff-Latn-GW', '153.112'), ('ff-Latn-LR-x-icu', 11, 10, 'i', -1, 'ff-Latn-LR', 'ff-Latn-LR', '153.112'), ('ff-Latn-MR-x-icu', 11, 10, 'i', -1, 'ff-Latn-MR', 'ff-Latn-MR', '153.112'), ('ff-Latn-NE-x-icu', 11, 10, 'i', -1, 'ff-Latn-NE', 'ff-Latn-NE', '153.112'), ('ff-Latn-NG-x-icu', 11, 10, 'i', -1, 'ff-Latn-NG', 'ff-Latn-NG', '153.112'), ('ff-Latn-SL-x-icu', 11, 10, 'i', -1, 'ff-Latn-SL', 'ff-Latn-SL', '153.112'), ('ff-Latn-SN-x-icu', 11, 10, 'i', -1, 'ff-Latn-SN', 'ff-Latn-SN', '153.112'), ('fi-x-icu', 11, 10, 'i', -1, 'fi', 'fi', '153.112.40'), ('fi-FI-x-icu', 11, 10, 'i', -1, 'fi-FI', 'fi-FI', '153.112.40'), ('fil-x-icu', 11, 10, 'i', -1, 'fil', 'fil', '153.112.40'), ('fil-PH-x-icu', 11, 10, 'i', -1, 'fil-PH', 'fil-PH', '153.112.40'), ('fo-x-icu', 11, 10, 'i', -1, 'fo', 'fo', '153.112.40'), ('fo-DK-x-icu', 11, 10, 'i', -1, 'fo-DK', 'fo-DK', '153.112.40'), ('fo-FO-x-icu', 11, 10, 'i', -1, 'fo-FO', 'fo-FO', '153.112.40'), ('fr-x-icu', 11, 10, 'i', -1, 'fr', 'fr', '153.112'), ('fr-BE-x-icu', 11, 10, 'i', -1, 'fr-BE', 'fr-BE', '153.112'), ('fr-BF-x-icu', 11, 10, 'i', -1, 'fr-BF', 'fr-BF', '153.112'), ('fr-BI-x-icu', 11, 10, 'i', -1, 'fr-BI', 'fr-BI', '153.112'), ('fr-BJ-x-icu', 11, 10, 'i', -1, 'fr-BJ', 'fr-BJ', '153.112'), ('fr-BL-x-icu', 11, 10, 'i', -1, 'fr-BL', 'fr-BL', '153.112'), ('fr-CA-x-icu', 11, 10, 'i', -1, 'fr-CA', 'fr-CA', '153.112.40'), ('fr-CD-x-icu', 11, 10, 'i', -1, 'fr-CD', 'fr-CD', '153.112'), ('fr-CF-x-icu', 11, 10, 'i', -1, 'fr-CF', 'fr-CF', '153.112'), ('fr-CG-x-icu', 11, 10, 'i', -1, 'fr-CG', 'fr-CG', '153.112'), ('fr-CH-x-icu', 11, 10, 'i', -1, 'fr-CH', 'fr-CH', '153.112'), ('fr-CI-x-icu', 11, 10, 'i', -1, 'fr-CI', 'fr-CI', '153.112'), ('fr-CM-x-icu', 11, 10, 'i', -1, 'fr-CM', 'fr-CM', '153.112'), ('fr-DJ-x-icu', 11, 10, 'i', -1, 'fr-DJ', 'fr-DJ', '153.112'), ('fr-DZ-x-icu', 11, 10, 'i', -1, 'fr-DZ', 'fr-DZ', '153.112'), ('fr-FR-x-icu', 11, 10, 'i', -1, 'fr-FR', 'fr-FR', '153.112'), ('fr-GA-x-icu', 11, 10, 'i', -1, 'fr-GA', 'fr-GA', '153.112'), ('fr-GF-x-icu', 11, 10, 'i', -1, 'fr-GF', 'fr-GF', '153.112'), ('fr-GN-x-icu', 11, 10, 'i', -1, 'fr-GN', 'fr-GN', '153.112'), ('fr-GP-x-icu', 11, 10, 'i', -1, 'fr-GP', 'fr-GP', '153.112'), ('fr-GQ-x-icu', 11, 10, 'i', -1, 'fr-GQ', 'fr-GQ', '153.112'), ('fr-HT-x-icu', 11, 10, 'i', -1, 'fr-HT', 'fr-HT', '153.112'), ('fr-KM-x-icu', 11, 10, 'i', -1, 'fr-KM', 'fr-KM', '153.112'), ('fr-LU-x-icu', 11, 10, 'i', -1, 'fr-LU', 'fr-LU', '153.112'), ('fr-MA-x-icu', 11, 10, 'i', -1, 'fr-MA', 'fr-MA', '153.112'), ('fr-MC-x-icu', 11, 10, 'i', -1, 'fr-MC', 'fr-MC', '153.112'), ('fr-MF-x-icu', 11, 10, 'i', -1, 'fr-MF', 'fr-MF', '153.112'), ('fr-MG-x-icu', 11, 10, 'i', -1, 'fr-MG', 'fr-MG', '153.112'), ('fr-ML-x-icu', 11, 10, 'i', -1, 'fr-ML', 'fr-ML', '153.112'), ('fr-MQ-x-icu', 11, 10, 'i', -1, 'fr-MQ', 'fr-MQ', '153.112'), ('fr-MR-x-icu', 11, 10, 'i', -1, 'fr-MR', 'fr-MR', '153.112'), ('fr-MU-x-icu', 11, 10, 'i', -1, 'fr-MU', 'fr-MU', '153.112'), ('fr-NC-x-icu', 11, 10, 'i', -1, 'fr-NC', 'fr-NC', '153.112'), ('fr-NE-x-icu', 11, 10, 'i', -1, 'fr-NE', 'fr-NE', '153.112'), ('fr-PF-x-icu', 11, 10, 'i', -1, 'fr-PF', 'fr-PF', '153.112'), ('fr-PM-x-icu', 11, 10, 'i', -1, 'fr-PM', 'fr-PM', '153.112'), ('fr-RE-x-icu', 11, 10, 'i', -1, 'fr-RE', 'fr-RE', '153.112'), ('fr-RW-x-icu', 11, 10, 'i', -1, 'fr-RW', 'fr-RW', '153.112'), ('fr-SC-x-icu', 11, 10, 'i', -1, 'fr-SC', 'fr-SC', '153.112'), ('fr-SN-x-icu', 11, 10, 'i', -1, 'fr-SN', 'fr-SN', '153.112'), ('fr-SY-x-icu', 11, 10, 'i', -1, 'fr-SY', 'fr-SY', '153.112'), ('fr-TD-x-icu', 11, 10, 'i', -1, 'fr-TD', 'fr-TD', '153.112'), ('fr-TG-x-icu', 11, 10, 'i', -1, 'fr-TG', 'fr-TG', '153.112'), ('fr-TN-x-icu', 11, 10, 'i', -1, 'fr-TN', 'fr-TN', '153.112'), ('fr-VU-x-icu', 11, 10, 'i', -1, 'fr-VU', 'fr-VU', '153.112'), ('fr-WF-x-icu', 11, 10, 'i', -1, 'fr-WF', 'fr-WF', '153.112'), ('fr-YT-x-icu', 11, 10, 'i', -1, 'fr-YT', 'fr-YT', '153.112'), ('fur-x-icu', 11, 10, 'i', -1, 'fur', 'fur', '153.112'), ('fur-IT-x-icu', 11, 10, 'i', -1, 'fur-IT', 'fur-IT', '153.112'), ('fy-x-icu', 11, 10, 'i', -1, 'fy', 'fy', '153.112'), ('fy-NL-x-icu', 11, 10, 'i', -1, 'fy-NL', 'fy-NL', '153.112'), ('ga-x-icu', 11, 10, 'i', -1, 'ga', 'ga', '153.112'), ('ga-GB-x-icu', 11, 10, 'i', -1, 'ga-GB', 'ga-GB', '153.112'), ('ga-IE-x-icu', 11, 10, 'i', -1, 'ga-IE', 'ga-IE', '153.112'), ('gd-x-icu', 11, 10, 'i', -1, 'gd', 'gd', '153.112'), ('gd-GB-x-icu', 11, 10, 'i', -1, 'gd-GB', 'gd-GB', '153.112'), ('gl-x-icu', 11, 10, 'i', -1, 'gl', 'gl', '153.112.40'), ('gl-ES-x-icu', 11, 10, 'i', -1, 'gl-ES', 'gl-ES', '153.112.40'), ('gsw-x-icu', 11, 10, 'i', -1, 'gsw', 'gsw', '153.112'), ('gsw-CH-x-icu', 11, 10, 'i', -1, 'gsw-CH', 'gsw-CH', '153.112'), ('gsw-FR-x-icu', 11, 10, 'i', -1, 'gsw-FR', 'gsw-FR', '153.112'), ('gsw-LI-x-icu', 11, 10, 'i', -1, 'gsw-LI', 'gsw-LI', '153.112'), ('gu-x-icu', 11, 10, 'i', -1, 'gu', 'gu', '153.112.40'), ('gu-IN-x-icu', 11, 10, 'i', -1, 'gu-IN', 'gu-IN', '153.112.40'), ('guz-x-icu', 11, 10, 'i', -1, 'guz', 'guz', '153.112'), ('guz-KE-x-icu', 11, 10, 'i', -1, 'guz-KE', 'guz-KE', '153.112'), ('gv-x-icu', 11, 10, 'i', -1, 'gv', 'gv', '153.112'), ('gv-IM-x-icu', 11, 10, 'i', -1, 'gv-IM', 'gv-IM', '153.112'), ('ha-x-icu', 11, 10, 'i', -1, 'ha', 'ha', '153.112.40'), ('ha-GH-x-icu', 11, 10, 'i', -1, 'ha-GH', 'ha-GH', '153.112.40'), ('ha-NE-x-icu', 11, 10, 'i', -1, 'ha-NE', 'ha-NE', '153.112.40'), ('ha-NG-x-icu', 11, 10, 'i', -1, 'ha-NG', 'ha-NG', '153.112.40'), ('haw-x-icu', 11, 10, 'i', -1, 'haw', 'haw', '153.112.40'), ('haw-US-x-icu', 11, 10, 'i', -1, 'haw-US', 'haw-US', '153.112.40'), ('he-x-icu', 11, 10, 'i', -1, 'he', 'he', '153.112.40'), ('he-IL-x-icu', 11, 10, 'i', -1, 'he-IL', 'he-IL', '153.112.40'), ('hi-x-icu', 11, 10, 'i', -1, 'hi', 'hi', '153.112.40'), ('hi-IN-x-icu', 11, 10, 'i', -1, 'hi-IN', 'hi-IN', '153.112.40'), ('hr-x-icu', 11, 10, 'i', -1, 'hr', 'hr', '153.112.40'), ('hr-BA-x-icu', 11, 10, 'i', -1, 'hr-BA', 'hr-BA', '153.112.40'), ('hr-HR-x-icu', 11, 10, 'i', -1, 'hr-HR', 'hr-HR', '153.112.40'), ('hsb-x-icu', 11, 10, 'i', -1, 'hsb', 'hsb', '153.112.40'), ('hsb-DE-x-icu', 11, 10, 'i', -1, 'hsb-DE', 'hsb-DE', '153.112.40'), ('hu-x-icu', 11, 10, 'i', -1, 'hu', 'hu', '153.112.40'), ('hu-HU-x-icu', 11, 10, 'i', -1, 'hu-HU', 'hu-HU', '153.112.40'), ('hy-x-icu', 11, 10, 'i', -1, 'hy', 'hy', '153.112.40'), ('hy-AM-x-icu', 11, 10, 'i', -1, 'hy-AM', 'hy-AM', '153.112.40'), ('ia-x-icu', 11, 10, 'i', -1, 'ia', 'ia', '153.112'), ('ia-001-x-icu', 11, 10, 'i', -1, 'ia-001', 'ia-001', '153.112'), ('id-x-icu', 11, 10, 'i', -1, 'id', 'id', '153.112'), ('id-ID-x-icu', 11, 10, 'i', -1, 'id-ID', 'id-ID', '153.112'), ('ig-x-icu', 11, 10, 'i', -1, 'ig', 'ig', '153.112.40'), ('ig-NG-x-icu', 11, 10, 'i', -1, 'ig-NG', 'ig-NG', '153.112.40'), ('ii-x-icu', 11, 10, 'i', -1, 'ii', 'ii', '153.112'), ('ii-CN-x-icu', 11, 10, 'i', -1, 'ii-CN', 'ii-CN', '153.112'), ('is-x-icu', 11, 10, 'i', -1, 'is', 'is', '153.112.40'), ('is-IS-x-icu', 11, 10, 'i', -1, 'is-IS', 'is-IS', '153.112.40'), ('it-x-icu', 11, 10, 'i', -1, 'it', 'it', '153.112'), ('it-CH-x-icu', 11, 10, 'i', -1, 'it-CH', 'it-CH', '153.112'), ('it-IT-x-icu', 11, 10, 'i', -1, 'it-IT', 'it-IT', '153.112'), ('it-SM-x-icu', 11, 10, 'i', -1, 'it-SM', 'it-SM', '153.112'), ('it-VA-x-icu', 11, 10, 'i', -1, 'it-VA', 'it-VA', '153.112'), ('ja-x-icu', 11, 10, 'i', -1, 'ja', 'ja', '153.112.40'), ('ja-JP-x-icu', 11, 10, 'i', -1, 'ja-JP', 'ja-JP', '153.112.40'), ('jgo-x-icu', 11, 10, 'i', -1, 'jgo', 'jgo', '153.112'), ('jgo-CM-x-icu', 11, 10, 'i', -1, 'jgo-CM', 'jgo-CM', '153.112'), ('jmc-x-icu', 11, 10, 'i', -1, 'jmc', 'jmc', '153.112'), ('jmc-TZ-x-icu', 11, 10, 'i', -1, 'jmc-TZ', 'jmc-TZ', '153.112'), ('jv-x-icu', 11, 10, 'i', -1, 'jv', 'jv', '153.112'), ('jv-ID-x-icu', 11, 10, 'i', -1, 'jv-ID', 'jv-ID', '153.112'), ('ka-x-icu', 11, 10, 'i', -1, 'ka', 'ka', '153.112.40'), ('ka-GE-x-icu', 11, 10, 'i', -1, 'ka-GE', 'ka-GE', '153.112.40'), ('kab-x-icu', 11, 10, 'i', -1, 'kab', 'kab', '153.112'), ('kab-DZ-x-icu', 11, 10, 'i', -1, 'kab-DZ', 'kab-DZ', '153.112'), ('kam-x-icu', 11, 10, 'i', -1, 'kam', 'kam', '153.112'), ('kam-KE-x-icu', 11, 10, 'i', -1, 'kam-KE', 'kam-KE', '153.112'), ('kde-x-icu', 11, 10, 'i', -1, 'kde', 'kde', '153.112'), ('kde-TZ-x-icu', 11, 10, 'i', -1, 'kde-TZ', 'kde-TZ', '153.112'), ('kea-x-icu', 11, 10, 'i', -1, 'kea', 'kea', '153.112'), ('kea-CV-x-icu', 11, 10, 'i', -1, 'kea-CV', 'kea-CV', '153.112'), ('khq-x-icu', 11, 10, 'i', -1, 'khq', 'khq', '153.112'), ('khq-ML-x-icu', 11, 10, 'i', -1, 'khq-ML', 'khq-ML', '153.112'), ('ki-x-icu', 11, 10, 'i', -1, 'ki', 'ki', '153.112'), ('ki-KE-x-icu', 11, 10, 'i', -1, 'ki-KE', 'ki-KE', '153.112'), ('kk-x-icu', 11, 10, 'i', -1, 'kk', 'kk', '153.112.40'), ('kk-KZ-x-icu', 11, 10, 'i', -1, 'kk-KZ', 'kk-KZ', '153.112.40'), ('kkj-x-icu', 11, 10, 'i', -1, 'kkj', 'kkj', '153.112'), ('kkj-CM-x-icu', 11, 10, 'i', -1, 'kkj-CM', 'kkj-CM', '153.112'), ('kl-x-icu', 11, 10, 'i', -1, 'kl', 'kl', '153.112.40'), ('kl-GL-x-icu', 11, 10, 'i', -1, 'kl-GL', 'kl-GL', '153.112.40'), ('kln-x-icu', 11, 10, 'i', -1, 'kln', 'kln', '153.112'), ('kln-KE-x-icu', 11, 10, 'i', -1, 'kln-KE', 'kln-KE', '153.112'), ('km-x-icu', 11, 10, 'i', -1, 'km', 'km', '153.112.40'), ('km-KH-x-icu', 11, 10, 'i', -1, 'km-KH', 'km-KH', '153.112.40'), ('kn-x-icu', 11, 10, 'i', -1, 'kn', 'kn', '153.112.40'), ('kn-IN-x-icu', 11, 10, 'i', -1, 'kn-IN', 'kn-IN', '153.112.40'), ('ko-x-icu', 11, 10, 'i', -1, 'ko', 'ko', '153.112.40'), ('ko-KP-x-icu', 11, 10, 'i', -1, 'ko-KP', 'ko-KP', '153.112.40'), ('ko-KR-x-icu', 11, 10, 'i', -1, 'ko-KR', 'ko-KR', '153.112.40'), ('kok-x-icu', 11, 10, 'i', -1, 'kok', 'kok', '153.112.40'), ('kok-IN-x-icu', 11, 10, 'i', -1, 'kok-IN', 'kok-IN', '153.112.40'), ('ks-x-icu', 11, 10, 'i', -1, 'ks', 'ks', '153.112'), ('ks-Arab-x-icu', 11, 10, 'i', -1, 'ks-Arab', 'ks-Arab', '153.112'), ('ks-Arab-IN-x-icu', 11, 10, 'i', -1, 'ks-Arab-IN', 'ks-Arab-IN', '153.112'), ('ksb-x-icu', 11, 10, 'i', -1, 'ksb', 'ksb', '153.112'), ('ksb-TZ-x-icu', 11, 10, 'i', -1, 'ksb-TZ', 'ksb-TZ', '153.112'), ('ksf-x-icu', 11, 10, 'i', -1, 'ksf', 'ksf', '153.112'), ('ksf-CM-x-icu', 11, 10, 'i', -1, 'ksf-CM', 'ksf-CM', '153.112'), ('ksh-x-icu', 11, 10, 'i', -1, 'ksh', 'ksh', '153.112'), ('ksh-DE-x-icu', 11, 10, 'i', -1, 'ksh-DE', 'ksh-DE', '153.112'), ('ku-x-icu', 11, 10, 'i', -1, 'ku', 'ku', '153.112.40'), ('ku-TR-x-icu', 11, 10, 'i', -1, 'ku-TR', 'ku-TR', '153.112.40'), ('kw-x-icu', 11, 10, 'i', -1, 'kw', 'kw', '153.112'), ('kw-GB-x-icu', 11, 10, 'i', -1, 'kw-GB', 'kw-GB', '153.112'), ('ky-x-icu', 11, 10, 'i', -1, 'ky', 'ky', '153.112.40'), ('ky-KG-x-icu', 11, 10, 'i', -1, 'ky-KG', 'ky-KG', '153.112.40'), ('lag-x-icu', 11, 10, 'i', -1, 'lag', 'lag', '153.112'), ('lag-TZ-x-icu', 11, 10, 'i', -1, 'lag-TZ', 'lag-TZ', '153.112'), ('lb-x-icu', 11, 10, 'i', -1, 'lb', 'lb', '153.112'), ('lb-LU-x-icu', 11, 10, 'i', -1, 'lb-LU', 'lb-LU', '153.112'), ('lg-x-icu', 11, 10, 'i', -1, 'lg', 'lg', '153.112'), ('lg-UG-x-icu', 11, 10, 'i', -1, 'lg-UG', 'lg-UG', '153.112'), ('lkt-x-icu', 11, 10, 'i', -1, 'lkt', 'lkt', '153.112.40'), ('lkt-US-x-icu', 11, 10, 'i', -1, 'lkt-US', 'lkt-US', '153.112.40'), ('ln-x-icu', 11, 10, 'i', -1, 'ln', 'ln', '153.112.40'), ('ln-AO-x-icu', 11, 10, 'i', -1, 'ln-AO', 'ln-AO', '153.112.40'), ('ln-CD-x-icu', 11, 10, 'i', -1, 'ln-CD', 'ln-CD', '153.112.40'), ('ln-CF-x-icu', 11, 10, 'i', -1, 'ln-CF', 'ln-CF', '153.112.40'), ('ln-CG-x-icu', 11, 10, 'i', -1, 'ln-CG', 'ln-CG', '153.112.40'), ('lo-x-icu', 11, 10, 'i', -1, 'lo', 'lo', '153.112.40'), ('lo-LA-x-icu', 11, 10, 'i', -1, 'lo-LA', 'lo-LA', '153.112.40'), ('lrc-x-icu', 11, 10, 'i', -1, 'lrc', 'lrc', '153.112'), ('lrc-IQ-x-icu', 11, 10, 'i', -1, 'lrc-IQ', 'lrc-IQ', '153.112'), ('lrc-IR-x-icu', 11, 10, 'i', -1, 'lrc-IR', 'lrc-IR', '153.112'), ('lt-x-icu', 11, 10, 'i', -1, 'lt', 'lt', '153.112.40'), ('lt-LT-x-icu', 11, 10, 'i', -1, 'lt-LT', 'lt-LT', '153.112.40'), ('lu-x-icu', 11, 10, 'i', -1, 'lu', 'lu', '153.112'), ('lu-CD-x-icu', 11, 10, 'i', -1, 'lu-CD', 'lu-CD', '153.112'), ('luo-x-icu', 11, 10, 'i', -1, 'luo', 'luo', '153.112'), ('luo-KE-x-icu', 11, 10, 'i', -1, 'luo-KE', 'luo-KE', '153.112'), ('luy-x-icu', 11, 10, 'i', -1, 'luy', 'luy', '153.112'), ('luy-KE-x-icu', 11, 10, 'i', -1, 'luy-KE', 'luy-KE', '153.112'), ('lv-x-icu', 11, 10, 'i', -1, 'lv', 'lv', '153.112.40'), ('lv-LV-x-icu', 11, 10, 'i', -1, 'lv-LV', 'lv-LV', '153.112.40'), ('mai-x-icu', 11, 10, 'i', -1, 'mai', 'mai', '153.112'), ('mai-IN-x-icu', 11, 10, 'i', -1, 'mai-IN', 'mai-IN', '153.112'), ('mas-x-icu', 11, 10, 'i', -1, 'mas', 'mas', '153.112'), ('mas-KE-x-icu', 11, 10, 'i', -1, 'mas-KE', 'mas-KE', '153.112'), ('mas-TZ-x-icu', 11, 10, 'i', -1, 'mas-TZ', 'mas-TZ', '153.112'), ('mer-x-icu', 11, 10, 'i', -1, 'mer', 'mer', '153.112'), ('mer-KE-x-icu', 11, 10, 'i', -1, 'mer-KE', 'mer-KE', '153.112'), ('mfe-x-icu', 11, 10, 'i', -1, 'mfe', 'mfe', '153.112'), ('mfe-MU-x-icu', 11, 10, 'i', -1, 'mfe-MU', 'mfe-MU', '153.112'), ('mg-x-icu', 11, 10, 'i', -1, 'mg', 'mg', '153.112'), ('mg-MG-x-icu', 11, 10, 'i', -1, 'mg-MG', 'mg-MG', '153.112'), ('mgh-x-icu', 11, 10, 'i', -1, 'mgh', 'mgh', '153.112'), ('mgh-MZ-x-icu', 11, 10, 'i', -1, 'mgh-MZ', 'mgh-MZ', '153.112'), ('mgo-x-icu', 11, 10, 'i', -1, 'mgo', 'mgo', '153.112'), ('mgo-CM-x-icu', 11, 10, 'i', -1, 'mgo-CM', 'mgo-CM', '153.112'), ('mi-x-icu', 11, 10, 'i', -1, 'mi', 'mi', '153.112'), ('mi-NZ-x-icu', 11, 10, 'i', -1, 'mi-NZ', 'mi-NZ', '153.112'), ('mk-x-icu', 11, 10, 'i', -1, 'mk', 'mk', '153.112.40'), ('mk-MK-x-icu', 11, 10, 'i', -1, 'mk-MK', 'mk-MK', '153.112.40'), ('ml-x-icu', 11, 10, 'i', -1, 'ml', 'ml', '153.112.40'), ('ml-IN-x-icu', 11, 10, 'i', -1, 'ml-IN', 'ml-IN', '153.112.40'), ('mn-x-icu', 11, 10, 'i', -1, 'mn', 'mn', '153.112.40'), ('mn-MN-x-icu', 11, 10, 'i', -1, 'mn-MN', 'mn-MN', '153.112.40'), ('mni-x-icu', 11, 10, 'i', -1, 'mni', 'mni', '153.112'), ('mni-Beng-x-icu', 11, 10, 'i', -1, 'mni-Beng', 'mni-Beng', '153.112'), ('mni-Beng-IN-x-icu', 11, 10, 'i', -1, 'mni-Beng-IN', 'mni-Beng-IN', '153.112'), ('mr-x-icu', 11, 10, 'i', -1, 'mr', 'mr', '153.112.40'), ('mr-IN-x-icu', 11, 10, 'i', -1, 'mr-IN', 'mr-IN', '153.112.40'), ('ms-x-icu', 11, 10, 'i', -1, 'ms', 'ms', '153.112'), ('ms-BN-x-icu', 11, 10, 'i', -1, 'ms-BN', 'ms-BN', '153.112'), ('ms-ID-x-icu', 11, 10, 'i', -1, 'ms-ID', 'ms-ID', '153.112'), ('ms-MY-x-icu', 11, 10, 'i', -1, 'ms-MY', 'ms-MY', '153.112'), ('ms-SG-x-icu', 11, 10, 'i', -1, 'ms-SG', 'ms-SG', '153.112'), ('mt-x-icu', 11, 10, 'i', -1, 'mt', 'mt', '153.112.40'), ('mt-MT-x-icu', 11, 10, 'i', -1, 'mt-MT', 'mt-MT', '153.112.40'), ('mua-x-icu', 11, 10, 'i', -1, 'mua', 'mua', '153.112'), ('mua-CM-x-icu', 11, 10, 'i', -1, 'mua-CM', 'mua-CM', '153.112'), ('my-x-icu', 11, 10, 'i', -1, 'my', 'my', '153.112.40'), ('my-MM-x-icu', 11, 10, 'i', -1, 'my-MM', 'my-MM', '153.112.40'), ('mzn-x-icu', 11, 10, 'i', -1, 'mzn', 'mzn', '153.112'), ('mzn-IR-x-icu', 11, 10, 'i', -1, 'mzn-IR', 'mzn-IR', '153.112'), ('naq-x-icu', 11, 10, 'i', -1, 'naq', 'naq', '153.112'), ('naq-NA-x-icu', 11, 10, 'i', -1, 'naq-NA', 'naq-NA', '153.112'), ('nb-x-icu', 11, 10, 'i', -1, 'nb', 'nb', '153.112.40'), ('nb-NO-x-icu', 11, 10, 'i', -1, 'nb-NO', 'nb-NO', '153.112.40'), ('nb-SJ-x-icu', 11, 10, 'i', -1, 'nb-SJ', 'nb-SJ', '153.112.40'), ('nd-x-icu', 11, 10, 'i', -1, 'nd', 'nd', '153.112'), ('nd-ZW-x-icu', 11, 10, 'i', -1, 'nd-ZW', 'nd-ZW', '153.112'), ('ne-x-icu', 11, 10, 'i', -1, 'ne', 'ne', '153.112.40'), ('ne-IN-x-icu', 11, 10, 'i', -1, 'ne-IN', 'ne-IN', '153.112.40'), ('ne-NP-x-icu', 11, 10, 'i', -1, 'ne-NP', 'ne-NP', '153.112.40'), ('nl-x-icu', 11, 10, 'i', -1, 'nl', 'nl', '153.112'), ('nl-AW-x-icu', 11, 10, 'i', -1, 'nl-AW', 'nl-AW', '153.112'), ('nl-BE-x-icu', 11, 10, 'i', -1, 'nl-BE', 'nl-BE', '153.112'), ('nl-BQ-x-icu', 11, 10, 'i', -1, 'nl-BQ', 'nl-BQ', '153.112'), ('nl-CW-x-icu', 11, 10, 'i', -1, 'nl-CW', 'nl-CW', '153.112'), ('nl-NL-x-icu', 11, 10, 'i', -1, 'nl-NL', 'nl-NL', '153.112'), ('nl-SR-x-icu', 11, 10, 'i', -1, 'nl-SR', 'nl-SR', '153.112'), ('nl-SX-x-icu', 11, 10, 'i', -1, 'nl-SX', 'nl-SX', '153.112'), ('nmg-x-icu', 11, 10, 'i', -1, 'nmg', 'nmg', '153.112'), ('nmg-CM-x-icu', 11, 10, 'i', -1, 'nmg-CM', 'nmg-CM', '153.112'), ('nn-x-icu', 11, 10, 'i', -1, 'nn', 'nn', '153.112.40'), ('nn-NO-x-icu', 11, 10, 'i', -1, 'nn-NO', 'nn-NO', '153.112.40'), ('nnh-x-icu', 11, 10, 'i', -1, 'nnh', 'nnh', '153.112'), ('nnh-CM-x-icu', 11, 10, 'i', -1, 'nnh-CM', 'nnh-CM', '153.112'), ('no-x-icu', 11, 10, 'i', -1, 'no', 'no', '153.112.40'), ('nus-x-icu', 11, 10, 'i', -1, 'nus', 'nus', '153.112'), ('nus-SS-x-icu', 11, 10, 'i', -1, 'nus-SS', 'nus-SS', '153.112'), ('nyn-x-icu', 11, 10, 'i', -1, 'nyn', 'nyn', '153.112'), ('nyn-UG-x-icu', 11, 10, 'i', -1, 'nyn-UG', 'nyn-UG', '153.112'), ('om-x-icu', 11, 10, 'i', -1, 'om', 'om', '153.112.40'), ('om-ET-x-icu', 11, 10, 'i', -1, 'om-ET', 'om-ET', '153.112.40'), ('om-KE-x-icu', 11, 10, 'i', -1, 'om-KE', 'om-KE', '153.112.40'), ('or-x-icu', 11, 10, 'i', -1, 'or', 'or', '153.112.40'), ('or-IN-x-icu', 11, 10, 'i', -1, 'or-IN', 'or-IN', '153.112.40'), ('os-x-icu', 11, 10, 'i', -1, 'os', 'os', '153.112'), ('os-GE-x-icu', 11, 10, 'i', -1, 'os-GE', 'os-GE', '153.112'), ('os-RU-x-icu', 11, 10, 'i', -1, 'os-RU', 'os-RU', '153.112'), ('pa-x-icu', 11, 10, 'i', -1, 'pa', 'pa', '153.112.40'), ('pa-Arab-x-icu', 11, 10, 'i', -1, 'pa-Arab', 'pa-Arab', '153.112.40'), ('pa-Arab-PK-x-icu', 11, 10, 'i', -1, 'pa-Arab-PK', 'pa-Arab-PK', '153.112.40'), ('pa-Guru-x-icu', 11, 10, 'i', -1, 'pa-Guru', 'pa-Guru', '153.112.40'), ('pa-Guru-IN-x-icu', 11, 10, 'i', -1, 'pa-Guru-IN', 'pa-Guru-IN', '153.112.40'), ('pcm-x-icu', 11, 10, 'i', -1, 'pcm', 'pcm', '153.112'), ('pcm-NG-x-icu', 11, 10, 'i', -1, 'pcm-NG', 'pcm-NG', '153.112'), ('pl-x-icu', 11, 10, 'i', -1, 'pl', 'pl', '153.112.40'), ('pl-PL-x-icu', 11, 10, 'i', -1, 'pl-PL', 'pl-PL', '153.112.40'), ('ps-x-icu', 11, 10, 'i', -1, 'ps', 'ps', '153.112.40'), ('ps-AF-x-icu', 11, 10, 'i', -1, 'ps-AF', 'ps-AF', '153.112.40'), ('ps-PK-x-icu', 11, 10, 'i', -1, 'ps-PK', 'ps-PK', '153.112.40'), ('pt-x-icu', 11, 10, 'i', -1, 'pt', 'pt', '153.112'), ('pt-AO-x-icu', 11, 10, 'i', -1, 'pt-AO', 'pt-AO', '153.112'), ('pt-BR-x-icu', 11, 10, 'i', -1, 'pt-BR', 'pt-BR', '153.112'), ('pt-CH-x-icu', 11, 10, 'i', -1, 'pt-CH', 'pt-CH', '153.112'), ('pt-CV-x-icu', 11, 10, 'i', -1, 'pt-CV', 'pt-CV', '153.112'), ('pt-GQ-x-icu', 11, 10, 'i', -1, 'pt-GQ', 'pt-GQ', '153.112'), ('pt-GW-x-icu', 11, 10, 'i', -1, 'pt-GW', 'pt-GW', '153.112'), ('pt-LU-x-icu', 11, 10, 'i', -1, 'pt-LU', 'pt-LU', '153.112'), ('pt-MO-x-icu', 11, 10, 'i', -1, 'pt-MO', 'pt-MO', '153.112'), ('pt-MZ-x-icu', 11, 10, 'i', -1, 'pt-MZ', 'pt-MZ', '153.112'), ('pt-PT-x-icu', 11, 10, 'i', -1, 'pt-PT', 'pt-PT', '153.112'), ('pt-ST-x-icu', 11, 10, 'i', -1, 'pt-ST', 'pt-ST', '153.112'), ('pt-TL-x-icu', 11, 10, 'i', -1, 'pt-TL', 'pt-TL', '153.112'), ('qu-x-icu', 11, 10, 'i', -1, 'qu', 'qu', '153.112'), ('qu-BO-x-icu', 11, 10, 'i', -1, 'qu-BO', 'qu-BO', '153.112'), ('qu-EC-x-icu', 11, 10, 'i', -1, 'qu-EC', 'qu-EC', '153.112'), ('qu-PE-x-icu', 11, 10, 'i', -1, 'qu-PE', 'qu-PE', '153.112'), ('rm-x-icu', 11, 10, 'i', -1, 'rm', 'rm', '153.112'), ('rm-CH-x-icu', 11, 10, 'i', -1, 'rm-CH', 'rm-CH', '153.112'), ('rn-x-icu', 11, 10, 'i', -1, 'rn', 'rn', '153.112'), ('rn-BI-x-icu', 11, 10, 'i', -1, 'rn-BI', 'rn-BI', '153.112'), ('ro-x-icu', 11, 10, 'i', -1, 'ro', 'ro', '153.112.40'), ('ro-MD-x-icu', 11, 10, 'i', -1, 'ro-MD', 'ro-MD', '153.112.40'), ('ro-RO-x-icu', 11, 10, 'i', -1, 'ro-RO', 'ro-RO', '153.112.40'), ('rof-x-icu', 11, 10, 'i', -1, 'rof', 'rof', '153.112'), ('rof-TZ-x-icu', 11, 10, 'i', -1, 'rof-TZ', 'rof-TZ', '153.112'), ('ru-x-icu', 11, 10, 'i', -1, 'ru', 'ru', '153.112.40'), ('ru-BY-x-icu', 11, 10, 'i', -1, 'ru-BY', 'ru-BY', '153.112.40'), ('ru-KG-x-icu', 11, 10, 'i', -1, 'ru-KG', 'ru-KG', '153.112.40'), ('ru-KZ-x-icu', 11, 10, 'i', -1, 'ru-KZ', 'ru-KZ', '153.112.40'), ('ru-MD-x-icu', 11, 10, 'i', -1, 'ru-MD', 'ru-MD', '153.112.40'), ('ru-RU-x-icu', 11, 10, 'i', -1, 'ru-RU', 'ru-RU', '153.112.40'), ('ru-UA-x-icu', 11, 10, 'i', -1, 'ru-UA', 'ru-UA', '153.112.40'), ('rw-x-icu', 11, 10, 'i', -1, 'rw', 'rw', '153.112'), ('rw-RW-x-icu', 11, 10, 'i', -1, 'rw-RW', 'rw-RW', '153.112'), ('rwk-x-icu', 11, 10, 'i', -1, 'rwk', 'rwk', '153.112'), ('rwk-TZ-x-icu', 11, 10, 'i', -1, 'rwk-TZ', 'rwk-TZ', '153.112'), ('sa-x-icu', 11, 10, 'i', -1, 'sa', 'sa', '153.112'), ('sa-IN-x-icu', 11, 10, 'i', -1, 'sa-IN', 'sa-IN', '153.112'), ('sah-x-icu', 11, 10, 'i', -1, 'sah', 'sah', '153.112'), ('sah-RU-x-icu', 11, 10, 'i', -1, 'sah-RU', 'sah-RU', '153.112'), ('saq-x-icu', 11, 10, 'i', -1, 'saq', 'saq', '153.112'), ('saq-KE-x-icu', 11, 10, 'i', -1, 'saq-KE', 'saq-KE', '153.112'), ('sat-x-icu', 11, 10, 'i', -1, 'sat', 'sat', '153.112'), ('sat-Olck-x-icu', 11, 10, 'i', -1, 'sat-Olck', 'sat-Olck', '153.112'), ('sat-Olck-IN-x-icu', 11, 10, 'i', -1, 'sat-Olck-IN', 'sat-Olck-IN', '153.112'), ('sbp-x-icu', 11, 10, 'i', -1, 'sbp', 'sbp', '153.112'), ('sbp-TZ-x-icu', 11, 10, 'i', -1, 'sbp-TZ', 'sbp-TZ', '153.112'), ('sc-x-icu', 11, 10, 'i', -1, 'sc', 'sc', '153.112'), ('sc-IT-x-icu', 11, 10, 'i', -1, 'sc-IT', 'sc-IT', '153.112'), ('sd-x-icu', 11, 10, 'i', -1, 'sd', 'sd', '153.112'), ('sd-Arab-x-icu', 11, 10, 'i', -1, 'sd-Arab', 'sd-Arab', '153.112'), ('sd-Arab-PK-x-icu', 11, 10, 'i', -1, 'sd-Arab-PK', 'sd-Arab-PK', '153.112'), ('sd-Deva-x-icu', 11, 10, 'i', -1, 'sd-Deva', 'sd-Deva', '153.112'), ('sd-Deva-IN-x-icu', 11, 10, 'i', -1, 'sd-Deva-IN', 'sd-Deva-IN', '153.112'), ('se-x-icu', 11, 10, 'i', -1, 'se', 'se', '153.112.40'), ('se-FI-x-icu', 11, 10, 'i', -1, 'se-FI', 'se-FI', '153.112.40'), ('se-NO-x-icu', 11, 10, 'i', -1, 'se-NO', 'se-NO', '153.112.40'), ('se-SE-x-icu', 11, 10, 'i', -1, 'se-SE', 'se-SE', '153.112.40'), ('seh-x-icu', 11, 10, 'i', -1, 'seh', 'seh', '153.112'), ('seh-MZ-x-icu', 11, 10, 'i', -1, 'seh-MZ', 'seh-MZ', '153.112'), ('ses-x-icu', 11, 10, 'i', -1, 'ses', 'ses', '153.112'), ('ses-ML-x-icu', 11, 10, 'i', -1, 'ses-ML', 'ses-ML', '153.112'), ('sg-x-icu', 11, 10, 'i', -1, 'sg', 'sg', '153.112'), ('sg-CF-x-icu', 11, 10, 'i', -1, 'sg-CF', 'sg-CF', '153.112'), ('shi-x-icu', 11, 10, 'i', -1, 'shi', 'shi', '153.112'), ('shi-Latn-x-icu', 11, 10, 'i', -1, 'shi-Latn', 'shi-Latn', '153.112'), ('shi-Latn-MA-x-icu', 11, 10, 'i', -1, 'shi-Latn-MA', 'shi-Latn-MA', '153.112'), ('shi-Tfng-x-icu', 11, 10, 'i', -1, 'shi-Tfng', 'shi-Tfng', '153.112'), ('shi-Tfng-MA-x-icu', 11, 10, 'i', -1, 'shi-Tfng-MA', 'shi-Tfng-MA', '153.112'), ('si-x-icu', 11, 10, 'i', -1, 'si', 'si', '153.112.40'), ('si-LK-x-icu', 11, 10, 'i', -1, 'si-LK', 'si-LK', '153.112.40'), ('sk-x-icu', 11, 10, 'i', -1, 'sk', 'sk', '153.112.40'), ('sk-SK-x-icu', 11, 10, 'i', -1, 'sk-SK', 'sk-SK', '153.112.40'), ('sl-x-icu', 11, 10, 'i', -1, 'sl', 'sl', '153.112.40'), ('sl-SI-x-icu', 11, 10, 'i', -1, 'sl-SI', 'sl-SI', '153.112.40'), ('smn-x-icu', 11, 10, 'i', -1, 'smn', 'smn', '153.112.40'), ('smn-FI-x-icu', 11, 10, 'i', -1, 'smn-FI', 'smn-FI', '153.112.40'), ('sn-x-icu', 11, 10, 'i', -1, 'sn', 'sn', '153.112'), ('sn-ZW-x-icu', 11, 10, 'i', -1, 'sn-ZW', 'sn-ZW', '153.112'), ('so-x-icu', 11, 10, 'i', -1, 'so', 'so', '153.112'), ('so-DJ-x-icu', 11, 10, 'i', -1, 'so-DJ', 'so-DJ', '153.112'), ('so-ET-x-icu', 11, 10, 'i', -1, 'so-ET', 'so-ET', '153.112'), ('so-KE-x-icu', 11, 10, 'i', -1, 'so-KE', 'so-KE', '153.112'), ('so-SO-x-icu', 11, 10, 'i', -1, 'so-SO', 'so-SO', '153.112'), ('sq-x-icu', 11, 10, 'i', -1, 'sq', 'sq', '153.112.40'), ('sq-AL-x-icu', 11, 10, 'i', -1, 'sq-AL', 'sq-AL', '153.112.40'), ('sq-MK-x-icu', 11, 10, 'i', -1, 'sq-MK', 'sq-MK', '153.112.40'), ('sq-XK-x-icu', 11, 10, 'i', -1, 'sq-XK', 'sq-XK', '153.112.40'), ('sr-x-icu', 11, 10, 'i', -1, 'sr', 'sr', '153.112.40'), ('sr-Cyrl-x-icu', 11, 10, 'i', -1, 'sr-Cyrl', 'sr-Cyrl', '153.112.40'), ('sr-Cyrl-BA-x-icu', 11, 10, 'i', -1, 'sr-Cyrl-BA', 'sr-Cyrl-BA', '153.112.40'), ('sr-Cyrl-ME-x-icu', 11, 10, 'i', -1, 'sr-Cyrl-ME', 'sr-Cyrl-ME', '153.112.40'), ('sr-Cyrl-RS-x-icu', 11, 10, 'i', -1, 'sr-Cyrl-RS', 'sr-Cyrl-RS', '153.112.40'), ('sr-Cyrl-XK-x-icu', 11, 10, 'i', -1, 'sr-Cyrl-XK', 'sr-Cyrl-XK', '153.112.40'), ('sr-Latn-x-icu', 11, 10, 'i', -1, 'sr-Latn', 'sr-Latn', '153.112.40'), ('sr-Latn-BA-x-icu', 11, 10, 'i', -1, 'sr-Latn-BA', 'sr-Latn-BA', '153.112.40'), ('sr-Latn-ME-x-icu', 11, 10, 'i', -1, 'sr-Latn-ME', 'sr-Latn-ME', '153.112.40'), ('sr-Latn-RS-x-icu', 11, 10, 'i', -1, 'sr-Latn-RS', 'sr-Latn-RS', '153.112.40'), ('sr-Latn-XK-x-icu', 11, 10, 'i', -1, 'sr-Latn-XK', 'sr-Latn-XK', '153.112.40'), ('su-x-icu', 11, 10, 'i', -1, 'su', 'su', '153.112'), ('su-Latn-x-icu', 11, 10, 'i', -1, 'su-Latn', 'su-Latn', '153.112'), ('su-Latn-ID-x-icu', 11, 10, 'i', -1, 'su-Latn-ID', 'su-Latn-ID', '153.112'), ('sv-x-icu', 11, 10, 'i', -1, 'sv', 'sv', '153.112.40'), ('sv-AX-x-icu', 11, 10, 'i', -1, 'sv-AX', 'sv-AX', '153.112.40'), ('sv-FI-x-icu', 11, 10, 'i', -1, 'sv-FI', 'sv-FI', '153.112.40'), ('sv-SE-x-icu', 11, 10, 'i', -1, 'sv-SE', 'sv-SE', '153.112.40'), ('sw-x-icu', 11, 10, 'i', -1, 'sw', 'sw', '153.112'), ('sw-CD-x-icu', 11, 10, 'i', -1, 'sw-CD', 'sw-CD', '153.112'), ('sw-KE-x-icu', 11, 10, 'i', -1, 'sw-KE', 'sw-KE', '153.112'), ('sw-TZ-x-icu', 11, 10, 'i', -1, 'sw-TZ', 'sw-TZ', '153.112'), ('sw-UG-x-icu', 11, 10, 'i', -1, 'sw-UG', 'sw-UG', '153.112'), ('ta-x-icu', 11, 10, 'i', -1, 'ta', 'ta', '153.112.40'), ('ta-IN-x-icu', 11, 10, 'i', -1, 'ta-IN', 'ta-IN', '153.112.40'), ('ta-LK-x-icu', 11, 10, 'i', -1, 'ta-LK', 'ta-LK', '153.112.40'), ('ta-MY-x-icu', 11, 10, 'i', -1, 'ta-MY', 'ta-MY', '153.112.40'), ('ta-SG-x-icu', 11, 10, 'i', -1, 'ta-SG', 'ta-SG', '153.112.40'), ('te-x-icu', 11, 10, 'i', -1, 'te', 'te', '153.112.40'), ('te-IN-x-icu', 11, 10, 'i', -1, 'te-IN', 'te-IN', '153.112.40'), ('teo-x-icu', 11, 10, 'i', -1, 'teo', 'teo', '153.112'), ('teo-KE-x-icu', 11, 10, 'i', -1, 'teo-KE', 'teo-KE', '153.112'), ('teo-UG-x-icu', 11, 10, 'i', -1, 'teo-UG', 'teo-UG', '153.112'), ('tg-x-icu', 11, 10, 'i', -1, 'tg', 'tg', '153.112'), ('tg-TJ-x-icu', 11, 10, 'i', -1, 'tg-TJ', 'tg-TJ', '153.112'), ('th-x-icu', 11, 10, 'i', -1, 'th', 'th', '153.112.40'), ('th-TH-x-icu', 11, 10, 'i', -1, 'th-TH', 'th-TH', '153.112.40'), ('ti-x-icu', 11, 10, 'i', -1, 'ti', 'ti', '153.112'), ('ti-ER-x-icu', 11, 10, 'i', -1, 'ti-ER', 'ti-ER', '153.112'), ('ti-ET-x-icu', 11, 10, 'i', -1, 'ti-ET', 'ti-ET', '153.112'), ('tk-x-icu', 11, 10, 'i', -1, 'tk', 'tk', '153.112.40'), ('tk-TM-x-icu', 11, 10, 'i', -1, 'tk-TM', 'tk-TM', '153.112.40'), ('to-x-icu', 11, 10, 'i', -1, 'to', 'to', '153.112.40'), ('to-TO-x-icu', 11, 10, 'i', -1, 'to-TO', 'to-TO', '153.112.40'), ('tr-x-icu', 11, 10, 'i', -1, 'tr', 'tr', '153.112.40'), ('tr-CY-x-icu', 11, 10, 'i', -1, 'tr-CY', 'tr-CY', '153.112.40'), ('tr-TR-x-icu', 11, 10, 'i', -1, 'tr-TR', 'tr-TR', '153.112.40'), ('tt-x-icu', 11, 10, 'i', -1, 'tt', 'tt', '153.112'), ('tt-RU-x-icu', 11, 10, 'i', -1, 'tt-RU', 'tt-RU', '153.112'), ('twq-x-icu', 11, 10, 'i', -1, 'twq', 'twq', '153.112'), ('twq-NE-x-icu', 11, 10, 'i', -1, 'twq-NE', 'twq-NE', '153.112'), ('tzm-x-icu', 11, 10, 'i', -1, 'tzm', 'tzm', '153.112'), ('tzm-MA-x-icu', 11, 10, 'i', -1, 'tzm-MA', 'tzm-MA', '153.112'), ('ug-x-icu', 11, 10, 'i', -1, 'ug', 'ug', '153.112.40'), ('ug-CN-x-icu', 11, 10, 'i', -1, 'ug-CN', 'ug-CN', '153.112.40'), ('uk-x-icu', 11, 10, 'i', -1, 'uk', 'uk', '153.112.40'), ('uk-UA-x-icu', 11, 10, 'i', -1, 'uk-UA', 'uk-UA', '153.112.40'), ('ur-x-icu', 11, 10, 'i', -1, 'ur', 'ur', '153.112.40'), ('ur-IN-x-icu', 11, 10, 'i', -1, 'ur-IN', 'ur-IN', '153.112.40'), ('ur-PK-x-icu', 11, 10, 'i', -1, 'ur-PK', 'ur-PK', '153.112.40'), ('uz-x-icu', 11, 10, 'i', -1, 'uz', 'uz', '153.112.40'), ('uz-Arab-x-icu', 11, 10, 'i', -1, 'uz-Arab', 'uz-Arab', '153.112.40'), ('uz-Arab-AF-x-icu', 11, 10, 'i', -1, 'uz-Arab-AF', 'uz-Arab-AF', '153.112.40'), ('uz-Cyrl-x-icu', 11, 10, 'i', -1, 'uz-Cyrl', 'uz-Cyrl', '153.112.40'), ('uz-Cyrl-UZ-x-icu', 11, 10, 'i', -1, 'uz-Cyrl-UZ', 'uz-Cyrl-UZ', '153.112.40'), ('uz-Latn-x-icu', 11, 10, 'i', -1, 'uz-Latn', 'uz-Latn', '153.112.40'), ('uz-Latn-UZ-x-icu', 11, 10, 'i', -1, 'uz-Latn-UZ', 'uz-Latn-UZ', '153.112.40'), ('vai-x-icu', 11, 10, 'i', -1, 'vai', 'vai', '153.112'), ('vai-Latn-x-icu', 11, 10, 'i', -1, 'vai-Latn', 'vai-Latn', '153.112'), ('vai-Latn-LR-x-icu', 11, 10, 'i', -1, 'vai-Latn-LR', 'vai-Latn-LR', '153.112'), ('vai-Vaii-x-icu', 11, 10, 'i', -1, 'vai-Vaii', 'vai-Vaii', '153.112'), ('vai-Vaii-LR-x-icu', 11, 10, 'i', -1, 'vai-Vaii-LR', 'vai-Vaii-LR', '153.112'), ('vi-x-icu', 11, 10, 'i', -1, 'vi', 'vi', '153.112.40'), ('vi-VN-x-icu', 11, 10, 'i', -1, 'vi-VN', 'vi-VN', '153.112.40'), ('vun-x-icu', 11, 10, 'i', -1, 'vun', 'vun', '153.112'), ('vun-TZ-x-icu', 11, 10, 'i', -1, 'vun-TZ', 'vun-TZ', '153.112'), ('wae-x-icu', 11, 10, 'i', -1, 'wae', 'wae', '153.112'), ('wae-CH-x-icu', 11, 10, 'i', -1, 'wae-CH', 'wae-CH', '153.112'), ('wo-x-icu', 11, 10, 'i', -1, 'wo', 'wo', '153.112.40'), ('wo-SN-x-icu', 11, 10, 'i', -1, 'wo-SN', 'wo-SN', '153.112.40'), ('xh-x-icu', 11, 10, 'i', -1, 'xh', 'xh', '153.112'), ('xh-ZA-x-icu', 11, 10, 'i', -1, 'xh-ZA', 'xh-ZA', '153.112'), ('xog-x-icu', 11, 10, 'i', -1, 'xog', 'xog', '153.112'), ('xog-UG-x-icu', 11, 10, 'i', -1, 'xog-UG', 'xog-UG', '153.112'), ('yav-x-icu', 11, 10, 'i', -1, 'yav', 'yav', '153.112'), ('yav-CM-x-icu', 11, 10, 'i', -1, 'yav-CM', 'yav-CM', '153.112'), ('yi-x-icu', 11, 10, 'i', -1, 'yi', 'yi', '153.112.40'), ('yi-001-x-icu', 11, 10, 'i', -1, 'yi-001', 'yi-001', '153.112.40'), ('yo-x-icu', 11, 10, 'i', -1, 'yo', 'yo', '153.112.40'), ('yo-BJ-x-icu', 11, 10, 'i', -1, 'yo-BJ', 'yo-BJ', '153.112.40'), ('yo-NG-x-icu', 11, 10, 'i', -1, 'yo-NG', 'yo-NG', '153.112.40'), ('yue-x-icu', 11, 10, 'i', -1, 'yue', 'yue', '153.112.40'), ('yue-Hans-x-icu', 11, 10, 'i', -1, 'yue-Hans', 'yue-Hans', '153.112.40'), ('yue-Hans-CN-x-icu', 11, 10, 'i', -1, 'yue-Hans-CN', 'yue-Hans-CN', '153.112.40'), ('yue-Hant-x-icu', 11, 10, 'i', -1, 'yue-Hant', 'yue-Hant', '153.112.40'), ('yue-Hant-HK-x-icu', 11, 10, 'i', -1, 'yue-Hant-HK', 'yue-Hant-HK', '153.112.40'), ('zgh-x-icu', 11, 10, 'i', -1, 'zgh', 'zgh', '153.112'), ('zgh-MA-x-icu', 11, 10, 'i', -1, 'zgh-MA', 'zgh-MA', '153.112'), ('zh-x-icu', 11, 10, 'i', -1, 'zh', 'zh', '153.112.40'), ('zh-Hans-x-icu', 11, 10, 'i', -1, 'zh-Hans', 'zh-Hans', '153.112.40'), ('zh-Hans-CN-x-icu', 11, 10, 'i', -1, 'zh-Hans-CN', 'zh-Hans-CN', '153.112.40'), ('zh-Hans-HK-x-icu', 11, 10, 'i', -1, 'zh-Hans-HK', 'zh-Hans-HK', '153.112.40'), ('zh-Hans-MO-x-icu', 11, 10, 'i', -1, 'zh-Hans-MO', 'zh-Hans-MO', '153.112.40'), ('zh-Hans-SG-x-icu', 11, 10, 'i', -1, 'zh-Hans-SG', 'zh-Hans-SG', '153.112.40'), ('zh-Hant-x-icu', 11, 10, 'i', -1, 'zh-Hant', 'zh-Hant', '153.112.40'), ('zh-Hant-HK-x-icu', 11, 10, 'i', -1, 'zh-Hant-HK', 'zh-Hant-HK', '153.112.40'), ('zh-Hant-MO-x-icu', 11, 10, 'i', -1, 'zh-Hant-MO', 'zh-Hant-MO', '153.112.40'), ('zh-Hant-TW-x-icu', 11, 10, 'i', -1, 'zh-Hant-TW', 'zh-Hant-TW', '153.112.40'), ('zu-x-icu', 11, 10, 'i', -1, 'zu', 'zu', '153.112'), ('zu-ZA-x-icu', 11, 10, 'i', -1, 'zu-ZA', 'zu-ZA', '153.112') ) AS updated_values ( collname, collnamespace, collowner, collprovider, collencoding, collcollate, collctype, collversion ) WHERE pg_catalog.pg_collation.collname = updated_values.collname AND pg_catalog.pg_collation.collencoding = updated_values.collencoding AND pg_catalog.pg_collation.collnamespace = updated_values.collnamespace; -- Insert new collations. WITH descr_insert_oids(pg_coll_oid) AS ( INSERT INTO pg_catalog.pg_collation ( collname, collnamespace, collowner, collprovider, collencoding, collcollate, collctype, collversion ) VALUES ('doi-x-icu', 11, 10, 'i', -1, 'doi', 'doi', '153.112'), ('doi-IN-x-icu', 11, 10, 'i', -1, 'doi-IN', 'doi-IN', '153.112'), ('no-x-icu', 11, 10, 'i', -1, 'no', 'no', '153.112.40'), ('sa-x-icu', 11, 10, 'i', -1, 'sa', 'sa', '153.112'), ('sa-IN-x-icu', 11, 10, 'i', -1, 'sa-IN', 'sa-IN', '153.112'), ('sc-x-icu', 11, 10, 'i', -1, 'sc', 'sc', '153.112'), ('sc-IT-x-icu', 11, 10, 'i', -1, 'sc-IT', 'sc-IT', '153.112') RETURNING oid ), tmp_descr (row_number, description) AS ( -- Some collations do not have a matching description. We need to correctly match -- a collation with its corresponding description. Use row_number to track the collation -- list order. VALUES (1, 'Dogri'), (2, 'Dogri (India)'), (3, 'Norwegian'), (4, 'Sanskrit'), (5, 'Sanskrit (India)'), (6, 'Sardinian'), (7, 'Sardinian (Italy)') ) -- Populate pg_description table using the auto-generated OIDs for newly inserted collations. -- Use collation list order as the link to properly match collations with descriptions. INSERT INTO pg_catalog.pg_description ( objoid, classoid, objsubid, description ) SELECT o.pg_coll_oid, 'pg_collation'::regclass, 0, d.description FROM ( SELECT ROW_NUMBER() OVER (ORDER BY pg_coll_oid) AS row_number, pg_coll_oid FROM descr_insert_oids ) o INNER JOIN tmp_descr d ON o.row_number = d.row_number; END IF; END $$;
the_stack
* SetupSamples.sql * Creates users and populates their schemas with the tables and packages * necessary for the cx_Oracle samples. An edition is also created for the * demonstration of PL/SQL editioning. * * Run this like: * sqlplus / as sysdba @SetupSamples * * Note that the script SampleEnv.sql should be modified if you would like to * use something other than the default configuration. *---------------------------------------------------------------------------*/ whenever sqlerror exit failure -- drop existing users and edition, if applicable @@DropSamples.sql alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS'; alter session set nls_numeric_characters='.,'; create user &main_user identified by &main_password quota unlimited on users default tablespace users; grant create session, create table, create procedure, create type, select any dictionary, change notification to &main_user; grant execute on dbms_aqadm to &main_user; grant execute on dbms_lock to &main_user; create user &edition_user identified by &edition_password; grant create session, create procedure to &edition_user; alter user &edition_user enable editions; create edition &edition_name; grant use on edition &edition_name to &edition_user; -- create types create type &main_user..udt_SubObject as object ( SubNumberValue number, SubStringValue varchar2(60) ); / create or replace type &main_user..udt_Building as object ( BuildingId number(9), NumFloors number(3), Description varchar2(60), DateBuilt date ); / create or replace type &main_user..udt_Book as object ( Title varchar2(100), Authors varchar2(100), Price number(5,2) ); / -- create tables create table &main_user..TestNumbers ( IntCol number(9) not null, NumberCol number(9, 2) not null, FloatCol float not null, UnconstrainedCol number not null, NullableCol number(38) ); create table &main_user..TestStrings ( IntCol number(9) not null, StringCol varchar2(20) not null, RawCol raw(30) not null, FixedCharCol char(40) not null, NullableCol varchar2(50) ); create table &main_user..TestCLOBs ( IntCol number(9) not null, CLOBCol clob not null ); create table &main_user..TestBLOBs ( IntCol number(9) not null, BLOBCol blob not null ); create table &main_user..TestTempTable ( IntCol number(9) not null, StringCol varchar2(400), constraint TestTempTable_pk primary key (IntCol) ); create table &main_user..TestUniversalRowids ( IntCol number(9) not null, StringCol varchar2(250) not null, DateCol date not null, constraint TestUniversalRowids_pk primary key (IntCol, StringCol, DateCol) ) organization index; create table &main_user..TestBuildings ( BuildingId number(9) not null, BuildingObj &main_user..udt_Building not null ); create table &main_user..BigTab ( mycol varchar2(20) ); create table &main_user..SampleQueryTab ( id number not null, name varchar2(20) not null ); create table &main_user..MyTab ( id number, data varchar2(20) ); create table &main_user..ParentTable ( ParentId number(9) not null, Description varchar2(60) not null, constraint ParentTable_pk primary key (ParentId) ); create table &main_user..ChildTable ( ChildId number(9) not null, ParentId number(9) not null, Description varchar2(60) not null, constraint ChildTable_pk primary key (ChildId), constraint ChildTable_fk foreign key (ParentId) references &main_user..ParentTable ); create table &main_user..Ptab ( myid number, mydata varchar(20) ); -- create queue table and queues for demonstrating advanced queuing begin dbms_aqadm.create_queue_table('&main_user..BOOK_QUEUE', '&main_user..UDT_BOOK'); dbms_aqadm.create_queue('&main_user..BOOKS', '&main_user..BOOK_QUEUE'); dbms_aqadm.start_queue('&main_user..BOOKS'); end; / -- populate tables begin for i in 1..20000 loop insert into &main_user..BigTab (mycol) values (dbms_random.string('A',20)); end loop; end; / begin for i in 1..10 loop insert into &main_user..TestNumbers values (i, i + i * 0.25, i + i * .75, i * i * i + i *.5, decode(mod(i, 2), 0, null, power(143, i))); end loop; end; / declare t_RawValue raw(30); function ConvertHexDigit(a_Value number) return varchar2 is begin if a_Value between 0 and 9 then return to_char(a_Value); end if; return chr(ascii('A') + a_Value - 10); end; function ConvertToHex(a_Value varchar2) return varchar2 is t_HexValue varchar2(60); t_Digit number; begin for i in 1..length(a_Value) loop t_Digit := ascii(substr(a_Value, i, 1)); t_HexValue := t_HexValue || ConvertHexDigit(trunc(t_Digit / 16)) || ConvertHexDigit(mod(t_Digit, 16)); end loop; return t_HexValue; end; begin for i in 1..10 loop t_RawValue := hextoraw(ConvertToHex('Raw ' || to_char(i))); insert into &main_user..TestStrings values (i, 'String ' || to_char(i), t_RawValue, 'Fixed Char ' || to_char(i), decode(mod(i, 2), 0, null, 'Nullable ' || to_char(i))); end loop; end; / insert into &main_user..ParentTable values (10, 'Parent 10'); insert into &main_user..ParentTable values (20, 'Parent 20'); insert into &main_user..ParentTable values (30, 'Parent 30'); insert into &main_user..ParentTable values (40, 'Parent 40'); insert into &main_user..ParentTable values (50, 'Parent 50'); insert into &main_user..ChildTable values (1001, 10, 'Child A of Parent 10'); insert into &main_user..ChildTable values (1002, 20, 'Child A of Parent 20'); insert into &main_user..ChildTable values (1003, 20, 'Child B of Parent 20'); insert into &main_user..ChildTable values (1004, 20, 'Child C of Parent 20'); insert into &main_user..ChildTable values (1005, 30, 'Child A of Parent 30'); insert into &main_user..ChildTable values (1006, 30, 'Child B of Parent 30'); insert into &main_user..ChildTable values (1007, 40, 'Child A of Parent 40'); insert into &main_user..ChildTable values (1008, 40, 'Child B of Parent 40'); insert into &main_user..ChildTable values (1009, 40, 'Child C of Parent 40'); insert into &main_user..ChildTable values (1010, 40, 'Child D of Parent 40'); insert into &main_user..ChildTable values (1011, 40, 'Child E of Parent 40'); insert into &main_user..ChildTable values (1012, 50, 'Child A of Parent 50'); insert into &main_user..ChildTable values (1013, 50, 'Child B of Parent 50'); insert into &main_user..ChildTable values (1014, 50, 'Child C of Parent 50'); insert into &main_user..ChildTable values (1015, 50, 'Child D of Parent 50'); insert into &main_user..SampleQueryTab values (1, 'Anthony'); insert into &main_user..SampleQueryTab values (2, 'Barbie'); insert into &main_user..SampleQueryTab values (3, 'Chris'); insert into &main_user..SampleQueryTab values (4, 'Dazza'); insert into &main_user..SampleQueryTab values (5, 'Erin'); insert into &main_user..SampleQueryTab values (6, 'Frankie'); insert into &main_user..SampleQueryTab values (7, 'Gerri'); commit; -- -- For PL/SQL Examples -- create or replace function &main_user..myfunc ( a_Data varchar2, a_Id number ) return number as begin insert into &main_user..ptab (mydata, myid) values (a_Data, a_Id); return (a_Id * 2); end; / create or replace procedure &main_user..myproc ( a_Value1 number, a_Value2 out number ) as begin a_Value2 := a_Value1 * 2; end; / create or replace procedure &main_user..myrefcursorproc ( a_StartingValue number, a_EndingValue number, a_RefCursor out sys_refcursor ) as begin open a_RefCursor for select * from TestStrings where IntCol between a_StartingValue and a_EndingValue; end; / -- -- Create package for demoing PL/SQL collections and records. -- create or replace package &main_user..pkg_Demo as type udt_StringList is table of varchar2(100) index by binary_integer; type udt_DemoRecord is record ( NumberValue number, StringValue varchar2(30), DateValue date, BooleanValue boolean ); procedure DemoCollectionOut ( a_Value out nocopy udt_StringList ); procedure DemoRecordsInOut ( a_Value in out nocopy udt_DemoRecord ); end; / create or replace package body &main_user..pkg_Demo as procedure DemoCollectionOut ( a_Value out nocopy udt_StringList ) is begin a_Value(-1048576) := 'First element'; a_Value(-576) := 'Second element'; a_Value(284) := 'Third element'; a_Value(8388608) := 'Fourth element'; end; procedure DemoRecordsInOut ( a_Value in out nocopy udt_DemoRecord ) is begin a_Value.NumberValue := a_Value.NumberValue * 2; a_Value.StringValue := a_Value.StringValue || ' (Modified)'; a_Value.DateValue := a_Value.DateValue + 5; a_Value.BooleanValue := not a_Value.BooleanValue; end; end; /
the_stack
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.3 -- Dumped by pg_dump version 9.5.3 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; -- -- Name: goiardi; Type: SCHEMA; Schema: -; Owner: - -- CREATE SCHEMA goiardi; -- -- Name: sqitch; Type: SCHEMA; Schema: -; Owner: - -- CREATE SCHEMA sqitch; -- -- Name: SCHEMA sqitch; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON SCHEMA sqitch IS 'Sqitch database deployment metadata v1.0.'; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; -- -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; -- -- Name: ltree; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS ltree WITH SCHEMA goiardi; -- -- Name: EXTENSION ltree; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION ltree IS 'data type for hierarchical tree-like structures'; -- -- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: - -- CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA goiardi; -- -- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: - -- COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams'; SET search_path = goiardi, pg_catalog; -- -- Name: log_action; Type: TYPE; Schema: goiardi; Owner: - -- CREATE TYPE log_action AS ENUM ( 'create', 'delete', 'modify' ); -- -- Name: log_actor; Type: TYPE; Schema: goiardi; Owner: - -- CREATE TYPE log_actor AS ENUM ( 'user', 'client' ); -- -- Name: report_status; Type: TYPE; Schema: goiardi; Owner: - -- CREATE TYPE report_status AS ENUM ( 'started', 'success', 'failure' ); -- -- Name: shovey_output; Type: TYPE; Schema: goiardi; Owner: - -- CREATE TYPE shovey_output AS ENUM ( 'stdout', 'stderr' ); -- -- Name: status_node; Type: TYPE; Schema: goiardi; Owner: - -- CREATE TYPE status_node AS ENUM ( 'new', 'up', 'down' ); -- -- Name: delete_search_collection(text, integer); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION delete_search_collection(col text, m_organization_id integer) RETURNS void LANGUAGE plpgsql AS $$ DECLARE sc_id bigint; BEGIN SELECT id INTO sc_id FROM goiardi.search_collections WHERE name = col AND organization_id = m_organization_id; IF NOT FOUND THEN RAISE EXCEPTION 'The collection % does not exist!', col; END IF; DELETE FROM goiardi.search_items WHERE organization_id = m_organization_id AND search_collection_id = sc_id; DELETE FROM goiardi.search_collections WHERE organization_id = m_organization_id AND id = sc_id; END; $$; -- -- Name: delete_search_item(text, text, integer); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION delete_search_item(col text, item text, m_organization_id integer) RETURNS void LANGUAGE plpgsql AS $$ DECLARE sc_id bigint; BEGIN SELECT id INTO sc_id FROM goiardi.search_collections WHERE name = col AND organization_id = m_organization_id; IF NOT FOUND THEN RAISE EXCEPTION 'The collection % does not exist!', col; END IF; DELETE FROM goiardi.search_items WHERE organization_id = m_organization_id AND search_collection_id = sc_id AND item_name = item; END; $$; -- -- Name: insert_dbi(text, text, text, bigint, jsonb); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION insert_dbi(m_data_bag_name text, m_name text, m_orig_name text, m_dbag_id bigint, m_raw_data jsonb) RETURNS bigint LANGUAGE plpgsql AS $$ DECLARE u BIGINT; dbi_id BIGINT; BEGIN SELECT id INTO u FROM goiardi.data_bags WHERE id = m_dbag_id; IF NOT FOUND THEN RAISE EXCEPTION 'aiiiie! The data bag % was deleted from the db while we were doing something else', m_data_bag_name; END IF; INSERT INTO goiardi.data_bag_items (name, orig_name, data_bag_id, raw_data, created_at, updated_at) VALUES (m_name, m_orig_name, m_dbag_id, m_raw_data, NOW(), NOW()) RETURNING id INTO dbi_id; RETURN dbi_id; END; $$; -- -- Name: insert_node_status(text, status_node); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION insert_node_status(m_name text, m_status status_node) RETURNS void LANGUAGE plpgsql AS $$ DECLARE n BIGINT; BEGIN SELECT id INTO n FROM goiardi.nodes WHERE name = m_name; IF NOT FOUND THEN RAISE EXCEPTION 'aiiie, the node % was deleted while we were doing something else trying to insert a status', m_name; END IF; INSERT INTO goiardi.node_statuses (node_id, status, updated_at) VALUES (n, m_status, NOW()); RETURN; END; $$; -- -- Name: merge_clients(text, text, boolean, boolean, text, text); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_clients(m_name text, m_nodename text, m_validator boolean, m_admin boolean, m_public_key text, m_certificate text) RETURNS void LANGUAGE plpgsql AS $$ DECLARE u_id bigint; u_name text; BEGIN SELECT id, name INTO u_id, u_name FROM goiardi.users WHERE name = m_name; IF FOUND THEN RAISE EXCEPTION 'a user with id % named % was found that would conflict with this client', u_id, u_name; END IF; LOOP -- first try to update the key UPDATE goiardi.clients SET name = m_name, nodename = m_nodename, validator = m_validator, admin = m_admin, public_key = m_public_key, certificate = m_certificate, updated_at = NOW() WHERE name = m_name; IF found THEN RETURN; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.clients (name, nodename, validator, admin, public_key, certificate, created_at, updated_at) VALUES (m_name, m_nodename, m_validator, m_admin, m_public_key, m_certificate, NOW(), NOW()); RETURN; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_cookbook_versions(bigint, boolean, jsonb, jsonb, jsonb, jsonb, jsonb, jsonb, jsonb, jsonb, jsonb, jsonb, bigint, bigint, bigint); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_cookbook_versions(c_id bigint, is_frozen boolean, defb jsonb, libb jsonb, attb jsonb, recb jsonb, prob jsonb, resb jsonb, temb jsonb, roob jsonb, filb jsonb, metb jsonb, maj bigint, min bigint, patch bigint) RETURNS bigint LANGUAGE plpgsql AS $$ DECLARE cbv_id BIGINT; BEGIN LOOP -- first try to update the key UPDATE goiardi.cookbook_versions SET frozen = is_frozen, metadata = metb, definitions = defb, libraries = libb, attributes = attb, recipes = recb, providers = prob, resources = resb, templates = temb, root_files = roob, files = filb, updated_at = NOW() WHERE cookbook_id = c_id AND major_ver = maj AND minor_ver = min AND patch_ver = patch RETURNING id INTO cbv_id; IF found THEN RETURN cbv_id; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.cookbook_versions (cookbook_id, major_ver, minor_ver, patch_ver, frozen, metadata, definitions, libraries, attributes, recipes, providers, resources, templates, root_files, files, created_at, updated_at) VALUES (c_id, maj, min, patch, is_frozen, metb, defb, libb, attb, recb, prob, resb, temb, roob, filb, NOW(), NOW()) RETURNING id INTO cbv_id; RETURN c_id; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_cookbooks(text); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_cookbooks(m_name text) RETURNS bigint LANGUAGE plpgsql AS $$ DECLARE c_id BIGINT; BEGIN LOOP -- first try to update the key UPDATE goiardi.cookbooks SET name = m_name, updated_at = NOW() WHERE name = m_name RETURNING id INTO c_id; IF found THEN RETURN c_id; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.cookbooks (name, created_at, updated_at) VALUES (m_name, NOW(), NOW()) RETURNING id INTO c_id; RETURN c_id; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_data_bags(text); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_data_bags(m_name text) RETURNS bigint LANGUAGE plpgsql AS $$ DECLARE db_id BIGINT; BEGIN LOOP -- first try to update the key UPDATE goiardi.data_bags SET updated_at = NOW() WHERE name = m_name RETURNING id INTO db_id; IF found THEN RETURN db_id; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.data_bags (name, created_at, updated_at) VALUES (m_name, NOW(), NOW()) RETURNING id INTO db_id; RETURN db_id; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_environments(text, text, jsonb, jsonb, jsonb); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_environments(m_name text, m_description text, m_default_attr jsonb, m_override_attr jsonb, m_cookbook_vers jsonb) RETURNS void LANGUAGE plpgsql AS $$ BEGIN LOOP -- first try to update the key UPDATE goiardi.environments SET description = m_description, default_attr = m_default_attr, override_attr = m_override_attr, cookbook_vers = m_cookbook_vers, updated_at = NOW() WHERE name = m_name; IF found THEN RETURN; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.environments (name, description, default_attr, override_attr, cookbook_vers, created_at, updated_at) VALUES (m_name, m_description, m_default_attr, m_override_attr, m_cookbook_vers, NOW(), NOW()); RETURN; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_nodes(text, text, jsonb, jsonb, jsonb, jsonb, jsonb); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_nodes(m_name text, m_chef_environment text, m_run_list jsonb, m_automatic_attr jsonb, m_normal_attr jsonb, m_default_attr jsonb, m_override_attr jsonb) RETURNS void LANGUAGE plpgsql AS $$ BEGIN LOOP -- first try to update the key UPDATE goiardi.nodes SET chef_environment = m_chef_environment, run_list = m_run_list, automatic_attr = m_automatic_attr, normal_attr = m_normal_attr, default_attr = m_default_attr, override_attr = m_override_attr, updated_at = NOW() WHERE name = m_name; IF found THEN RETURN; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.nodes (name, chef_environment, run_list, automatic_attr, normal_attr, default_attr, override_attr, created_at, updated_at) VALUES (m_name, m_chef_environment, m_run_list, m_automatic_attr, m_normal_attr, m_default_attr, m_override_attr, NOW(), NOW()); RETURN; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_reports(uuid, text, timestamp with time zone, timestamp with time zone, integer, report_status, text, jsonb, jsonb); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_reports(m_run_id uuid, m_node_name text, m_start_time timestamp with time zone, m_end_time timestamp with time zone, m_total_res_count integer, m_status report_status, m_run_list text, m_resources jsonb, m_data jsonb) RETURNS void LANGUAGE plpgsql AS $$ BEGIN LOOP -- first try to update the key UPDATE goiardi.reports SET start_time = m_start_time, end_time = m_end_time, total_res_count = m_total_res_count, status = m_status, run_list = m_run_list, resources = m_resources, data = m_data, updated_at = NOW() WHERE run_id = m_run_id; IF found THEN RETURN; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.reports (run_id, node_name, start_time, end_time, total_res_count, status, run_list, resources, data, created_at, updated_at) VALUES (m_run_id, m_node_name, m_start_time, m_end_time, m_total_res_count, m_status, m_run_list, m_resources, m_data, NOW(), NOW()); RETURN; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_roles(text, text, jsonb, jsonb, jsonb, jsonb); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_roles(m_name text, m_description text, m_run_list jsonb, m_env_run_lists jsonb, m_default_attr jsonb, m_override_attr jsonb) RETURNS void LANGUAGE plpgsql AS $$ BEGIN LOOP -- first try to update the key UPDATE goiardi.roles SET description = m_description, run_list = m_run_list, env_run_lists = m_env_run_lists, default_attr = m_default_attr, override_attr = m_override_attr, updated_at = NOW() WHERE name = m_name; IF found THEN RETURN; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.roles (name, description, run_list, env_run_lists, default_attr, override_attr, created_at, updated_at) VALUES (m_name, m_description, m_run_list, m_env_run_lists, m_default_attr, m_override_attr, NOW(), NOW()); RETURN; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_sandboxes(character varying, timestamp with time zone, jsonb, boolean); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_sandboxes(m_sbox_id character varying, m_creation_time timestamp with time zone, m_checksums jsonb, m_completed boolean) RETURNS void LANGUAGE plpgsql AS $$ BEGIN LOOP -- first try to update the key UPDATE goiardi.sandboxes SET checksums = m_checksums, completed = m_completed WHERE sbox_id = m_sbox_id; IF found THEN RETURN; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.sandboxes (sbox_id, creation_time, checksums, completed) VALUES (m_sbox_id, m_creation_time, m_checksums, m_completed); RETURN; EXCEPTION WHEN unique_violation THEN -- Do nothing, and loop to try the UPDATE again. END; END LOOP; END; $$; -- -- Name: merge_shovey_runs(uuid, text, text, timestamp with time zone, timestamp with time zone, text, integer); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_shovey_runs(m_shovey_run_id uuid, m_node_name text, m_status text, m_ack_time timestamp with time zone, m_end_time timestamp with time zone, m_error text, m_exit_status integer) RETURNS void LANGUAGE plpgsql AS $$ DECLARE m_shovey_id bigint; BEGIN LOOP UPDATE goiardi.shovey_runs SET status = m_status, ack_time = NULLIF(m_ack_time, '0001-01-01 00:00:00 +0000'), end_time = NULLIF(m_end_time, '0001-01-01 00:00:00 +0000'), error = m_error, exit_status = cast(m_exit_status as smallint) WHERE shovey_uuid = m_shovey_run_id AND node_name = m_node_name; IF found THEN RETURN; END IF; BEGIN SELECT id INTO m_shovey_id FROM goiardi.shoveys WHERE run_id = m_shovey_run_id; INSERT INTO goiardi.shovey_runs (shovey_uuid, shovey_id, node_name, status, ack_time, end_time, error, exit_status) VALUES (m_shovey_run_id, m_shovey_id, m_node_name, m_status, NULLIF(m_ack_time, '0001-01-01 00:00:00 +0000'),NULLIF(m_end_time, '0001-01-01 00:00:00 +0000'), m_error, cast(m_exit_status as smallint)); EXCEPTION WHEN unique_violation THEN -- meh. END; END LOOP; END; $$; -- -- Name: merge_shoveys(uuid, text, text, bigint, character varying); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_shoveys(m_run_id uuid, m_command text, m_status text, m_timeout bigint, m_quorum character varying) RETURNS void LANGUAGE plpgsql AS $$ BEGIN LOOP UPDATE goiardi.shoveys SET status = m_status, updated_at = NOW() WHERE run_id = m_run_id; IF found THEN RETURN; END IF; BEGIN INSERT INTO goiardi.shoveys (run_id, command, status, timeout, quorum, created_at, updated_at) VALUES (m_run_id, m_command, m_status, m_timeout, m_quorum, NOW(), NOW()); RETURN; EXCEPTION WHEN unique_violation THEN -- moo. END; END LOOP; END; $$; -- -- Name: merge_users(text, text, text, boolean, text, character varying, bytea, bigint); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION merge_users(m_name text, m_displayname text, m_email text, m_admin boolean, m_public_key text, m_passwd character varying, m_salt bytea, m_organization_id bigint) RETURNS void LANGUAGE plpgsql AS $$ DECLARE c_id bigint; c_name text; BEGIN SELECT id, name INTO c_id, c_name FROM goiardi.clients WHERE name = m_name AND organization_id = m_organization_id; IF FOUND THEN RAISE EXCEPTION 'a client with id % named % was found that would conflict with this client', c_id, c_name; END IF; IF m_email = '' THEN m_email := NULL; END IF; LOOP -- first try to update the key UPDATE goiardi.users SET name = m_name, displayname = m_displayname, email = m_email, admin = m_admin, public_key = m_public_key, passwd = m_passwd, salt = m_salt, updated_at = NOW() WHERE name = m_name; IF found THEN RETURN; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO goiardi.users (name, displayname, email, admin, public_key, passwd, salt, created_at, updated_at) VALUES (m_name, m_displayname, m_email, m_admin, m_public_key, m_passwd, m_salt, NOW(), NOW()); RETURN; END; END LOOP; END; $$; -- -- Name: rename_client(text, text); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION rename_client(old_name text, new_name text) RETURNS void LANGUAGE plpgsql AS $$ DECLARE u_id bigint; u_name text; BEGIN SELECT id, name INTO u_id, u_name FROM goiardi.users WHERE name = new_name; IF FOUND THEN RAISE EXCEPTION 'a user with id % named % was found that would conflict with this client', u_id, u_name; END IF; BEGIN UPDATE goiardi.clients SET name = new_name WHERE name = old_name; EXCEPTION WHEN unique_violation THEN RAISE EXCEPTION 'Client % already exists, cannot rename %', old_name, new_name; END; END; $$; -- -- Name: rename_user(text, text, integer); Type: FUNCTION; Schema: goiardi; Owner: - -- CREATE FUNCTION rename_user(old_name text, new_name text, m_organization_id integer) RETURNS void LANGUAGE plpgsql AS $$ DECLARE c_id bigint; c_name text; BEGIN SELECT id, name INTO c_id, c_name FROM goiardi.clients WHERE name = new_name AND organization_id = m_organization_id; IF FOUND THEN RAISE EXCEPTION 'a client with id % named % was found that would conflict with this user', c_id, c_name; END IF; BEGIN UPDATE goiardi.users SET name = new_name WHERE name = old_name; EXCEPTION WHEN unique_violation THEN RAISE EXCEPTION 'User % already exists, cannot rename %', old_name, new_name; END; END; $$; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: clients; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE clients ( id bigint NOT NULL, name text NOT NULL, nodename text, validator boolean, admin boolean, organization_id bigint DEFAULT 1 NOT NULL, public_key text, certificate text, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: clients_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE clients_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: clients_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE clients_id_seq OWNED BY clients.id; -- -- Name: cookbook_versions; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE cookbook_versions ( id bigint NOT NULL, cookbook_id bigint NOT NULL, major_ver bigint NOT NULL, minor_ver bigint NOT NULL, patch_ver bigint DEFAULT 0 NOT NULL, frozen boolean, metadata jsonb, definitions jsonb, libraries jsonb, attributes jsonb, recipes jsonb, providers jsonb, resources jsonb, templates jsonb, root_files jsonb, files jsonb, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: cookbook_versions_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE cookbook_versions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: cookbook_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE cookbook_versions_id_seq OWNED BY cookbook_versions.id; -- -- Name: cookbooks; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE cookbooks ( id bigint NOT NULL, name text NOT NULL, organization_id bigint DEFAULT 1 NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: cookbooks_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE cookbooks_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: cookbooks_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE cookbooks_id_seq OWNED BY cookbooks.id; -- -- Name: data_bag_items; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE data_bag_items ( id bigint NOT NULL, name text NOT NULL, orig_name text NOT NULL, data_bag_id bigint NOT NULL, raw_data jsonb, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: data_bag_items_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE data_bag_items_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: data_bag_items_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE data_bag_items_id_seq OWNED BY data_bag_items.id; -- -- Name: data_bags; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE data_bags ( id bigint NOT NULL, name text NOT NULL, organization_id bigint DEFAULT 1 NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: data_bags_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE data_bags_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: data_bags_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE data_bags_id_seq OWNED BY data_bags.id; -- -- Name: environments; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE environments ( id bigint NOT NULL, name text, organization_id bigint DEFAULT 1 NOT NULL, description text, default_attr jsonb, override_attr jsonb, cookbook_vers jsonb, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: environments_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE environments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: environments_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE environments_id_seq OWNED BY environments.id; -- -- Name: file_checksums; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE file_checksums ( id bigint NOT NULL, organization_id bigint DEFAULT 1 NOT NULL, checksum character varying(32) ); -- -- Name: file_checksums_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE file_checksums_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: file_checksums_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE file_checksums_id_seq OWNED BY file_checksums.id; -- -- Name: joined_cookbook_version; Type: VIEW; Schema: goiardi; Owner: - -- CREATE VIEW joined_cookbook_version AS SELECT v.major_ver, v.minor_ver, v.patch_ver, ((((v.major_ver || '.'::text) || v.minor_ver) || '.'::text) || v.patch_ver) AS version, v.id, v.metadata, v.recipes, c.organization_id, c.name FROM (cookbooks c JOIN cookbook_versions v ON ((c.id = v.cookbook_id))); -- -- Name: log_infos; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE log_infos ( id bigint NOT NULL, actor_id bigint DEFAULT 0 NOT NULL, actor_info text, actor_type log_actor NOT NULL, organization_id bigint DEFAULT '1'::bigint NOT NULL, "time" timestamp with time zone DEFAULT now(), action log_action NOT NULL, object_type text NOT NULL, object_name text NOT NULL, extended_info text ); ALTER TABLE ONLY log_infos ALTER COLUMN extended_info SET STORAGE EXTERNAL; -- -- Name: log_infos_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE log_infos_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: log_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE log_infos_id_seq OWNED BY log_infos.id; -- -- Name: node_statuses; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE node_statuses ( id bigint NOT NULL, node_id bigint NOT NULL, status status_node DEFAULT 'new'::status_node NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: nodes; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE nodes ( id bigint NOT NULL, name text NOT NULL, organization_id bigint DEFAULT 1 NOT NULL, chef_environment text DEFAULT '_default'::text NOT NULL, run_list jsonb, automatic_attr jsonb, normal_attr jsonb, default_attr jsonb, override_attr jsonb, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, is_down boolean DEFAULT false ); -- -- Name: node_latest_statuses; Type: VIEW; Schema: goiardi; Owner: - -- CREATE VIEW node_latest_statuses AS SELECT DISTINCT ON (n.id) n.id, n.name, n.chef_environment, n.run_list, n.automatic_attr, n.normal_attr, n.default_attr, n.override_attr, n.is_down, ns.status, ns.updated_at FROM (nodes n JOIN node_statuses ns ON ((n.id = ns.node_id))) ORDER BY n.id, ns.updated_at DESC; -- -- Name: node_statuses_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE node_statuses_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: node_statuses_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE node_statuses_id_seq OWNED BY node_statuses.id; -- -- Name: nodes_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE nodes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE nodes_id_seq OWNED BY nodes.id; -- -- Name: organizations; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE organizations ( id bigint NOT NULL, name text NOT NULL, description text, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: organizations_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE organizations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: organizations_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE organizations_id_seq OWNED BY organizations.id; -- -- Name: reports; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE reports ( id bigint NOT NULL, run_id uuid NOT NULL, node_name character varying(255), organization_id bigint DEFAULT 1 NOT NULL, start_time timestamp with time zone, end_time timestamp with time zone, total_res_count integer DEFAULT 0, status report_status, run_list text, resources jsonb, data jsonb, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); ALTER TABLE ONLY reports ALTER COLUMN run_list SET STORAGE EXTERNAL; -- -- Name: reports_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE reports_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: reports_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE reports_id_seq OWNED BY reports.id; -- -- Name: roles; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE roles ( id bigint NOT NULL, name text NOT NULL, organization_id bigint DEFAULT 1 NOT NULL, description text, run_list jsonb, env_run_lists jsonb, default_attr jsonb, override_attr jsonb, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: roles_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE roles_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE roles_id_seq OWNED BY roles.id; -- -- Name: sandboxes; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE sandboxes ( id bigint NOT NULL, sbox_id character varying(32) NOT NULL, organization_id bigint DEFAULT 1 NOT NULL, creation_time timestamp with time zone NOT NULL, checksums jsonb, completed boolean ); -- -- Name: sandboxes_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE sandboxes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: sandboxes_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE sandboxes_id_seq OWNED BY sandboxes.id; -- -- Name: search_collections; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE search_collections ( id bigint NOT NULL, organization_id bigint DEFAULT 1 NOT NULL, name text ); -- -- Name: search_collections_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE search_collections_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: search_collections_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE search_collections_id_seq OWNED BY search_collections.id; -- -- Name: search_items; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE search_items ( id bigint NOT NULL, organization_id bigint DEFAULT 1 NOT NULL, search_collection_id bigint NOT NULL, item_name text, value text, path ltree ); -- -- Name: search_items_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE search_items_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: search_items_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE search_items_id_seq OWNED BY search_items.id; -- -- Name: shovey_run_streams; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE shovey_run_streams ( id bigint NOT NULL, shovey_run_id bigint NOT NULL, seq integer NOT NULL, output_type shovey_output, output text, is_last boolean, created_at timestamp with time zone NOT NULL ); -- -- Name: shovey_run_streams_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE shovey_run_streams_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: shovey_run_streams_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE shovey_run_streams_id_seq OWNED BY shovey_run_streams.id; -- -- Name: shovey_runs; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE shovey_runs ( id bigint NOT NULL, shovey_uuid uuid NOT NULL, shovey_id bigint NOT NULL, node_name text, status text, ack_time timestamp with time zone, end_time timestamp with time zone, error text, exit_status smallint ); -- -- Name: shovey_runs_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE shovey_runs_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: shovey_runs_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE shovey_runs_id_seq OWNED BY shovey_runs.id; -- -- Name: shoveys; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE shoveys ( id bigint NOT NULL, run_id uuid NOT NULL, command text, status text, timeout bigint DEFAULT 300, quorum character varying(25) DEFAULT '100%'::character varying, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, organization_id bigint DEFAULT 1 NOT NULL ); -- -- Name: shoveys_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE shoveys_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: shoveys_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE shoveys_id_seq OWNED BY shoveys.id; -- -- Name: users; Type: TABLE; Schema: goiardi; Owner: - -- CREATE TABLE users ( id bigint NOT NULL, name text NOT NULL, displayname text, email text, admin boolean, public_key text, passwd character varying(128), salt bytea, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL ); -- -- Name: users_id_seq; Type: SEQUENCE; Schema: goiardi; Owner: - -- CREATE SEQUENCE users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -- -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: goiardi; Owner: - -- ALTER SEQUENCE users_id_seq OWNED BY users.id; SET search_path = sqitch, pg_catalog; -- -- Name: changes; Type: TABLE; Schema: sqitch; Owner: - -- CREATE TABLE changes ( change_id text NOT NULL, change text NOT NULL, project text NOT NULL, note text DEFAULT ''::text NOT NULL, committed_at timestamp with time zone DEFAULT clock_timestamp() NOT NULL, committer_name text NOT NULL, committer_email text NOT NULL, planned_at timestamp with time zone NOT NULL, planner_name text NOT NULL, planner_email text NOT NULL, script_hash text ); -- -- Name: TABLE changes; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON TABLE changes IS 'Tracks the changes currently deployed to the database.'; -- -- Name: COLUMN changes.change_id; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.change_id IS 'Change primary key.'; -- -- Name: COLUMN changes.change; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.change IS 'Name of a deployed change.'; -- -- Name: COLUMN changes.project; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.project IS 'Name of the Sqitch project to which the change belongs.'; -- -- Name: COLUMN changes.note; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.note IS 'Description of the change.'; -- -- Name: COLUMN changes.committed_at; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.committed_at IS 'Date the change was deployed.'; -- -- Name: COLUMN changes.committer_name; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.committer_name IS 'Name of the user who deployed the change.'; -- -- Name: COLUMN changes.committer_email; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.committer_email IS 'Email address of the user who deployed the change.'; -- -- Name: COLUMN changes.planned_at; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.planned_at IS 'Date the change was added to the plan.'; -- -- Name: COLUMN changes.planner_name; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.planner_name IS 'Name of the user who planed the change.'; -- -- Name: COLUMN changes.planner_email; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.planner_email IS 'Email address of the user who planned the change.'; -- -- Name: COLUMN changes.script_hash; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN changes.script_hash IS 'Deploy script SHA-1 hash.'; -- -- Name: dependencies; Type: TABLE; Schema: sqitch; Owner: - -- CREATE TABLE dependencies ( change_id text NOT NULL, type text NOT NULL, dependency text NOT NULL, dependency_id text, CONSTRAINT dependencies_check CHECK ((((type = 'require'::text) AND (dependency_id IS NOT NULL)) OR ((type = 'conflict'::text) AND (dependency_id IS NULL)))) ); -- -- Name: TABLE dependencies; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON TABLE dependencies IS 'Tracks the currently satisfied dependencies.'; -- -- Name: COLUMN dependencies.change_id; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN dependencies.change_id IS 'ID of the depending change.'; -- -- Name: COLUMN dependencies.type; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN dependencies.type IS 'Type of dependency.'; -- -- Name: COLUMN dependencies.dependency; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN dependencies.dependency IS 'Dependency name.'; -- -- Name: COLUMN dependencies.dependency_id; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN dependencies.dependency_id IS 'Change ID the dependency resolves to.'; -- -- Name: events; Type: TABLE; Schema: sqitch; Owner: - -- CREATE TABLE events ( event text NOT NULL, change_id text NOT NULL, change text NOT NULL, project text NOT NULL, note text DEFAULT ''::text NOT NULL, requires text[] DEFAULT '{}'::text[] NOT NULL, conflicts text[] DEFAULT '{}'::text[] NOT NULL, tags text[] DEFAULT '{}'::text[] NOT NULL, committed_at timestamp with time zone DEFAULT clock_timestamp() NOT NULL, committer_name text NOT NULL, committer_email text NOT NULL, planned_at timestamp with time zone NOT NULL, planner_name text NOT NULL, planner_email text NOT NULL, CONSTRAINT events_event_check CHECK ((event = ANY (ARRAY['deploy'::text, 'revert'::text, 'fail'::text, 'merge'::text]))) ); -- -- Name: TABLE events; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON TABLE events IS 'Contains full history of all deployment events.'; -- -- Name: COLUMN events.event; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.event IS 'Type of event.'; -- -- Name: COLUMN events.change_id; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.change_id IS 'Change ID.'; -- -- Name: COLUMN events.change; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.change IS 'Change name.'; -- -- Name: COLUMN events.project; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.project IS 'Name of the Sqitch project to which the change belongs.'; -- -- Name: COLUMN events.note; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.note IS 'Description of the change.'; -- -- Name: COLUMN events.requires; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.requires IS 'Array of the names of required changes.'; -- -- Name: COLUMN events.conflicts; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.conflicts IS 'Array of the names of conflicting changes.'; -- -- Name: COLUMN events.tags; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.tags IS 'Tags associated with the change.'; -- -- Name: COLUMN events.committed_at; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.committed_at IS 'Date the event was committed.'; -- -- Name: COLUMN events.committer_name; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.committer_name IS 'Name of the user who committed the event.'; -- -- Name: COLUMN events.committer_email; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.committer_email IS 'Email address of the user who committed the event.'; -- -- Name: COLUMN events.planned_at; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.planned_at IS 'Date the event was added to the plan.'; -- -- Name: COLUMN events.planner_name; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.planner_name IS 'Name of the user who planed the change.'; -- -- Name: COLUMN events.planner_email; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN events.planner_email IS 'Email address of the user who plan planned the change.'; -- -- Name: projects; Type: TABLE; Schema: sqitch; Owner: - -- CREATE TABLE projects ( project text NOT NULL, uri text, created_at timestamp with time zone DEFAULT clock_timestamp() NOT NULL, creator_name text NOT NULL, creator_email text NOT NULL ); -- -- Name: TABLE projects; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON TABLE projects IS 'Sqitch projects deployed to this database.'; -- -- Name: COLUMN projects.project; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN projects.project IS 'Unique Name of a project.'; -- -- Name: COLUMN projects.uri; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN projects.uri IS 'Optional project URI'; -- -- Name: COLUMN projects.created_at; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN projects.created_at IS 'Date the project was added to the database.'; -- -- Name: COLUMN projects.creator_name; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN projects.creator_name IS 'Name of the user who added the project.'; -- -- Name: COLUMN projects.creator_email; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN projects.creator_email IS 'Email address of the user who added the project.'; -- -- Name: releases; Type: TABLE; Schema: sqitch; Owner: - -- CREATE TABLE releases ( version real NOT NULL, installed_at timestamp with time zone DEFAULT clock_timestamp() NOT NULL, installer_name text NOT NULL, installer_email text NOT NULL ); -- -- Name: TABLE releases; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON TABLE releases IS 'Sqitch registry releases.'; -- -- Name: COLUMN releases.version; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN releases.version IS 'Version of the Sqitch registry.'; -- -- Name: COLUMN releases.installed_at; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN releases.installed_at IS 'Date the registry release was installed.'; -- -- Name: COLUMN releases.installer_name; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN releases.installer_name IS 'Name of the user who installed the registry release.'; -- -- Name: COLUMN releases.installer_email; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN releases.installer_email IS 'Email address of the user who installed the registry release.'; -- -- Name: tags; Type: TABLE; Schema: sqitch; Owner: - -- CREATE TABLE tags ( tag_id text NOT NULL, tag text NOT NULL, project text NOT NULL, change_id text NOT NULL, note text DEFAULT ''::text NOT NULL, committed_at timestamp with time zone DEFAULT clock_timestamp() NOT NULL, committer_name text NOT NULL, committer_email text NOT NULL, planned_at timestamp with time zone NOT NULL, planner_name text NOT NULL, planner_email text NOT NULL ); -- -- Name: TABLE tags; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON TABLE tags IS 'Tracks the tags currently applied to the database.'; -- -- Name: COLUMN tags.tag_id; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.tag_id IS 'Tag primary key.'; -- -- Name: COLUMN tags.tag; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.tag IS 'Project-unique tag name.'; -- -- Name: COLUMN tags.project; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.project IS 'Name of the Sqitch project to which the tag belongs.'; -- -- Name: COLUMN tags.change_id; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.change_id IS 'ID of last change deployed before the tag was applied.'; -- -- Name: COLUMN tags.note; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.note IS 'Description of the tag.'; -- -- Name: COLUMN tags.committed_at; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.committed_at IS 'Date the tag was applied to the database.'; -- -- Name: COLUMN tags.committer_name; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.committer_name IS 'Name of the user who applied the tag.'; -- -- Name: COLUMN tags.committer_email; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.committer_email IS 'Email address of the user who applied the tag.'; -- -- Name: COLUMN tags.planned_at; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.planned_at IS 'Date the tag was added to the plan.'; -- -- Name: COLUMN tags.planner_name; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.planner_name IS 'Name of the user who planed the tag.'; -- -- Name: COLUMN tags.planner_email; Type: COMMENT; Schema: sqitch; Owner: - -- COMMENT ON COLUMN tags.planner_email IS 'Email address of the user who planned the tag.'; SET search_path = goiardi, pg_catalog; -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY clients ALTER COLUMN id SET DEFAULT nextval('clients_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY cookbook_versions ALTER COLUMN id SET DEFAULT nextval('cookbook_versions_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY cookbooks ALTER COLUMN id SET DEFAULT nextval('cookbooks_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY data_bag_items ALTER COLUMN id SET DEFAULT nextval('data_bag_items_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY data_bags ALTER COLUMN id SET DEFAULT nextval('data_bags_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY environments ALTER COLUMN id SET DEFAULT nextval('environments_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY file_checksums ALTER COLUMN id SET DEFAULT nextval('file_checksums_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY log_infos ALTER COLUMN id SET DEFAULT nextval('log_infos_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY node_statuses ALTER COLUMN id SET DEFAULT nextval('node_statuses_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY nodes ALTER COLUMN id SET DEFAULT nextval('nodes_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY organizations ALTER COLUMN id SET DEFAULT nextval('organizations_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY reports ALTER COLUMN id SET DEFAULT nextval('reports_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY roles ALTER COLUMN id SET DEFAULT nextval('roles_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY sandboxes ALTER COLUMN id SET DEFAULT nextval('sandboxes_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY search_collections ALTER COLUMN id SET DEFAULT nextval('search_collections_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY search_items ALTER COLUMN id SET DEFAULT nextval('search_items_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shovey_run_streams ALTER COLUMN id SET DEFAULT nextval('shovey_run_streams_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shovey_runs ALTER COLUMN id SET DEFAULT nextval('shovey_runs_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shoveys ALTER COLUMN id SET DEFAULT nextval('shoveys_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); -- -- Data for Name: clients; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY clients (id, name, nodename, validator, admin, organization_id, public_key, certificate, created_at, updated_at) FROM stdin; \. -- -- Name: clients_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('clients_id_seq', 1, false); -- -- Data for Name: cookbook_versions; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY cookbook_versions (id, cookbook_id, major_ver, minor_ver, patch_ver, frozen, metadata, definitions, libraries, attributes, recipes, providers, resources, templates, root_files, files, created_at, updated_at) FROM stdin; \. -- -- Name: cookbook_versions_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('cookbook_versions_id_seq', 1, false); -- -- Data for Name: cookbooks; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY cookbooks (id, name, organization_id, created_at, updated_at) FROM stdin; \. -- -- Name: cookbooks_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('cookbooks_id_seq', 1, false); -- -- Data for Name: data_bag_items; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY data_bag_items (id, name, orig_name, data_bag_id, raw_data, created_at, updated_at) FROM stdin; \. -- -- Name: data_bag_items_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('data_bag_items_id_seq', 1, false); -- -- Data for Name: data_bags; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY data_bags (id, name, organization_id, created_at, updated_at) FROM stdin; \. -- -- Name: data_bags_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('data_bags_id_seq', 1, false); -- -- Data for Name: environments; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY environments (id, name, organization_id, description, default_attr, override_attr, cookbook_vers, created_at, updated_at) FROM stdin; 1 _default 1 The default Chef environment \N \N \N 2016-10-24 01:36:00.184006-07 2016-10-24 01:36:00.184006-07 \. -- -- Name: environments_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('environments_id_seq', 1, false); -- -- Data for Name: file_checksums; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY file_checksums (id, organization_id, checksum) FROM stdin; \. -- -- Name: file_checksums_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('file_checksums_id_seq', 1, false); -- -- Data for Name: log_infos; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY log_infos (id, actor_id, actor_info, actor_type, organization_id, "time", action, object_type, object_name, extended_info) FROM stdin; \. -- -- Name: log_infos_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('log_infos_id_seq', 1, false); -- -- Data for Name: node_statuses; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY node_statuses (id, node_id, status, updated_at) FROM stdin; \. -- -- Name: node_statuses_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('node_statuses_id_seq', 1, false); -- -- Data for Name: nodes; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY nodes (id, name, organization_id, chef_environment, run_list, automatic_attr, normal_attr, default_attr, override_attr, created_at, updated_at, is_down) FROM stdin; \. -- -- Name: nodes_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('nodes_id_seq', 1, false); -- -- Data for Name: organizations; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY organizations (id, name, description, created_at, updated_at) FROM stdin; 1 default \N 2016-10-24 01:36:00.437892-07 2016-10-24 01:36:00.437892-07 \. -- -- Name: organizations_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('organizations_id_seq', 1, true); -- -- Data for Name: reports; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY reports (id, run_id, node_name, organization_id, start_time, end_time, total_res_count, status, run_list, resources, data, created_at, updated_at) FROM stdin; \. -- -- Name: reports_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('reports_id_seq', 1, false); -- -- Data for Name: roles; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY roles (id, name, organization_id, description, run_list, env_run_lists, default_attr, override_attr, created_at, updated_at) FROM stdin; \. -- -- Name: roles_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('roles_id_seq', 1, false); -- -- Data for Name: sandboxes; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY sandboxes (id, sbox_id, organization_id, creation_time, checksums, completed) FROM stdin; \. -- -- Name: sandboxes_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('sandboxes_id_seq', 1, false); -- -- Data for Name: search_collections; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY search_collections (id, organization_id, name) FROM stdin; \. -- -- Name: search_collections_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('search_collections_id_seq', 1, false); -- -- Data for Name: search_items; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY search_items (id, organization_id, search_collection_id, item_name, value, path) FROM stdin; \. -- -- Name: search_items_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('search_items_id_seq', 1, false); -- -- Data for Name: shovey_run_streams; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY shovey_run_streams (id, shovey_run_id, seq, output_type, output, is_last, created_at) FROM stdin; \. -- -- Name: shovey_run_streams_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('shovey_run_streams_id_seq', 1, false); -- -- Data for Name: shovey_runs; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY shovey_runs (id, shovey_uuid, shovey_id, node_name, status, ack_time, end_time, error, exit_status) FROM stdin; \. -- -- Name: shovey_runs_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('shovey_runs_id_seq', 1, false); -- -- Data for Name: shoveys; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY shoveys (id, run_id, command, status, timeout, quorum, created_at, updated_at, organization_id) FROM stdin; \. -- -- Name: shoveys_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('shoveys_id_seq', 1, false); -- -- Data for Name: users; Type: TABLE DATA; Schema: goiardi; Owner: - -- COPY users (id, name, displayname, email, admin, public_key, passwd, salt, created_at, updated_at) FROM stdin; \. -- -- Name: users_id_seq; Type: SEQUENCE SET; Schema: goiardi; Owner: - -- SELECT pg_catalog.setval('users_id_seq', 1, false); SET search_path = sqitch, pg_catalog; -- -- Data for Name: changes; Type: TABLE DATA; Schema: sqitch; Owner: - -- COPY changes (change_id, change, project, note, committed_at, committer_name, committer_email, planned_at, planner_name, planner_email, script_hash) FROM stdin; c89b0e25c808b327036c88e6c9750c7526314c86 goiardi_schema goiardi_postgres Add schema for goiardi-postgres 2016-10-24 01:36:00.169744-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-27 14:09:07-07 Jeremy Bingham jbingham@gmail.com 6ec25c903515e34857bb9090bd1a87e9e927e911 367c28670efddf25455b9fd33c23a5a278b08bb4 environments goiardi_postgres Environments for postgres 2016-10-24 01:36:00.192931-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 00:40:11-07 Jeremy Bingham jbingham@gmail.com 14071321aa065ea2fc16394ac7eccac4e17f871e 911c456769628c817340ee77fc8d2b7c1d697782 nodes goiardi_postgres Create node table 2016-10-24 01:36:00.217871-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 10:37:46-07 Jeremy Bingham jbingham@gmail.com 32109bb49aa36a94c712b7acda79c47ff8ddec25 faa3571aa479de60f25785e707433b304ba3d2c7 clients goiardi_postgres Create client table 2016-10-24 01:36:00.240711-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:05:33-07 Jeremy Bingham jbingham@gmail.com 1e6f62a97fbc07211d2968372284d63dd4aa5991 bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 users goiardi_postgres Create user table 2016-10-24 01:36:00.263578-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:15:02-07 Jeremy Bingham jbingham@gmail.com fa249b238927ea80b6812de8d14c3d392b16ac95 138bc49d92c0bbb024cea41532a656f2d7f9b072 cookbooks goiardi_postgres Create cookbook table 2016-10-24 01:36:00.285625-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:27:27-07 Jeremy Bingham jbingham@gmail.com 566949982dcc9c9795e7764c67b0437cc0f8422b f529038064a0259bdecbdab1f9f665e17ddb6136 cookbook_versions goiardi_postgres Create cookbook versions table 2016-10-24 01:36:00.308155-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:31:34-07 Jeremy Bingham jbingham@gmail.com 9566c4794ddb4258426ce03bbeb03529fb57c240 85483913f96710c1267c6abacb6568cef9327f15 data_bags goiardi_postgres Create cookbook data bags table 2016-10-24 01:36:00.329717-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:42:04-07 Jeremy Bingham jbingham@gmail.com 17f8dbb44a32f1c0a01f9b3dde21dd2a40ecb53b feddf91b62caed36c790988bd29222591980433b data_bag_items goiardi_postgres Create data bag items table 2016-10-24 01:36:00.352727-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:02:31-07 Jeremy Bingham jbingham@gmail.com b928bdba9937cdfbc3bcb20e2808674485d6d22e 6a4489d9436ba1541d272700b303410cc906b08f roles goiardi_postgres Create roles table 2016-10-24 01:36:00.375924-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:09:28-07 Jeremy Bingham jbingham@gmail.com 67bbe92a7725f64280d6b031f9726997045d032e c4b32778f2911930f583ce15267aade320ac4dcd sandboxes goiardi_postgres Create sandboxes table 2016-10-24 01:36:00.39715-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:14:48-07 Jeremy Bingham jbingham@gmail.com 06db5b16a86236a68401cdb4f6fe8f83492ec294 81003655b93b41359804027fc202788aa0ddd9a9 log_infos goiardi_postgres Create log_infos table 2016-10-24 01:36:00.42422-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:19:10-07 Jeremy Bingham jbingham@gmail.com c3e322a1c9a2a6fdb37d116e47c02c5ad91b245b fce5b7aeed2ad742de1309d7841577cff19475a7 organizations goiardi_postgres Create organizations table 2016-10-24 01:36:00.44727-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:46:28-07 Jeremy Bingham jbingham@gmail.com 0702ea36c9d8db6a336d8a54963968e8bbb797bd f2621482d1c130ea8fee15d09f966685409bf67c file_checksums goiardi_postgres Create file checksums table 2016-10-24 01:36:00.468422-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:49:19-07 Jeremy Bingham jbingham@gmail.com 4e2aef9e549ac3fdaf5394bc53a690b8f9eb426a db1eb360cd5e6449a468ceb781d82b45dafb5c2d reports goiardi_postgres Create reports table 2016-10-24 01:36:00.493465-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 13:02:49-07 Jeremy Bingham jbingham@gmail.com 70ed195e5aa230c82883980ceb9d193c9d288039 c8b38382f7e5a18f36c621327f59205aa8aa9849 client_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients 2016-10-24 01:36:00.512661-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 23:00:04-07 Jeremy Bingham jbingham@gmail.com 81a3b18bd917955e8941d013e542bd31a64d707b 30774a960a0efb6adfbb1d526b8cdb1a45c7d039 client_rename goiardi_postgres Function to rename clients 2016-10-24 01:36:00.530852-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 10:22:50-07 Jeremy Bingham jbingham@gmail.com 733c2530ed7f7a84a5a7eded876a4b5f5a7fd5d7 2d1fdc8128b0632e798df7346e76f122ed5915ec user_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients 2016-10-24 01:36:00.548853-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:07:46-07 Jeremy Bingham jbingham@gmail.com 157af7fecc8228af6cd0638188510069cb2785ca f336c149ab32530c9c6ae4408c11558a635f39a1 user_rename goiardi_postgres Function to rename users 2016-10-24 01:36:00.566655-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:15:45-07 Jeremy Bingham jbingham@gmail.com 8721b0d316f9951a197656ae7a595db952a5b753 841a7d554d44f9d0d0b8a1a5a9d0a06ce71a2453 cookbook_insert_update goiardi_postgres Cookbook insert/update 2016-10-24 01:36:00.584748-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:55:23-07 Jeremy Bingham jbingham@gmail.com 0157bb4d66921441eba381b7e4706407791356ad 085e2f6281914c9fa6521d59fea81f16c106b59f cookbook_versions_insert_update goiardi_postgres Cookbook versions insert/update 2016-10-24 01:36:00.602748-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:56:05-07 Jeremy Bingham jbingham@gmail.com 02acdeff93d07edf150ef2cab00372009e0119ee 04bea39d649e4187d9579bd946fd60f760240d10 data_bag_insert_update goiardi_postgres Insert/update data bags 2016-10-24 01:36:00.620974-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-31 23:25:44-07 Jeremy Bingham jbingham@gmail.com d2c19ce6757f915987e12fa4fd17f71be5409a80 092885e8b5d94a9c1834bf309e02dc0f955ff053 environment_insert_update goiardi_postgres Insert/update environments 2016-10-24 01:36:00.639875-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 12:55:34-07 Jeremy Bingham jbingham@gmail.com e0807c6d3471284d1712fb156c98c05a1770460b 6d9587fa4275827c93ca9d7e0166ad1887b76cad file_checksum_insert_ignore goiardi_postgres Insert ignore for file checksums 2016-10-24 01:36:00.657793-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:13:48-07 Jeremy Bingham jbingham@gmail.com 9a3f07ed5472dbd1a00d861f2f5b4413877e5fb3 82a95e5e6cbd8ba51fea33506e1edb2a12e37a92 node_insert_update goiardi_postgres Insert/update for nodes 2016-10-24 01:36:00.676823-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:25:20-07 Jeremy Bingham jbingham@gmail.com d2eb971a3888d7e5291875e57ac170b9a98e34a9 d052a8267a6512581e5cab1f89a2456f279727b9 report_insert_update goiardi_postgres Insert/update for reports 2016-10-24 01:36:00.694263-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:10:25-07 Jeremy Bingham jbingham@gmail.com 808c27804d8f42bd21935a8da0e48480f187946f acf76029633d50febbec7c4763b7173078eddaf7 role_insert_update goiardi_postgres Insert/update for roles 2016-10-24 01:36:00.712957-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:27:32-07 Jeremy Bingham jbingham@gmail.com 7d90b6826a43b5751481f6f1ad6411f80686e15e b8ef36df686397ecb0fe67eb097e84aa0d78ac6b sandbox_insert_update goiardi_postgres Insert/update for sandboxes 2016-10-24 01:36:00.731156-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:34:39-07 Jeremy Bingham jbingham@gmail.com 12656c98699f59034eb4b692e8fe517705c072df 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 data_bag_item_insert goiardi_postgres Insert for data bag items 2016-10-24 01:36:00.749432-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 14:03:22-07 Jeremy Bingham jbingham@gmail.com 8d32ce4373fbb0141ec8aeba5dc0e6b178a507af c80c561c22f6e139165cdb338c7ce6fff8ff268d bytea_to_json goiardi_postgres Change most postgres bytea fields to json, because in this peculiar case json is way faster than gob 2016-10-24 01:36:00.807371-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 02:41:22-07 Jeremy Bingham jbingham@gmail.com f8ae9cbad0b78031ec802537e37487c47e38d7d5 9966894e0fc0da573243f6a3c0fc1432a2b63043 joined_cookbkook_version goiardi_postgres a convenient view for joined versions for cookbook versions, adapted from erchef's joined_cookbook_version 2016-10-24 01:36:00.825939-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 03:21:28-07 Jeremy Bingham jbingham@gmail.com 1a1fb217309986790f82be8e0266e601b8ec18dc 163ba4a496b9b4210d335e0e4ea5368a9ea8626c node_statuses goiardi_postgres Create node_status table for node statuses 2016-10-24 01:36:00.8491-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-10 23:01:54-07 Jeremy Bingham jeremy@terqa.local a61ba9d203c458ccd2a1150caae1239b85ef0334 8bb822f391b499585cfb2fc7248be469b0200682 node_status_insert goiardi_postgres insert function for node_statuses 2016-10-24 01:36:00.867577-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-11 00:01:31-07 Jeremy Bingham jeremy@terqa.local 95a2c1c5f017868c10062006284da4c0aa9a69d7 7c429aac08527adc774767584201f668408b04a6 add_down_column_nodes goiardi_postgres Add is_down column to the nodes table 2016-10-24 01:36:00.891045-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 20:18:05-07 Jeremy Bingham jbingham@gmail.com f0a4e7d49cd2c396326b4f3ddef46c968e8174cd 82bcace325dbdc905eb6e677f800d14a0506a216 shovey goiardi_postgres add shovey tables 2016-10-24 01:36:00.928682-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 22:07:12-07 Jeremy Bingham jeremy@terqa.local ccde488018934b941a95d96a150265520cfa4d25 62046d2fb96bbaedce2406252d312766452551c0 node_latest_statuses goiardi_postgres Add a view to easily get nodes by their latest status 2016-10-24 01:36:00.947295-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-26 13:32:02-07 Jeremy Bingham jbingham@gmail.com f5c6a6785ded2b5bddfac79b3e88ecd1ac323759 68f90e1fd2aac6a117d7697626741a02b8d0ebbe shovey_insert_update goiardi_postgres insert/update functions for shovey 2016-10-24 01:36:00.966335-07 Jeremy Bingham jeremy@goiardi.gl 2014-08-27 00:46:20-07 Jeremy Bingham jbingham@gmail.com 74df17dfb21d951347df4543c963d300a2f514ca 6f7aa2430e01cf33715828f1957d072cd5006d1c ltree goiardi_postgres Add tables for ltree search for postgres 2016-10-24 01:36:01.019465-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-10 23:21:26-07 Jeremy Bingham jeremy@goiardi.gl 124d1a4e9b8ceb1a87defd605da75c97c4a919e3 e7eb33b00d2fb6302e0c3979e9cac6fb80da377e ltree_del_col goiardi_postgres procedure for deleting search collections 2016-10-24 01:36:01.038487-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-12 12:33:15-07 Jeremy Bingham jeremy@goiardi.gl bdb43f64834424709550172bb395f4539a98de4d f49decbb15053ec5691093568450f642578ca460 ltree_del_item goiardi_postgres procedure for deleting search items 2016-10-24 01:36:01.055696-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-12 13:03:50-07 Jeremy Bingham jeremy@goiardi.gl 443bbe855ebc934501a28922898771c1590d9bd9 d87c4dc108d4fa90942cc3bab8e619a58aef3d2d jsonb goiardi_postgres Switch from json to jsonb columns. Will require using postgres 9.4+. 2016-10-24 01:36:01.113393-07 Jeremy Bingham jeremy@goiardi.gl 2016-09-09 01:17:31-07 Jeremy Bingham jeremy@eridu.local fe7c2d072328101c3f343613e869d753842fcfe2 \. -- -- Data for Name: dependencies; Type: TABLE DATA; Schema: sqitch; Owner: - -- COPY dependencies (change_id, type, dependency, dependency_id) FROM stdin; 367c28670efddf25455b9fd33c23a5a278b08bb4 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 911c456769628c817340ee77fc8d2b7c1d697782 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 faa3571aa479de60f25785e707433b304ba3d2c7 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 138bc49d92c0bbb024cea41532a656f2d7f9b072 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 f529038064a0259bdecbdab1f9f665e17ddb6136 require cookbooks 138bc49d92c0bbb024cea41532a656f2d7f9b072 f529038064a0259bdecbdab1f9f665e17ddb6136 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 85483913f96710c1267c6abacb6568cef9327f15 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 feddf91b62caed36c790988bd29222591980433b require data_bags 85483913f96710c1267c6abacb6568cef9327f15 feddf91b62caed36c790988bd29222591980433b require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 6a4489d9436ba1541d272700b303410cc906b08f require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 c4b32778f2911930f583ce15267aade320ac4dcd require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 81003655b93b41359804027fc202788aa0ddd9a9 require clients faa3571aa479de60f25785e707433b304ba3d2c7 81003655b93b41359804027fc202788aa0ddd9a9 require users bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 81003655b93b41359804027fc202788aa0ddd9a9 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 c8b38382f7e5a18f36c621327f59205aa8aa9849 require clients faa3571aa479de60f25785e707433b304ba3d2c7 c8b38382f7e5a18f36c621327f59205aa8aa9849 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 30774a960a0efb6adfbb1d526b8cdb1a45c7d039 require clients faa3571aa479de60f25785e707433b304ba3d2c7 30774a960a0efb6adfbb1d526b8cdb1a45c7d039 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 2d1fdc8128b0632e798df7346e76f122ed5915ec require users bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 2d1fdc8128b0632e798df7346e76f122ed5915ec require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 f336c149ab32530c9c6ae4408c11558a635f39a1 require users bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 f336c149ab32530c9c6ae4408c11558a635f39a1 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 841a7d554d44f9d0d0b8a1a5a9d0a06ce71a2453 require cookbooks 138bc49d92c0bbb024cea41532a656f2d7f9b072 841a7d554d44f9d0d0b8a1a5a9d0a06ce71a2453 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 085e2f6281914c9fa6521d59fea81f16c106b59f require cookbook_versions f529038064a0259bdecbdab1f9f665e17ddb6136 085e2f6281914c9fa6521d59fea81f16c106b59f require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 04bea39d649e4187d9579bd946fd60f760240d10 require data_bags 85483913f96710c1267c6abacb6568cef9327f15 04bea39d649e4187d9579bd946fd60f760240d10 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 092885e8b5d94a9c1834bf309e02dc0f955ff053 require environments 367c28670efddf25455b9fd33c23a5a278b08bb4 092885e8b5d94a9c1834bf309e02dc0f955ff053 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 6d9587fa4275827c93ca9d7e0166ad1887b76cad require file_checksums f2621482d1c130ea8fee15d09f966685409bf67c 6d9587fa4275827c93ca9d7e0166ad1887b76cad require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 82a95e5e6cbd8ba51fea33506e1edb2a12e37a92 require nodes 911c456769628c817340ee77fc8d2b7c1d697782 82a95e5e6cbd8ba51fea33506e1edb2a12e37a92 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 d052a8267a6512581e5cab1f89a2456f279727b9 require reports db1eb360cd5e6449a468ceb781d82b45dafb5c2d d052a8267a6512581e5cab1f89a2456f279727b9 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 acf76029633d50febbec7c4763b7173078eddaf7 require roles 6a4489d9436ba1541d272700b303410cc906b08f acf76029633d50febbec7c4763b7173078eddaf7 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 b8ef36df686397ecb0fe67eb097e84aa0d78ac6b require sandboxes c4b32778f2911930f583ce15267aade320ac4dcd b8ef36df686397ecb0fe67eb097e84aa0d78ac6b require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 require data_bag_items feddf91b62caed36c790988bd29222591980433b 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 require data_bags 85483913f96710c1267c6abacb6568cef9327f15 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 require goiardi_schema c89b0e25c808b327036c88e6c9750c7526314c86 163ba4a496b9b4210d335e0e4ea5368a9ea8626c require nodes 911c456769628c817340ee77fc8d2b7c1d697782 8bb822f391b499585cfb2fc7248be469b0200682 require node_statuses 163ba4a496b9b4210d335e0e4ea5368a9ea8626c 7c429aac08527adc774767584201f668408b04a6 require nodes 911c456769628c817340ee77fc8d2b7c1d697782 62046d2fb96bbaedce2406252d312766452551c0 require node_statuses 163ba4a496b9b4210d335e0e4ea5368a9ea8626c 68f90e1fd2aac6a117d7697626741a02b8d0ebbe require shovey 82bcace325dbdc905eb6e677f800d14a0506a216 \. -- -- Data for Name: events; Type: TABLE DATA; Schema: sqitch; Owner: - -- COPY events (event, change_id, change, project, note, requires, conflicts, tags, committed_at, committer_name, committer_email, planned_at, planner_name, planner_email) FROM stdin; deploy c89b0e25c808b327036c88e6c9750c7526314c86 goiardi_schema goiardi_postgres Add schema for goiardi-postgres {} {} {} 2014-09-24 21:30:12.905964-07 Jeremy Bingham jbingham@gmail.com 2014-05-27 14:09:07-07 Jeremy Bingham jbingham@gmail.com deploy 367c28670efddf25455b9fd33c23a5a278b08bb4 environments goiardi_postgres Environments for postgres {goiardi_schema} {} {} 2014-09-24 21:30:12.928508-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 00:40:11-07 Jeremy Bingham jbingham@gmail.com deploy 911c456769628c817340ee77fc8d2b7c1d697782 nodes goiardi_postgres Create node table {goiardi_schema} {} {} 2014-09-24 21:30:12.94921-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 10:37:46-07 Jeremy Bingham jbingham@gmail.com deploy faa3571aa479de60f25785e707433b304ba3d2c7 clients goiardi_postgres Create client table {goiardi_schema} {} {} 2014-09-24 21:30:12.969599-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 11:05:33-07 Jeremy Bingham jbingham@gmail.com deploy bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 users goiardi_postgres Create user table {goiardi_schema} {} {} 2014-09-24 21:30:12.995205-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 11:15:02-07 Jeremy Bingham jbingham@gmail.com deploy 138bc49d92c0bbb024cea41532a656f2d7f9b072 cookbooks goiardi_postgres Create cookbook table {goiardi_schema} {} {} 2014-09-24 21:30:13.013206-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 11:27:27-07 Jeremy Bingham jbingham@gmail.com deploy f529038064a0259bdecbdab1f9f665e17ddb6136 cookbook_versions goiardi_postgres Create cookbook versions table {cookbooks,goiardi_schema} {} {} 2014-09-24 21:30:13.031793-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 11:31:34-07 Jeremy Bingham jbingham@gmail.com deploy 85483913f96710c1267c6abacb6568cef9327f15 data_bags goiardi_postgres Create cookbook data bags table {goiardi_schema} {} {} 2014-09-24 21:30:13.050839-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 11:42:04-07 Jeremy Bingham jbingham@gmail.com deploy feddf91b62caed36c790988bd29222591980433b data_bag_items goiardi_postgres Create data bag items table {data_bags,goiardi_schema} {} {} 2014-09-24 21:30:13.070789-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 12:02:31-07 Jeremy Bingham jbingham@gmail.com deploy 6a4489d9436ba1541d272700b303410cc906b08f roles goiardi_postgres Create roles table {goiardi_schema} {} {} 2014-09-24 21:30:13.0901-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 12:09:28-07 Jeremy Bingham jbingham@gmail.com deploy c4b32778f2911930f583ce15267aade320ac4dcd sandboxes goiardi_postgres Create sandboxes table {goiardi_schema} {} {} 2014-09-24 21:30:13.108413-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 12:14:48-07 Jeremy Bingham jbingham@gmail.com deploy 81003655b93b41359804027fc202788aa0ddd9a9 log_infos goiardi_postgres Create log_infos table {clients,users,goiardi_schema} {} {} 2014-09-24 21:30:13.142359-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 12:19:10-07 Jeremy Bingham jbingham@gmail.com deploy fce5b7aeed2ad742de1309d7841577cff19475a7 organizations goiardi_postgres Create organizations table {} {} {} 2014-09-24 21:30:13.16193-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 12:46:28-07 Jeremy Bingham jbingham@gmail.com deploy f2621482d1c130ea8fee15d09f966685409bf67c file_checksums goiardi_postgres Create file checksums table {} {} {} 2014-09-24 21:30:13.18021-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 12:49:19-07 Jeremy Bingham jbingham@gmail.com deploy db1eb360cd5e6449a468ceb781d82b45dafb5c2d reports goiardi_postgres Create reports table {} {} {} 2014-09-24 21:30:13.203369-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 13:02:49-07 Jeremy Bingham jbingham@gmail.com deploy c8b38382f7e5a18f36c621327f59205aa8aa9849 client_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {clients,goiardi_schema} {} {} 2014-09-24 21:30:13.221215-07 Jeremy Bingham jbingham@gmail.com 2014-05-29 23:00:04-07 Jeremy Bingham jbingham@gmail.com deploy 30774a960a0efb6adfbb1d526b8cdb1a45c7d039 client_rename goiardi_postgres Function to rename clients {clients,goiardi_schema} {} {} 2014-09-24 21:30:13.235098-07 Jeremy Bingham jbingham@gmail.com 2014-05-30 10:22:50-07 Jeremy Bingham jbingham@gmail.com deploy 2d1fdc8128b0632e798df7346e76f122ed5915ec user_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {users,goiardi_schema} {} {} 2014-09-24 21:30:13.249911-07 Jeremy Bingham jbingham@gmail.com 2014-05-30 13:07:46-07 Jeremy Bingham jbingham@gmail.com deploy f336c149ab32530c9c6ae4408c11558a635f39a1 user_rename goiardi_postgres Function to rename users {users,goiardi_schema} {} {} 2014-09-24 21:30:13.264442-07 Jeremy Bingham jbingham@gmail.com 2014-05-30 13:15:45-07 Jeremy Bingham jbingham@gmail.com deploy 841a7d554d44f9d0d0b8a1a5a9d0a06ce71a2453 cookbook_insert_update goiardi_postgres Cookbook insert/update {cookbooks,goiardi_schema} {} {} 2014-09-24 21:30:13.281444-07 Jeremy Bingham jbingham@gmail.com 2014-05-30 23:55:23-07 Jeremy Bingham jbingham@gmail.com deploy 085e2f6281914c9fa6521d59fea81f16c106b59f cookbook_versions_insert_update goiardi_postgres Cookbook versions insert/update {cookbook_versions,goiardi_schema} {} {} 2014-09-24 21:30:13.300569-07 Jeremy Bingham jbingham@gmail.com 2014-05-30 23:56:05-07 Jeremy Bingham jbingham@gmail.com deploy 04bea39d649e4187d9579bd946fd60f760240d10 data_bag_insert_update goiardi_postgres Insert/update data bags {data_bags,goiardi_schema} {} {} 2014-09-24 21:30:13.314896-07 Jeremy Bingham jbingham@gmail.com 2014-05-31 23:25:44-07 Jeremy Bingham jbingham@gmail.com deploy 092885e8b5d94a9c1834bf309e02dc0f955ff053 environment_insert_update goiardi_postgres Insert/update environments {environments,goiardi_schema} {} {} 2014-09-24 21:30:13.32947-07 Jeremy Bingham jbingham@gmail.com 2014-06-01 12:55:34-07 Jeremy Bingham jbingham@gmail.com deploy 6d9587fa4275827c93ca9d7e0166ad1887b76cad file_checksum_insert_ignore goiardi_postgres Insert ignore for file checksums {file_checksums,goiardi_schema} {} {} 2014-09-24 21:30:13.344726-07 Jeremy Bingham jbingham@gmail.com 2014-06-01 23:13:48-07 Jeremy Bingham jbingham@gmail.com deploy 82a95e5e6cbd8ba51fea33506e1edb2a12e37a92 node_insert_update goiardi_postgres Insert/update for nodes {nodes,goiardi_schema} {} {} 2014-09-24 21:30:13.358592-07 Jeremy Bingham jbingham@gmail.com 2014-06-01 23:25:20-07 Jeremy Bingham jbingham@gmail.com deploy d052a8267a6512581e5cab1f89a2456f279727b9 report_insert_update goiardi_postgres Insert/update for reports {reports,goiardi_schema} {} {} 2014-09-24 21:30:13.372684-07 Jeremy Bingham jbingham@gmail.com 2014-06-02 10:10:25-07 Jeremy Bingham jbingham@gmail.com deploy acf76029633d50febbec7c4763b7173078eddaf7 role_insert_update goiardi_postgres Insert/update for roles {roles,goiardi_schema} {} {} 2014-09-24 21:30:13.387215-07 Jeremy Bingham jbingham@gmail.com 2014-06-02 10:27:32-07 Jeremy Bingham jbingham@gmail.com deploy b8ef36df686397ecb0fe67eb097e84aa0d78ac6b sandbox_insert_update goiardi_postgres Insert/update for sandboxes {sandboxes,goiardi_schema} {} {} 2014-09-24 21:30:13.401409-07 Jeremy Bingham jbingham@gmail.com 2014-06-02 10:34:39-07 Jeremy Bingham jbingham@gmail.com deploy 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 data_bag_item_insert goiardi_postgres Insert for data bag items {data_bag_items,data_bags,goiardi_schema} {} {@v0.6.0} 2014-09-24 21:30:13.417742-07 Jeremy Bingham jbingham@gmail.com 2014-06-02 14:03:22-07 Jeremy Bingham jbingham@gmail.com deploy c80c561c22f6e139165cdb338c7ce6fff8ff268d bytea_to_json goiardi_postgres Change most postgres bytea fields to json, because in this peculiar case json is way faster than gob {} {} {} 2014-09-24 21:30:13.465841-07 Jeremy Bingham jbingham@gmail.com 2014-07-20 02:41:22-07 Jeremy Bingham jbingham@gmail.com deploy 9966894e0fc0da573243f6a3c0fc1432a2b63043 joined_cookbkook_version goiardi_postgres a convenient view for joined versions for cookbook versions, adapted from erchef's joined_cookbook_version {} {} {@v0.7.0} 2014-09-24 21:30:13.489334-07 Jeremy Bingham jbingham@gmail.com 2014-07-20 03:21:28-07 Jeremy Bingham jbingham@gmail.com deploy 163ba4a496b9b4210d335e0e4ea5368a9ea8626c node_statuses goiardi_postgres Create node_status table for node statuses {nodes} {} {} 2014-09-24 21:30:13.508688-07 Jeremy Bingham jbingham@gmail.com 2014-07-10 23:01:54-07 Jeremy Bingham jeremy@terqa.local deploy 8bb822f391b499585cfb2fc7248be469b0200682 node_status_insert goiardi_postgres insert function for node_statuses {node_statuses} {} {} 2014-09-24 21:30:13.52333-07 Jeremy Bingham jbingham@gmail.com 2014-07-11 00:01:31-07 Jeremy Bingham jeremy@terqa.local deploy 7c429aac08527adc774767584201f668408b04a6 add_down_column_nodes goiardi_postgres Add is_down column to the nodes table {nodes} {} {} 2014-09-24 21:30:13.54375-07 Jeremy Bingham jbingham@gmail.com 2014-07-15 20:18:05-07 Jeremy Bingham jbingham@gmail.com deploy 82bcace325dbdc905eb6e677f800d14a0506a216 shovey goiardi_postgres add shovey tables {} {} {} 2014-09-24 21:30:13.576541-07 Jeremy Bingham jbingham@gmail.com 2014-07-15 22:07:12-07 Jeremy Bingham jeremy@terqa.local deploy 62046d2fb96bbaedce2406252d312766452551c0 node_latest_statuses goiardi_postgres Add a view to easily get nodes by their latest status {node_statuses} {} {} 2014-09-24 21:30:13.599649-07 Jeremy Bingham jbingham@gmail.com 2014-07-26 13:32:02-07 Jeremy Bingham jbingham@gmail.com deploy 68f90e1fd2aac6a117d7697626741a02b8d0ebbe shovey_insert_update goiardi_postgres insert/update functions for shovey {shovey} {} {@v0.8.0} 2014-09-24 21:30:13.618819-07 Jeremy Bingham jbingham@gmail.com 2014-08-27 00:46:20-07 Jeremy Bingham jbingham@gmail.com revert 68f90e1fd2aac6a117d7697626741a02b8d0ebbe shovey_insert_update goiardi_postgres insert/update functions for shovey {shovey} {} {@v0.8.0} 2016-10-24 01:09:31.088-07 Jeremy Bingham jeremy@goiardi.gl 2014-08-27 00:46:20-07 Jeremy Bingham jbingham@gmail.com revert 62046d2fb96bbaedce2406252d312766452551c0 node_latest_statuses goiardi_postgres Add a view to easily get nodes by their latest status {node_statuses} {} {} 2016-10-24 01:09:31.115754-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-26 13:32:02-07 Jeremy Bingham jbingham@gmail.com revert 82bcace325dbdc905eb6e677f800d14a0506a216 shovey goiardi_postgres add shovey tables {} {} {} 2016-10-24 01:09:31.165548-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 22:07:12-07 Jeremy Bingham jeremy@terqa.local revert 7c429aac08527adc774767584201f668408b04a6 add_down_column_nodes goiardi_postgres Add is_down column to the nodes table {nodes} {} {} 2016-10-24 01:09:31.184977-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 20:18:05-07 Jeremy Bingham jbingham@gmail.com revert 8bb822f391b499585cfb2fc7248be469b0200682 node_status_insert goiardi_postgres insert function for node_statuses {node_statuses} {} {} 2016-10-24 01:09:31.202384-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-11 00:01:31-07 Jeremy Bingham jeremy@terqa.local revert 163ba4a496b9b4210d335e0e4ea5368a9ea8626c node_statuses goiardi_postgres Create node_status table for node statuses {nodes} {} {} 2016-10-24 01:09:31.225444-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-10 23:01:54-07 Jeremy Bingham jeremy@terqa.local revert 9966894e0fc0da573243f6a3c0fc1432a2b63043 joined_cookbkook_version goiardi_postgres a convenient view for joined versions for cookbook versions, adapted from erchef's joined_cookbook_version {} {} {@v0.7.0} 2016-10-24 01:09:31.243109-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 03:21:28-07 Jeremy Bingham jbingham@gmail.com revert c80c561c22f6e139165cdb338c7ce6fff8ff268d bytea_to_json goiardi_postgres Change most postgres bytea fields to json, because in this peculiar case json is way faster than gob {} {} {} 2016-10-24 01:09:31.351998-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 02:41:22-07 Jeremy Bingham jbingham@gmail.com revert 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 data_bag_item_insert goiardi_postgres Insert for data bag items {data_bag_items,data_bags,goiardi_schema} {} {@v0.6.0} 2016-10-24 01:09:31.367718-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 14:03:22-07 Jeremy Bingham jbingham@gmail.com revert b8ef36df686397ecb0fe67eb097e84aa0d78ac6b sandbox_insert_update goiardi_postgres Insert/update for sandboxes {sandboxes,goiardi_schema} {} {} 2016-10-24 01:09:31.382719-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:34:39-07 Jeremy Bingham jbingham@gmail.com revert acf76029633d50febbec7c4763b7173078eddaf7 role_insert_update goiardi_postgres Insert/update for roles {roles,goiardi_schema} {} {} 2016-10-24 01:09:31.398701-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:27:32-07 Jeremy Bingham jbingham@gmail.com revert d052a8267a6512581e5cab1f89a2456f279727b9 report_insert_update goiardi_postgres Insert/update for reports {reports,goiardi_schema} {} {} 2016-10-24 01:09:31.414228-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:10:25-07 Jeremy Bingham jbingham@gmail.com revert 82a95e5e6cbd8ba51fea33506e1edb2a12e37a92 node_insert_update goiardi_postgres Insert/update for nodes {nodes,goiardi_schema} {} {} 2016-10-24 01:09:31.429988-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:25:20-07 Jeremy Bingham jbingham@gmail.com revert 6d9587fa4275827c93ca9d7e0166ad1887b76cad file_checksum_insert_ignore goiardi_postgres Insert ignore for file checksums {file_checksums,goiardi_schema} {} {} 2016-10-24 01:09:31.445107-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:13:48-07 Jeremy Bingham jbingham@gmail.com revert 092885e8b5d94a9c1834bf309e02dc0f955ff053 environment_insert_update goiardi_postgres Insert/update environments {environments,goiardi_schema} {} {} 2016-10-24 01:09:31.46088-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 12:55:34-07 Jeremy Bingham jbingham@gmail.com revert 04bea39d649e4187d9579bd946fd60f760240d10 data_bag_insert_update goiardi_postgres Insert/update data bags {data_bags,goiardi_schema} {} {} 2016-10-24 01:09:31.476739-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-31 23:25:44-07 Jeremy Bingham jbingham@gmail.com revert 085e2f6281914c9fa6521d59fea81f16c106b59f cookbook_versions_insert_update goiardi_postgres Cookbook versions insert/update {cookbook_versions,goiardi_schema} {} {} 2016-10-24 01:09:31.492979-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:56:05-07 Jeremy Bingham jbingham@gmail.com revert 841a7d554d44f9d0d0b8a1a5a9d0a06ce71a2453 cookbook_insert_update goiardi_postgres Cookbook insert/update {cookbooks,goiardi_schema} {} {} 2016-10-24 01:09:31.508095-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:55:23-07 Jeremy Bingham jbingham@gmail.com revert f336c149ab32530c9c6ae4408c11558a635f39a1 user_rename goiardi_postgres Function to rename users {users,goiardi_schema} {} {} 2016-10-24 01:09:31.524334-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:15:45-07 Jeremy Bingham jbingham@gmail.com revert 2d1fdc8128b0632e798df7346e76f122ed5915ec user_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {users,goiardi_schema} {} {} 2016-10-24 01:09:31.540773-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:07:46-07 Jeremy Bingham jbingham@gmail.com revert 30774a960a0efb6adfbb1d526b8cdb1a45c7d039 client_rename goiardi_postgres Function to rename clients {clients,goiardi_schema} {} {} 2016-10-24 01:09:31.555915-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 10:22:50-07 Jeremy Bingham jbingham@gmail.com revert c8b38382f7e5a18f36c621327f59205aa8aa9849 client_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {clients,goiardi_schema} {} {} 2016-10-24 01:09:31.57174-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 23:00:04-07 Jeremy Bingham jbingham@gmail.com revert db1eb360cd5e6449a468ceb781d82b45dafb5c2d reports goiardi_postgres Create reports table {} {} {} 2016-10-24 01:09:31.591656-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 13:02:49-07 Jeremy Bingham jbingham@gmail.com revert f2621482d1c130ea8fee15d09f966685409bf67c file_checksums goiardi_postgres Create file checksums table {} {} {} 2016-10-24 01:09:31.612299-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:49:19-07 Jeremy Bingham jbingham@gmail.com revert fce5b7aeed2ad742de1309d7841577cff19475a7 organizations goiardi_postgres Create organizations table {} {} {} 2016-10-24 01:09:31.635748-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:46:28-07 Jeremy Bingham jbingham@gmail.com revert 81003655b93b41359804027fc202788aa0ddd9a9 log_infos goiardi_postgres Create log_infos table {clients,users,goiardi_schema} {} {} 2016-10-24 01:09:31.66493-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:19:10-07 Jeremy Bingham jbingham@gmail.com revert c4b32778f2911930f583ce15267aade320ac4dcd sandboxes goiardi_postgres Create sandboxes table {goiardi_schema} {} {} 2016-10-24 01:09:31.682853-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:14:48-07 Jeremy Bingham jbingham@gmail.com revert 6a4489d9436ba1541d272700b303410cc906b08f roles goiardi_postgres Create roles table {goiardi_schema} {} {} 2016-10-24 01:09:31.702078-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:09:28-07 Jeremy Bingham jbingham@gmail.com revert feddf91b62caed36c790988bd29222591980433b data_bag_items goiardi_postgres Create data bag items table {data_bags,goiardi_schema} {} {} 2016-10-24 01:09:31.720907-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:02:31-07 Jeremy Bingham jbingham@gmail.com revert 85483913f96710c1267c6abacb6568cef9327f15 data_bags goiardi_postgres Create cookbook data bags table {goiardi_schema} {} {} 2016-10-24 01:09:31.7437-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:42:04-07 Jeremy Bingham jbingham@gmail.com revert f529038064a0259bdecbdab1f9f665e17ddb6136 cookbook_versions goiardi_postgres Create cookbook versions table {cookbooks,goiardi_schema} {} {} 2016-10-24 01:09:31.762687-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:31:34-07 Jeremy Bingham jbingham@gmail.com revert 138bc49d92c0bbb024cea41532a656f2d7f9b072 cookbooks goiardi_postgres Create cookbook table {goiardi_schema} {} {} 2016-10-24 01:09:31.785192-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:27:27-07 Jeremy Bingham jbingham@gmail.com revert bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 users goiardi_postgres Create user table {goiardi_schema} {} {} 2016-10-24 01:09:31.808703-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:15:02-07 Jeremy Bingham jbingham@gmail.com revert faa3571aa479de60f25785e707433b304ba3d2c7 clients goiardi_postgres Create client table {goiardi_schema} {} {} 2016-10-24 01:09:31.83197-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:05:33-07 Jeremy Bingham jbingham@gmail.com revert 911c456769628c817340ee77fc8d2b7c1d697782 nodes goiardi_postgres Create node table {goiardi_schema} {} {} 2016-10-24 01:09:31.850634-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 10:37:46-07 Jeremy Bingham jbingham@gmail.com revert 367c28670efddf25455b9fd33c23a5a278b08bb4 environments goiardi_postgres Environments for postgres {goiardi_schema} {} {} 2016-10-24 01:09:31.869442-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 00:40:11-07 Jeremy Bingham jbingham@gmail.com revert c89b0e25c808b327036c88e6c9750c7526314c86 goiardi_schema goiardi_postgres Add schema for goiardi-postgres {} {} {} 2016-10-24 01:09:31.885749-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-27 14:09:07-07 Jeremy Bingham jbingham@gmail.com deploy c89b0e25c808b327036c88e6c9750c7526314c86 goiardi_schema goiardi_postgres Add schema for goiardi-postgres {} {} {} 2016-10-24 01:09:39.168855-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-27 14:09:07-07 Jeremy Bingham jbingham@gmail.com deploy 367c28670efddf25455b9fd33c23a5a278b08bb4 environments goiardi_postgres Environments for postgres {goiardi_schema} {} {} 2016-10-24 01:09:39.198049-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 00:40:11-07 Jeremy Bingham jbingham@gmail.com deploy 911c456769628c817340ee77fc8d2b7c1d697782 nodes goiardi_postgres Create node table {goiardi_schema} {} {} 2016-10-24 01:09:39.222956-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 10:37:46-07 Jeremy Bingham jbingham@gmail.com deploy faa3571aa479de60f25785e707433b304ba3d2c7 clients goiardi_postgres Create client table {goiardi_schema} {} {} 2016-10-24 01:09:39.247841-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:05:33-07 Jeremy Bingham jbingham@gmail.com deploy bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 users goiardi_postgres Create user table {goiardi_schema} {} {} 2016-10-24 01:09:39.269937-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:15:02-07 Jeremy Bingham jbingham@gmail.com deploy 138bc49d92c0bbb024cea41532a656f2d7f9b072 cookbooks goiardi_postgres Create cookbook table {goiardi_schema} {} {} 2016-10-24 01:09:39.292306-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:27:27-07 Jeremy Bingham jbingham@gmail.com deploy f529038064a0259bdecbdab1f9f665e17ddb6136 cookbook_versions goiardi_postgres Create cookbook versions table {cookbooks,goiardi_schema} {} {} 2016-10-24 01:09:39.323669-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:31:34-07 Jeremy Bingham jbingham@gmail.com deploy 85483913f96710c1267c6abacb6568cef9327f15 data_bags goiardi_postgres Create cookbook data bags table {goiardi_schema} {} {} 2016-10-24 01:09:39.346622-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:42:04-07 Jeremy Bingham jbingham@gmail.com deploy feddf91b62caed36c790988bd29222591980433b data_bag_items goiardi_postgres Create data bag items table {data_bags,goiardi_schema} {} {} 2016-10-24 01:09:39.37133-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:02:31-07 Jeremy Bingham jbingham@gmail.com deploy 6a4489d9436ba1541d272700b303410cc906b08f roles goiardi_postgres Create roles table {goiardi_schema} {} {} 2016-10-24 01:09:39.393811-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:09:28-07 Jeremy Bingham jbingham@gmail.com deploy c4b32778f2911930f583ce15267aade320ac4dcd sandboxes goiardi_postgres Create sandboxes table {goiardi_schema} {} {} 2016-10-24 01:09:39.415652-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:14:48-07 Jeremy Bingham jbingham@gmail.com deploy 81003655b93b41359804027fc202788aa0ddd9a9 log_infos goiardi_postgres Create log_infos table {clients,users,goiardi_schema} {} {} 2016-10-24 01:09:39.447295-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:19:10-07 Jeremy Bingham jbingham@gmail.com deploy fce5b7aeed2ad742de1309d7841577cff19475a7 organizations goiardi_postgres Create organizations table {} {} {} 2016-10-24 01:09:39.468147-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:46:28-07 Jeremy Bingham jbingham@gmail.com deploy f2621482d1c130ea8fee15d09f966685409bf67c file_checksums goiardi_postgres Create file checksums table {} {} {} 2016-10-24 01:09:39.494984-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:49:19-07 Jeremy Bingham jbingham@gmail.com deploy db1eb360cd5e6449a468ceb781d82b45dafb5c2d reports goiardi_postgres Create reports table {} {} {} 2016-10-24 01:09:39.520058-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 13:02:49-07 Jeremy Bingham jbingham@gmail.com deploy c8b38382f7e5a18f36c621327f59205aa8aa9849 client_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {clients,goiardi_schema} {} {} 2016-10-24 01:09:39.539611-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 23:00:04-07 Jeremy Bingham jbingham@gmail.com deploy 30774a960a0efb6adfbb1d526b8cdb1a45c7d039 client_rename goiardi_postgres Function to rename clients {clients,goiardi_schema} {} {} 2016-10-24 01:09:39.559639-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 10:22:50-07 Jeremy Bingham jbingham@gmail.com deploy 2d1fdc8128b0632e798df7346e76f122ed5915ec user_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {users,goiardi_schema} {} {} 2016-10-24 01:09:39.578255-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:07:46-07 Jeremy Bingham jbingham@gmail.com deploy f336c149ab32530c9c6ae4408c11558a635f39a1 user_rename goiardi_postgres Function to rename users {users,goiardi_schema} {} {} 2016-10-24 01:09:39.596874-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:15:45-07 Jeremy Bingham jbingham@gmail.com deploy 841a7d554d44f9d0d0b8a1a5a9d0a06ce71a2453 cookbook_insert_update goiardi_postgres Cookbook insert/update {cookbooks,goiardi_schema} {} {} 2016-10-24 01:09:39.614035-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:55:23-07 Jeremy Bingham jbingham@gmail.com deploy 085e2f6281914c9fa6521d59fea81f16c106b59f cookbook_versions_insert_update goiardi_postgres Cookbook versions insert/update {cookbook_versions,goiardi_schema} {} {} 2016-10-24 01:09:39.632293-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:56:05-07 Jeremy Bingham jbingham@gmail.com deploy 04bea39d649e4187d9579bd946fd60f760240d10 data_bag_insert_update goiardi_postgres Insert/update data bags {data_bags,goiardi_schema} {} {} 2016-10-24 01:09:39.649631-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-31 23:25:44-07 Jeremy Bingham jbingham@gmail.com deploy 092885e8b5d94a9c1834bf309e02dc0f955ff053 environment_insert_update goiardi_postgres Insert/update environments {environments,goiardi_schema} {} {} 2016-10-24 01:09:39.668155-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 12:55:34-07 Jeremy Bingham jbingham@gmail.com deploy 6d9587fa4275827c93ca9d7e0166ad1887b76cad file_checksum_insert_ignore goiardi_postgres Insert ignore for file checksums {file_checksums,goiardi_schema} {} {} 2016-10-24 01:09:39.690203-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:13:48-07 Jeremy Bingham jbingham@gmail.com deploy 82a95e5e6cbd8ba51fea33506e1edb2a12e37a92 node_insert_update goiardi_postgres Insert/update for nodes {nodes,goiardi_schema} {} {} 2016-10-24 01:09:39.709134-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:25:20-07 Jeremy Bingham jbingham@gmail.com deploy d052a8267a6512581e5cab1f89a2456f279727b9 report_insert_update goiardi_postgres Insert/update for reports {reports,goiardi_schema} {} {} 2016-10-24 01:09:39.727523-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:10:25-07 Jeremy Bingham jbingham@gmail.com deploy acf76029633d50febbec7c4763b7173078eddaf7 role_insert_update goiardi_postgres Insert/update for roles {roles,goiardi_schema} {} {} 2016-10-24 01:09:39.744685-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:27:32-07 Jeremy Bingham jbingham@gmail.com deploy b8ef36df686397ecb0fe67eb097e84aa0d78ac6b sandbox_insert_update goiardi_postgres Insert/update for sandboxes {sandboxes,goiardi_schema} {} {} 2016-10-24 01:09:39.763319-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:34:39-07 Jeremy Bingham jbingham@gmail.com deploy 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 data_bag_item_insert goiardi_postgres Insert for data bag items {data_bag_items,data_bags,goiardi_schema} {} {@v0.6.0} 2016-10-24 01:09:39.783801-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 14:03:22-07 Jeremy Bingham jbingham@gmail.com deploy c80c561c22f6e139165cdb338c7ce6fff8ff268d bytea_to_json goiardi_postgres Change most postgres bytea fields to json, because in this peculiar case json is way faster than gob {} {} {} 2016-10-24 01:09:39.845109-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 02:41:22-07 Jeremy Bingham jbingham@gmail.com deploy 9966894e0fc0da573243f6a3c0fc1432a2b63043 joined_cookbkook_version goiardi_postgres a convenient view for joined versions for cookbook versions, adapted from erchef's joined_cookbook_version {} {} {@v0.7.0} 2016-10-24 01:09:39.871233-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 03:21:28-07 Jeremy Bingham jbingham@gmail.com deploy 163ba4a496b9b4210d335e0e4ea5368a9ea8626c node_statuses goiardi_postgres Create node_status table for node statuses {nodes} {} {} 2016-10-24 01:09:39.89474-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-10 23:01:54-07 Jeremy Bingham jeremy@terqa.local deploy 8bb822f391b499585cfb2fc7248be469b0200682 node_status_insert goiardi_postgres insert function for node_statuses {node_statuses} {} {} 2016-10-24 01:09:39.912111-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-11 00:01:31-07 Jeremy Bingham jeremy@terqa.local deploy 7c429aac08527adc774767584201f668408b04a6 add_down_column_nodes goiardi_postgres Add is_down column to the nodes table {nodes} {} {} 2016-10-24 01:09:39.938356-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 20:18:05-07 Jeremy Bingham jbingham@gmail.com deploy 82bcace325dbdc905eb6e677f800d14a0506a216 shovey goiardi_postgres add shovey tables {} {} {} 2016-10-24 01:09:39.97688-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 22:07:12-07 Jeremy Bingham jeremy@terqa.local deploy 62046d2fb96bbaedce2406252d312766452551c0 node_latest_statuses goiardi_postgres Add a view to easily get nodes by their latest status {node_statuses} {} {} 2016-10-24 01:09:39.996132-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-26 13:32:02-07 Jeremy Bingham jbingham@gmail.com deploy 68f90e1fd2aac6a117d7697626741a02b8d0ebbe shovey_insert_update goiardi_postgres insert/update functions for shovey {shovey} {} {@v0.8.0} 2016-10-24 01:09:40.014944-07 Jeremy Bingham jeremy@goiardi.gl 2014-08-27 00:46:20-07 Jeremy Bingham jbingham@gmail.com deploy 6f7aa2430e01cf33715828f1957d072cd5006d1c ltree goiardi_postgres Add tables for ltree search for postgres {} {} {} 2016-10-24 01:09:40.114088-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-10 23:21:26-07 Jeremy Bingham jeremy@goiardi.gl deploy e7eb33b00d2fb6302e0c3979e9cac6fb80da377e ltree_del_col goiardi_postgres procedure for deleting search collections {} {} {} 2016-10-24 01:09:40.131941-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-12 12:33:15-07 Jeremy Bingham jeremy@goiardi.gl deploy f49decbb15053ec5691093568450f642578ca460 ltree_del_item goiardi_postgres procedure for deleting search items {} {} {@v0.10.0} 2016-10-24 01:09:40.150306-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-12 13:03:50-07 Jeremy Bingham jeremy@goiardi.gl deploy d87c4dc108d4fa90942cc3bab8e619a58aef3d2d jsonb goiardi_postgres Switch from json to jsonb columns. Will require using postgres 9.4+. {} {} {} 2016-10-24 01:09:40.211033-07 Jeremy Bingham jeremy@goiardi.gl 2016-09-09 01:17:31-07 Jeremy Bingham jeremy@eridu.local revert d87c4dc108d4fa90942cc3bab8e619a58aef3d2d jsonb goiardi_postgres Switch from json to jsonb columns. Will require using postgres 9.4+. {} {} {} 2016-10-24 01:33:27.33499-07 Jeremy Bingham jeremy@goiardi.gl 2016-09-09 01:17:31-07 Jeremy Bingham jeremy@eridu.local revert f49decbb15053ec5691093568450f642578ca460 ltree_del_item goiardi_postgres procedure for deleting search items {} {} {@v0.10.0} 2016-10-24 01:33:27.352346-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-12 13:03:50-07 Jeremy Bingham jeremy@goiardi.gl revert e7eb33b00d2fb6302e0c3979e9cac6fb80da377e ltree_del_col goiardi_postgres procedure for deleting search collections {} {} {} 2016-10-24 01:33:27.368752-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-12 12:33:15-07 Jeremy Bingham jeremy@goiardi.gl revert 6f7aa2430e01cf33715828f1957d072cd5006d1c ltree goiardi_postgres Add tables for ltree search for postgres {} {} {} 2016-10-24 01:33:27.398888-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-10 23:21:26-07 Jeremy Bingham jeremy@goiardi.gl revert 68f90e1fd2aac6a117d7697626741a02b8d0ebbe shovey_insert_update goiardi_postgres insert/update functions for shovey {shovey} {} {@v0.8.0} 2016-10-24 01:33:27.414882-07 Jeremy Bingham jeremy@goiardi.gl 2014-08-27 00:46:20-07 Jeremy Bingham jbingham@gmail.com revert 62046d2fb96bbaedce2406252d312766452551c0 node_latest_statuses goiardi_postgres Add a view to easily get nodes by their latest status {node_statuses} {} {} 2016-10-24 01:33:27.431134-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-26 13:32:02-07 Jeremy Bingham jbingham@gmail.com revert 82bcace325dbdc905eb6e677f800d14a0506a216 shovey goiardi_postgres add shovey tables {} {} {} 2016-10-24 01:33:27.521818-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 22:07:12-07 Jeremy Bingham jeremy@terqa.local revert 7c429aac08527adc774767584201f668408b04a6 add_down_column_nodes goiardi_postgres Add is_down column to the nodes table {nodes} {} {} 2016-10-24 01:33:27.540905-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 20:18:05-07 Jeremy Bingham jbingham@gmail.com revert 8bb822f391b499585cfb2fc7248be469b0200682 node_status_insert goiardi_postgres insert function for node_statuses {node_statuses} {} {} 2016-10-24 01:33:27.557552-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-11 00:01:31-07 Jeremy Bingham jeremy@terqa.local revert 163ba4a496b9b4210d335e0e4ea5368a9ea8626c node_statuses goiardi_postgres Create node_status table for node statuses {nodes} {} {} 2016-10-24 01:33:27.575297-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-10 23:01:54-07 Jeremy Bingham jeremy@terqa.local revert 9966894e0fc0da573243f6a3c0fc1432a2b63043 joined_cookbkook_version goiardi_postgres a convenient view for joined versions for cookbook versions, adapted from erchef's joined_cookbook_version {} {} {@v0.7.0} 2016-10-24 01:33:27.591439-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 03:21:28-07 Jeremy Bingham jbingham@gmail.com revert c80c561c22f6e139165cdb338c7ce6fff8ff268d bytea_to_json goiardi_postgres Change most postgres bytea fields to json, because in this peculiar case json is way faster than gob {} {} {} 2016-10-24 01:33:27.642199-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 02:41:22-07 Jeremy Bingham jbingham@gmail.com revert 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 data_bag_item_insert goiardi_postgres Insert for data bag items {data_bag_items,data_bags,goiardi_schema} {} {@v0.6.0} 2016-10-24 01:33:27.658462-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 14:03:22-07 Jeremy Bingham jbingham@gmail.com revert b8ef36df686397ecb0fe67eb097e84aa0d78ac6b sandbox_insert_update goiardi_postgres Insert/update for sandboxes {sandboxes,goiardi_schema} {} {} 2016-10-24 01:33:27.6743-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:34:39-07 Jeremy Bingham jbingham@gmail.com revert acf76029633d50febbec7c4763b7173078eddaf7 role_insert_update goiardi_postgres Insert/update for roles {roles,goiardi_schema} {} {} 2016-10-24 01:33:27.690205-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:27:32-07 Jeremy Bingham jbingham@gmail.com revert d052a8267a6512581e5cab1f89a2456f279727b9 report_insert_update goiardi_postgres Insert/update for reports {reports,goiardi_schema} {} {} 2016-10-24 01:33:27.706268-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:10:25-07 Jeremy Bingham jbingham@gmail.com revert 82a95e5e6cbd8ba51fea33506e1edb2a12e37a92 node_insert_update goiardi_postgres Insert/update for nodes {nodes,goiardi_schema} {} {} 2016-10-24 01:33:27.721594-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:25:20-07 Jeremy Bingham jbingham@gmail.com revert 6d9587fa4275827c93ca9d7e0166ad1887b76cad file_checksum_insert_ignore goiardi_postgres Insert ignore for file checksums {file_checksums,goiardi_schema} {} {} 2016-10-24 01:33:27.737764-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:13:48-07 Jeremy Bingham jbingham@gmail.com revert 092885e8b5d94a9c1834bf309e02dc0f955ff053 environment_insert_update goiardi_postgres Insert/update environments {environments,goiardi_schema} {} {} 2016-10-24 01:33:27.752713-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 12:55:34-07 Jeremy Bingham jbingham@gmail.com revert 04bea39d649e4187d9579bd946fd60f760240d10 data_bag_insert_update goiardi_postgres Insert/update data bags {data_bags,goiardi_schema} {} {} 2016-10-24 01:33:27.768956-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-31 23:25:44-07 Jeremy Bingham jbingham@gmail.com revert 085e2f6281914c9fa6521d59fea81f16c106b59f cookbook_versions_insert_update goiardi_postgres Cookbook versions insert/update {cookbook_versions,goiardi_schema} {} {} 2016-10-24 01:33:27.783997-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:56:05-07 Jeremy Bingham jbingham@gmail.com revert 841a7d554d44f9d0d0b8a1a5a9d0a06ce71a2453 cookbook_insert_update goiardi_postgres Cookbook insert/update {cookbooks,goiardi_schema} {} {} 2016-10-24 01:33:27.80004-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:55:23-07 Jeremy Bingham jbingham@gmail.com revert f336c149ab32530c9c6ae4408c11558a635f39a1 user_rename goiardi_postgres Function to rename users {users,goiardi_schema} {} {} 2016-10-24 01:33:27.815147-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:15:45-07 Jeremy Bingham jbingham@gmail.com revert 2d1fdc8128b0632e798df7346e76f122ed5915ec user_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {users,goiardi_schema} {} {} 2016-10-24 01:33:27.831373-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:07:46-07 Jeremy Bingham jbingham@gmail.com revert 30774a960a0efb6adfbb1d526b8cdb1a45c7d039 client_rename goiardi_postgres Function to rename clients {clients,goiardi_schema} {} {} 2016-10-24 01:33:27.847257-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 10:22:50-07 Jeremy Bingham jbingham@gmail.com revert c8b38382f7e5a18f36c621327f59205aa8aa9849 client_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {clients,goiardi_schema} {} {} 2016-10-24 01:33:27.863302-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 23:00:04-07 Jeremy Bingham jbingham@gmail.com revert db1eb360cd5e6449a468ceb781d82b45dafb5c2d reports goiardi_postgres Create reports table {} {} {} 2016-10-24 01:33:27.881088-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 13:02:49-07 Jeremy Bingham jbingham@gmail.com revert f2621482d1c130ea8fee15d09f966685409bf67c file_checksums goiardi_postgres Create file checksums table {} {} {} 2016-10-24 01:33:27.899227-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:49:19-07 Jeremy Bingham jbingham@gmail.com revert fce5b7aeed2ad742de1309d7841577cff19475a7 organizations goiardi_postgres Create organizations table {} {} {} 2016-10-24 01:33:27.915959-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:46:28-07 Jeremy Bingham jbingham@gmail.com revert 81003655b93b41359804027fc202788aa0ddd9a9 log_infos goiardi_postgres Create log_infos table {clients,users,goiardi_schema} {} {} 2016-10-24 01:33:27.935047-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:19:10-07 Jeremy Bingham jbingham@gmail.com revert c4b32778f2911930f583ce15267aade320ac4dcd sandboxes goiardi_postgres Create sandboxes table {goiardi_schema} {} {} 2016-10-24 01:33:27.952855-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:14:48-07 Jeremy Bingham jbingham@gmail.com revert 6a4489d9436ba1541d272700b303410cc906b08f roles goiardi_postgres Create roles table {goiardi_schema} {} {} 2016-10-24 01:33:27.970133-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:09:28-07 Jeremy Bingham jbingham@gmail.com revert feddf91b62caed36c790988bd29222591980433b data_bag_items goiardi_postgres Create data bag items table {data_bags,goiardi_schema} {} {} 2016-10-24 01:33:27.987353-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:02:31-07 Jeremy Bingham jbingham@gmail.com revert 85483913f96710c1267c6abacb6568cef9327f15 data_bags goiardi_postgres Create cookbook data bags table {goiardi_schema} {} {} 2016-10-24 01:33:28.005775-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:42:04-07 Jeremy Bingham jbingham@gmail.com revert f529038064a0259bdecbdab1f9f665e17ddb6136 cookbook_versions goiardi_postgres Create cookbook versions table {cookbooks,goiardi_schema} {} {} 2016-10-24 01:33:28.024788-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:31:34-07 Jeremy Bingham jbingham@gmail.com revert 138bc49d92c0bbb024cea41532a656f2d7f9b072 cookbooks goiardi_postgres Create cookbook table {goiardi_schema} {} {} 2016-10-24 01:33:28.044111-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:27:27-07 Jeremy Bingham jbingham@gmail.com revert bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 users goiardi_postgres Create user table {goiardi_schema} {} {} 2016-10-24 01:33:28.062411-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:15:02-07 Jeremy Bingham jbingham@gmail.com revert faa3571aa479de60f25785e707433b304ba3d2c7 clients goiardi_postgres Create client table {goiardi_schema} {} {} 2016-10-24 01:33:28.079896-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:05:33-07 Jeremy Bingham jbingham@gmail.com revert 911c456769628c817340ee77fc8d2b7c1d697782 nodes goiardi_postgres Create node table {goiardi_schema} {} {} 2016-10-24 01:33:28.097722-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 10:37:46-07 Jeremy Bingham jbingham@gmail.com revert 367c28670efddf25455b9fd33c23a5a278b08bb4 environments goiardi_postgres Environments for postgres {goiardi_schema} {} {} 2016-10-24 01:33:28.114591-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 00:40:11-07 Jeremy Bingham jbingham@gmail.com revert c89b0e25c808b327036c88e6c9750c7526314c86 goiardi_schema goiardi_postgres Add schema for goiardi-postgres {} {} {} 2016-10-24 01:33:28.131102-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-27 14:09:07-07 Jeremy Bingham jbingham@gmail.com deploy c89b0e25c808b327036c88e6c9750c7526314c86 goiardi_schema goiardi_postgres Add schema for goiardi-postgres {} {} {} 2016-10-24 01:36:00.171511-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-27 14:09:07-07 Jeremy Bingham jbingham@gmail.com deploy 367c28670efddf25455b9fd33c23a5a278b08bb4 environments goiardi_postgres Environments for postgres {goiardi_schema} {} {} 2016-10-24 01:36:00.194585-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 00:40:11-07 Jeremy Bingham jbingham@gmail.com deploy 911c456769628c817340ee77fc8d2b7c1d697782 nodes goiardi_postgres Create node table {goiardi_schema} {} {} 2016-10-24 01:36:00.219183-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 10:37:46-07 Jeremy Bingham jbingham@gmail.com deploy faa3571aa479de60f25785e707433b304ba3d2c7 clients goiardi_postgres Create client table {goiardi_schema} {} {} 2016-10-24 01:36:00.242051-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:05:33-07 Jeremy Bingham jbingham@gmail.com deploy bb82d8869ffca8ba3d03a1502c50dbb3eee7a2e0 users goiardi_postgres Create user table {goiardi_schema} {} {} 2016-10-24 01:36:00.26513-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:15:02-07 Jeremy Bingham jbingham@gmail.com deploy 138bc49d92c0bbb024cea41532a656f2d7f9b072 cookbooks goiardi_postgres Create cookbook table {goiardi_schema} {} {} 2016-10-24 01:36:00.287013-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:27:27-07 Jeremy Bingham jbingham@gmail.com deploy f529038064a0259bdecbdab1f9f665e17ddb6136 cookbook_versions goiardi_postgres Create cookbook versions table {cookbooks,goiardi_schema} {} {} 2016-10-24 01:36:00.309594-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:31:34-07 Jeremy Bingham jbingham@gmail.com deploy 85483913f96710c1267c6abacb6568cef9327f15 data_bags goiardi_postgres Create cookbook data bags table {goiardi_schema} {} {} 2016-10-24 01:36:00.330929-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 11:42:04-07 Jeremy Bingham jbingham@gmail.com deploy feddf91b62caed36c790988bd29222591980433b data_bag_items goiardi_postgres Create data bag items table {data_bags,goiardi_schema} {} {} 2016-10-24 01:36:00.354029-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:02:31-07 Jeremy Bingham jbingham@gmail.com deploy 6a4489d9436ba1541d272700b303410cc906b08f roles goiardi_postgres Create roles table {goiardi_schema} {} {} 2016-10-24 01:36:00.377437-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:09:28-07 Jeremy Bingham jbingham@gmail.com deploy c4b32778f2911930f583ce15267aade320ac4dcd sandboxes goiardi_postgres Create sandboxes table {goiardi_schema} {} {} 2016-10-24 01:36:00.398405-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:14:48-07 Jeremy Bingham jbingham@gmail.com deploy 81003655b93b41359804027fc202788aa0ddd9a9 log_infos goiardi_postgres Create log_infos table {clients,users,goiardi_schema} {} {} 2016-10-24 01:36:00.425955-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:19:10-07 Jeremy Bingham jbingham@gmail.com deploy fce5b7aeed2ad742de1309d7841577cff19475a7 organizations goiardi_postgres Create organizations table {} {} {} 2016-10-24 01:36:00.448229-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:46:28-07 Jeremy Bingham jbingham@gmail.com deploy f2621482d1c130ea8fee15d09f966685409bf67c file_checksums goiardi_postgres Create file checksums table {} {} {} 2016-10-24 01:36:00.469552-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 12:49:19-07 Jeremy Bingham jbingham@gmail.com deploy db1eb360cd5e6449a468ceb781d82b45dafb5c2d reports goiardi_postgres Create reports table {} {} {} 2016-10-24 01:36:00.494757-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 13:02:49-07 Jeremy Bingham jbingham@gmail.com deploy c8b38382f7e5a18f36c621327f59205aa8aa9849 client_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {clients,goiardi_schema} {} {} 2016-10-24 01:36:00.513896-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-29 23:00:04-07 Jeremy Bingham jbingham@gmail.com deploy 30774a960a0efb6adfbb1d526b8cdb1a45c7d039 client_rename goiardi_postgres Function to rename clients {clients,goiardi_schema} {} {} 2016-10-24 01:36:00.532074-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 10:22:50-07 Jeremy Bingham jbingham@gmail.com deploy 2d1fdc8128b0632e798df7346e76f122ed5915ec user_insert_duplicate goiardi_postgres Function to emulate insert ... on duplicate update for clients {users,goiardi_schema} {} {} 2016-10-24 01:36:00.550093-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:07:46-07 Jeremy Bingham jbingham@gmail.com deploy f336c149ab32530c9c6ae4408c11558a635f39a1 user_rename goiardi_postgres Function to rename users {users,goiardi_schema} {} {} 2016-10-24 01:36:00.568148-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 13:15:45-07 Jeremy Bingham jbingham@gmail.com deploy 841a7d554d44f9d0d0b8a1a5a9d0a06ce71a2453 cookbook_insert_update goiardi_postgres Cookbook insert/update {cookbooks,goiardi_schema} {} {} 2016-10-24 01:36:00.586043-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:55:23-07 Jeremy Bingham jbingham@gmail.com deploy 085e2f6281914c9fa6521d59fea81f16c106b59f cookbook_versions_insert_update goiardi_postgres Cookbook versions insert/update {cookbook_versions,goiardi_schema} {} {} 2016-10-24 01:36:00.604051-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-30 23:56:05-07 Jeremy Bingham jbingham@gmail.com deploy 04bea39d649e4187d9579bd946fd60f760240d10 data_bag_insert_update goiardi_postgres Insert/update data bags {data_bags,goiardi_schema} {} {} 2016-10-24 01:36:00.62237-07 Jeremy Bingham jeremy@goiardi.gl 2014-05-31 23:25:44-07 Jeremy Bingham jbingham@gmail.com deploy 092885e8b5d94a9c1834bf309e02dc0f955ff053 environment_insert_update goiardi_postgres Insert/update environments {environments,goiardi_schema} {} {} 2016-10-24 01:36:00.641359-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 12:55:34-07 Jeremy Bingham jbingham@gmail.com deploy 6d9587fa4275827c93ca9d7e0166ad1887b76cad file_checksum_insert_ignore goiardi_postgres Insert ignore for file checksums {file_checksums,goiardi_schema} {} {} 2016-10-24 01:36:00.65909-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:13:48-07 Jeremy Bingham jbingham@gmail.com deploy 82a95e5e6cbd8ba51fea33506e1edb2a12e37a92 node_insert_update goiardi_postgres Insert/update for nodes {nodes,goiardi_schema} {} {} 2016-10-24 01:36:00.67813-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-01 23:25:20-07 Jeremy Bingham jbingham@gmail.com deploy d052a8267a6512581e5cab1f89a2456f279727b9 report_insert_update goiardi_postgres Insert/update for reports {reports,goiardi_schema} {} {} 2016-10-24 01:36:00.695589-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:10:25-07 Jeremy Bingham jbingham@gmail.com deploy acf76029633d50febbec7c4763b7173078eddaf7 role_insert_update goiardi_postgres Insert/update for roles {roles,goiardi_schema} {} {} 2016-10-24 01:36:00.714295-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:27:32-07 Jeremy Bingham jbingham@gmail.com deploy b8ef36df686397ecb0fe67eb097e84aa0d78ac6b sandbox_insert_update goiardi_postgres Insert/update for sandboxes {sandboxes,goiardi_schema} {} {} 2016-10-24 01:36:00.73281-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 10:34:39-07 Jeremy Bingham jbingham@gmail.com deploy 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 data_bag_item_insert goiardi_postgres Insert for data bag items {data_bag_items,data_bags,goiardi_schema} {} {@v0.6.0} 2016-10-24 01:36:00.751818-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-02 14:03:22-07 Jeremy Bingham jbingham@gmail.com deploy c80c561c22f6e139165cdb338c7ce6fff8ff268d bytea_to_json goiardi_postgres Change most postgres bytea fields to json, because in this peculiar case json is way faster than gob {} {} {} 2016-10-24 01:36:00.808472-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 02:41:22-07 Jeremy Bingham jbingham@gmail.com deploy 9966894e0fc0da573243f6a3c0fc1432a2b63043 joined_cookbkook_version goiardi_postgres a convenient view for joined versions for cookbook versions, adapted from erchef's joined_cookbook_version {} {} {@v0.7.0} 2016-10-24 01:36:00.827828-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 03:21:28-07 Jeremy Bingham jbingham@gmail.com deploy 163ba4a496b9b4210d335e0e4ea5368a9ea8626c node_statuses goiardi_postgres Create node_status table for node statuses {nodes} {} {} 2016-10-24 01:36:00.85042-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-10 23:01:54-07 Jeremy Bingham jeremy@terqa.local deploy 8bb822f391b499585cfb2fc7248be469b0200682 node_status_insert goiardi_postgres insert function for node_statuses {node_statuses} {} {} 2016-10-24 01:36:00.868871-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-11 00:01:31-07 Jeremy Bingham jeremy@terqa.local deploy 7c429aac08527adc774767584201f668408b04a6 add_down_column_nodes goiardi_postgres Add is_down column to the nodes table {nodes} {} {} 2016-10-24 01:36:00.892679-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 20:18:05-07 Jeremy Bingham jbingham@gmail.com deploy 82bcace325dbdc905eb6e677f800d14a0506a216 shovey goiardi_postgres add shovey tables {} {} {} 2016-10-24 01:36:00.929792-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-15 22:07:12-07 Jeremy Bingham jeremy@terqa.local deploy 62046d2fb96bbaedce2406252d312766452551c0 node_latest_statuses goiardi_postgres Add a view to easily get nodes by their latest status {node_statuses} {} {} 2016-10-24 01:36:00.948526-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-26 13:32:02-07 Jeremy Bingham jbingham@gmail.com deploy 68f90e1fd2aac6a117d7697626741a02b8d0ebbe shovey_insert_update goiardi_postgres insert/update functions for shovey {shovey} {} {@v0.8.0} 2016-10-24 01:36:00.968921-07 Jeremy Bingham jeremy@goiardi.gl 2014-08-27 00:46:20-07 Jeremy Bingham jbingham@gmail.com deploy 6f7aa2430e01cf33715828f1957d072cd5006d1c ltree goiardi_postgres Add tables for ltree search for postgres {} {} {} 2016-10-24 01:36:01.021112-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-10 23:21:26-07 Jeremy Bingham jeremy@goiardi.gl deploy e7eb33b00d2fb6302e0c3979e9cac6fb80da377e ltree_del_col goiardi_postgres procedure for deleting search collections {} {} {} 2016-10-24 01:36:01.039484-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-12 12:33:15-07 Jeremy Bingham jeremy@goiardi.gl deploy f49decbb15053ec5691093568450f642578ca460 ltree_del_item goiardi_postgres procedure for deleting search items {} {} {@v0.10.0} 2016-10-24 01:36:01.057822-07 Jeremy Bingham jeremy@goiardi.gl 2015-04-12 13:03:50-07 Jeremy Bingham jeremy@goiardi.gl deploy d87c4dc108d4fa90942cc3bab8e619a58aef3d2d jsonb goiardi_postgres Switch from json to jsonb columns. Will require using postgres 9.4+. {} {} {@v0.11.0} 2016-10-24 01:36:01.115742-07 Jeremy Bingham jeremy@goiardi.gl 2016-09-09 01:17:31-07 Jeremy Bingham jeremy@eridu.local \. -- -- Data for Name: projects; Type: TABLE DATA; Schema: sqitch; Owner: - -- COPY projects (project, uri, created_at, creator_name, creator_email) FROM stdin; goiardi_postgres http://ctdk.github.com/goiardi/postgres-support 2014-09-24 21:30:12.879145-07 Jeremy Bingham jbingham@gmail.com \. -- -- Data for Name: releases; Type: TABLE DATA; Schema: sqitch; Owner: - -- COPY releases (version, installed_at, installer_name, installer_email) FROM stdin; 1 2016-10-24 01:09:26.837866-07 Jeremy Bingham jeremy@goiardi.gl 1.10000002 2016-10-24 01:09:26.879489-07 Jeremy Bingham jeremy@goiardi.gl \. -- -- Data for Name: tags; Type: TABLE DATA; Schema: sqitch; Owner: - -- COPY tags (tag_id, tag, project, change_id, note, committed_at, committer_name, committer_email, planned_at, planner_name, planner_email) FROM stdin; fd6ca4c1426a85718d19687591885a2c2a516952 @v0.6.0 goiardi_postgres 93dbbda50a25da0a586e89ccee8fcfa2ddcb7c64 Tag v0.6.0 for release 2016-10-24 01:36:00.750728-07 Jeremy Bingham jeremy@goiardi.gl 2014-06-27 00:20:56-07 Jeremy Bingham jbingham@gmail.com 10ec54c07a54a2138c04d471dd6d4a2ce25677b1 @v0.7.0 goiardi_postgres 9966894e0fc0da573243f6a3c0fc1432a2b63043 Tag 0.7.0 postgres schema 2016-10-24 01:36:00.826861-07 Jeremy Bingham jeremy@goiardi.gl 2014-07-20 23:04:53-07 Jeremy Bingham jeremy@terqa.local 644417084f02f0e8c6249f6ee0c9bf17b3a037b2 @v0.8.0 goiardi_postgres 68f90e1fd2aac6a117d7697626741a02b8d0ebbe Tag v0.8.0 2016-10-24 01:36:00.967896-07 Jeremy Bingham jeremy@goiardi.gl 2014-09-24 21:17:41-07 Jeremy Bingham jbingham@gmail.com 970e1b9f6fecc093ca76bf75314076afadcdb5fd @v0.10.0 goiardi_postgres f49decbb15053ec5691093568450f642578ca460 Tag the 0.10.0 release. 2016-10-24 01:36:01.056738-07 Jeremy Bingham jeremy@goiardi.gl 2015-07-23 00:21:08-07 Jeremy Bingham jeremy@goiardi.gl d8aefb7cd8b09c8fb3d48244847dcbebe7eeda3e @v0.11.0 goiardi_postgres d87c4dc108d4fa90942cc3bab8e619a58aef3d2d tag the 0.11.0 release schema 2016-10-24 01:36:01.114549-07 Jeremy Bingham jeremy@goiardi.gl 2016-10-24 01:35:53-07 Jeremy Bingham jeremy@goiardi.gl \. SET search_path = goiardi, pg_catalog; -- -- Name: clients_organization_id_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY clients ADD CONSTRAINT clients_organization_id_name_key UNIQUE (organization_id, name); -- -- Name: clients_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY clients ADD CONSTRAINT clients_pkey PRIMARY KEY (id); -- -- Name: cookbook_versions_cookbook_id_major_ver_minor_ver_patch_ver_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY cookbook_versions ADD CONSTRAINT cookbook_versions_cookbook_id_major_ver_minor_ver_patch_ver_key UNIQUE (cookbook_id, major_ver, minor_ver, patch_ver); -- -- Name: cookbook_versions_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY cookbook_versions ADD CONSTRAINT cookbook_versions_pkey PRIMARY KEY (id); -- -- Name: cookbooks_organization_id_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY cookbooks ADD CONSTRAINT cookbooks_organization_id_name_key UNIQUE (organization_id, name); -- -- Name: cookbooks_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY cookbooks ADD CONSTRAINT cookbooks_pkey PRIMARY KEY (id); -- -- Name: data_bag_items_data_bag_id_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY data_bag_items ADD CONSTRAINT data_bag_items_data_bag_id_name_key UNIQUE (data_bag_id, name); -- -- Name: data_bag_items_data_bag_id_orig_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY data_bag_items ADD CONSTRAINT data_bag_items_data_bag_id_orig_name_key UNIQUE (data_bag_id, orig_name); -- -- Name: data_bag_items_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY data_bag_items ADD CONSTRAINT data_bag_items_pkey PRIMARY KEY (id); -- -- Name: data_bags_organization_id_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY data_bags ADD CONSTRAINT data_bags_organization_id_name_key UNIQUE (organization_id, name); -- -- Name: data_bags_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY data_bags ADD CONSTRAINT data_bags_pkey PRIMARY KEY (id); -- -- Name: environments_organization_id_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY environments ADD CONSTRAINT environments_organization_id_name_key UNIQUE (organization_id, name); -- -- Name: environments_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY environments ADD CONSTRAINT environments_pkey PRIMARY KEY (id); -- -- Name: file_checksums_organization_id_checksum_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY file_checksums ADD CONSTRAINT file_checksums_organization_id_checksum_key UNIQUE (organization_id, checksum); -- -- Name: file_checksums_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY file_checksums ADD CONSTRAINT file_checksums_pkey PRIMARY KEY (id); -- -- Name: log_infos_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY log_infos ADD CONSTRAINT log_infos_pkey PRIMARY KEY (id); -- -- Name: node_statuses_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY node_statuses ADD CONSTRAINT node_statuses_pkey PRIMARY KEY (id); -- -- Name: nodes_organization_id_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY nodes ADD CONSTRAINT nodes_organization_id_name_key UNIQUE (organization_id, name); -- -- Name: nodes_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY nodes ADD CONSTRAINT nodes_pkey PRIMARY KEY (id); -- -- Name: organizations_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY organizations ADD CONSTRAINT organizations_name_key UNIQUE (name); -- -- Name: organizations_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY organizations ADD CONSTRAINT organizations_pkey PRIMARY KEY (id); -- -- Name: reports_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY reports ADD CONSTRAINT reports_pkey PRIMARY KEY (id); -- -- Name: reports_run_id_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY reports ADD CONSTRAINT reports_run_id_key UNIQUE (run_id); -- -- Name: roles_organization_id_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY roles ADD CONSTRAINT roles_organization_id_name_key UNIQUE (organization_id, name); -- -- Name: roles_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY roles ADD CONSTRAINT roles_pkey PRIMARY KEY (id); -- -- Name: sandboxes_organization_id_sbox_id_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY sandboxes ADD CONSTRAINT sandboxes_organization_id_sbox_id_key UNIQUE (organization_id, sbox_id); -- -- Name: sandboxes_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY sandboxes ADD CONSTRAINT sandboxes_pkey PRIMARY KEY (id); -- -- Name: search_collections_organization_id_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY search_collections ADD CONSTRAINT search_collections_organization_id_name_key UNIQUE (organization_id, name); -- -- Name: search_collections_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY search_collections ADD CONSTRAINT search_collections_pkey PRIMARY KEY (id); -- -- Name: search_items_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY search_items ADD CONSTRAINT search_items_pkey PRIMARY KEY (id); -- -- Name: shovey_run_streams_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shovey_run_streams ADD CONSTRAINT shovey_run_streams_pkey PRIMARY KEY (id); -- -- Name: shovey_run_streams_shovey_run_id_output_type_seq_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shovey_run_streams ADD CONSTRAINT shovey_run_streams_shovey_run_id_output_type_seq_key UNIQUE (shovey_run_id, output_type, seq); -- -- Name: shovey_runs_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shovey_runs ADD CONSTRAINT shovey_runs_pkey PRIMARY KEY (id); -- -- Name: shovey_runs_shovey_id_node_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shovey_runs ADD CONSTRAINT shovey_runs_shovey_id_node_name_key UNIQUE (shovey_id, node_name); -- -- Name: shoveys_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shoveys ADD CONSTRAINT shoveys_pkey PRIMARY KEY (id); -- -- Name: shoveys_run_id_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shoveys ADD CONSTRAINT shoveys_run_id_key UNIQUE (run_id); -- -- Name: users_email_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY users ADD CONSTRAINT users_email_key UNIQUE (email); -- -- Name: users_name_key; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY users ADD CONSTRAINT users_name_key UNIQUE (name); -- -- Name: users_pkey; Type: CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY users ADD CONSTRAINT users_pkey PRIMARY KEY (id); SET search_path = sqitch, pg_catalog; -- -- Name: changes_pkey; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY changes ADD CONSTRAINT changes_pkey PRIMARY KEY (change_id); -- -- Name: changes_project_script_hash_key; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY changes ADD CONSTRAINT changes_project_script_hash_key UNIQUE (project, script_hash); -- -- Name: dependencies_pkey; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY dependencies ADD CONSTRAINT dependencies_pkey PRIMARY KEY (change_id, dependency); -- -- Name: events_pkey; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY events ADD CONSTRAINT events_pkey PRIMARY KEY (change_id, committed_at); -- -- Name: projects_pkey; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY projects ADD CONSTRAINT projects_pkey PRIMARY KEY (project); -- -- Name: projects_uri_key; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY projects ADD CONSTRAINT projects_uri_key UNIQUE (uri); -- -- Name: releases_pkey; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY releases ADD CONSTRAINT releases_pkey PRIMARY KEY (version); -- -- Name: tags_pkey; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY tags ADD CONSTRAINT tags_pkey PRIMARY KEY (tag_id); -- -- Name: tags_project_tag_key; Type: CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY tags ADD CONSTRAINT tags_project_tag_key UNIQUE (project, tag); SET search_path = goiardi, pg_catalog; -- -- Name: log_info_orgs; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX log_info_orgs ON log_infos USING btree (organization_id); -- -- Name: log_infos_action; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX log_infos_action ON log_infos USING btree (action); -- -- Name: log_infos_actor; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX log_infos_actor ON log_infos USING btree (actor_id); -- -- Name: log_infos_obj; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX log_infos_obj ON log_infos USING btree (object_type, object_name); -- -- Name: log_infos_time; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX log_infos_time ON log_infos USING btree ("time"); -- -- Name: node_is_down; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX node_is_down ON nodes USING btree (is_down); -- -- Name: node_status_status; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX node_status_status ON node_statuses USING btree (status); -- -- Name: node_status_time; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX node_status_time ON node_statuses USING btree (updated_at); -- -- Name: nodes_chef_env; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX nodes_chef_env ON nodes USING btree (chef_environment); -- -- Name: report_node_organization; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX report_node_organization ON reports USING btree (node_name, organization_id); -- -- Name: report_organization_id; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX report_organization_id ON reports USING btree (organization_id); -- -- Name: search_btree_idx; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_btree_idx ON search_items USING btree (path); -- -- Name: search_col_name; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_col_name ON search_collections USING btree (name); -- -- Name: search_gist_idx; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_gist_idx ON search_items USING gist (path); -- -- Name: search_item_val_trgm; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_item_val_trgm ON search_items USING gist (value gist_trgm_ops); -- -- Name: search_multi_gist_idx; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_multi_gist_idx ON search_items USING gist (path, value gist_trgm_ops); -- -- Name: search_org_col; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_org_col ON search_items USING btree (organization_id, search_collection_id); -- -- Name: search_org_col_name; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_org_col_name ON search_items USING btree (organization_id, search_collection_id, item_name); -- -- Name: search_org_id; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_org_id ON search_items USING btree (organization_id); -- -- Name: search_val; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX search_val ON search_items USING btree (value); -- -- Name: shovey_organization_id; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX shovey_organization_id ON shoveys USING btree (organization_id); -- -- Name: shovey_organization_run_id; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX shovey_organization_run_id ON shoveys USING btree (run_id, organization_id); -- -- Name: shovey_run_node_name; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX shovey_run_node_name ON shovey_runs USING btree (node_name); -- -- Name: shovey_run_run_id; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX shovey_run_run_id ON shovey_runs USING btree (shovey_uuid); -- -- Name: shovey_run_status; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX shovey_run_status ON shovey_runs USING btree (status); -- -- Name: shovey_stream; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX shovey_stream ON shovey_run_streams USING btree (shovey_run_id, output_type); -- -- Name: shovey_uuid_node; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX shovey_uuid_node ON shovey_runs USING btree (shovey_uuid, node_name); -- -- Name: shoveys_status; Type: INDEX; Schema: goiardi; Owner: - -- CREATE INDEX shoveys_status ON shoveys USING btree (status); -- -- Name: insert_ignore; Type: RULE; Schema: goiardi; Owner: - -- CREATE RULE insert_ignore AS ON INSERT TO file_checksums WHERE (EXISTS ( SELECT 1 FROM file_checksums WHERE ((file_checksums.organization_id = new.organization_id) AND ((file_checksums.checksum)::text = (new.checksum)::text)))) DO INSTEAD NOTHING; -- -- Name: cookbook_versions_cookbook_id_fkey; Type: FK CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY cookbook_versions ADD CONSTRAINT cookbook_versions_cookbook_id_fkey FOREIGN KEY (cookbook_id) REFERENCES cookbooks(id) ON DELETE RESTRICT; -- -- Name: data_bag_items_data_bag_id_fkey; Type: FK CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY data_bag_items ADD CONSTRAINT data_bag_items_data_bag_id_fkey FOREIGN KEY (data_bag_id) REFERENCES data_bags(id) ON DELETE RESTRICT; -- -- Name: node_statuses_node_id_fkey; Type: FK CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY node_statuses ADD CONSTRAINT node_statuses_node_id_fkey FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE; -- -- Name: search_items_search_collection_id_fkey; Type: FK CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY search_items ADD CONSTRAINT search_items_search_collection_id_fkey FOREIGN KEY (search_collection_id) REFERENCES search_collections(id) ON DELETE RESTRICT; -- -- Name: shovey_run_streams_shovey_run_id_fkey; Type: FK CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shovey_run_streams ADD CONSTRAINT shovey_run_streams_shovey_run_id_fkey FOREIGN KEY (shovey_run_id) REFERENCES shovey_runs(id) ON DELETE RESTRICT; -- -- Name: shovey_runs_shovey_id_fkey; Type: FK CONSTRAINT; Schema: goiardi; Owner: - -- ALTER TABLE ONLY shovey_runs ADD CONSTRAINT shovey_runs_shovey_id_fkey FOREIGN KEY (shovey_id) REFERENCES shoveys(id) ON DELETE RESTRICT; SET search_path = sqitch, pg_catalog; -- -- Name: changes_project_fkey; Type: FK CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY changes ADD CONSTRAINT changes_project_fkey FOREIGN KEY (project) REFERENCES projects(project) ON UPDATE CASCADE; -- -- Name: dependencies_change_id_fkey; Type: FK CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY dependencies ADD CONSTRAINT dependencies_change_id_fkey FOREIGN KEY (change_id) REFERENCES changes(change_id) ON UPDATE CASCADE ON DELETE CASCADE; -- -- Name: dependencies_dependency_id_fkey; Type: FK CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY dependencies ADD CONSTRAINT dependencies_dependency_id_fkey FOREIGN KEY (dependency_id) REFERENCES changes(change_id) ON UPDATE CASCADE; -- -- Name: events_project_fkey; Type: FK CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY events ADD CONSTRAINT events_project_fkey FOREIGN KEY (project) REFERENCES projects(project) ON UPDATE CASCADE; -- -- Name: tags_change_id_fkey; Type: FK CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY tags ADD CONSTRAINT tags_change_id_fkey FOREIGN KEY (change_id) REFERENCES changes(change_id) ON UPDATE CASCADE; -- -- Name: tags_project_fkey; Type: FK CONSTRAINT; Schema: sqitch; Owner: - -- ALTER TABLE ONLY tags ADD CONSTRAINT tags_project_fkey FOREIGN KEY (project) REFERENCES projects(project) ON UPDATE CASCADE; -- -- PostgreSQL database dump complete --
the_stack
-- 2017-07-26T14:40:30.918 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Zugeordnet',Updated=TO_TIMESTAMP('2017-07-26 14:40:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4266 ; -- 2017-07-26T14:41:09.699 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='Zeigt an ob eine Zahlung bereits zugeordnet wurde', Help='', Name='Zugeordnet', PrintName='Zugeordnet',Updated=TO_TIMESTAMP('2017-07-26 14:41:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1508 ; -- 2017-07-26T14:41:09.701 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsAllocated', Name='Zugeordnet', Description='Zeigt an ob eine Zahlung bereits zugeordnet wurde', Help='' WHERE AD_Element_ID=1508 ; -- 2017-07-26T14:41:09.716 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAllocated', Name='Zugeordnet', Description='Zeigt an ob eine Zahlung bereits zugeordnet wurde', Help='', AD_Element_ID=1508 WHERE UPPER(ColumnName)='ISALLOCATED' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-07-26T14:41:09.718 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAllocated', Name='Zugeordnet', Description='Zeigt an ob eine Zahlung bereits zugeordnet wurde', Help='' WHERE AD_Element_ID=1508 AND IsCentrallyMaintained='Y' ; -- 2017-07-26T14:41:09.719 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Zugeordnet', Description='Zeigt an ob eine Zahlung bereits zugeordnet wurde', Help='' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=1508) AND IsCentrallyMaintained='Y' ; -- 2017-07-26T14:41:09.736 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Zugeordnet', Name='Zugeordnet' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=1508) ; -- 2017-07-26T14:42:25.315 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Abgeglichen',Updated=TO_TIMESTAMP('2017-07-26 14:42:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4040 ; -- 2017-07-26T14:43:07.809 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='Zeigt an ob eine Zahlung bereits mit einem Kontoauszug abgeglichen wurde', Name='Abgeglichen', PrintName='Abgeglichen',Updated=TO_TIMESTAMP('2017-07-26 14:43:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1105 ; -- 2017-07-26T14:43:07.815 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsReconciled', Name='Abgeglichen', Description='Zeigt an ob eine Zahlung bereits mit einem Kontoauszug abgeglichen wurde', Help=NULL WHERE AD_Element_ID=1105 ; -- 2017-07-26T14:43:07.842 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsReconciled', Name='Abgeglichen', Description='Zeigt an ob eine Zahlung bereits mit einem Kontoauszug abgeglichen wurde', Help=NULL, AD_Element_ID=1105 WHERE UPPER(ColumnName)='ISRECONCILED' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-07-26T14:43:07.845 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsReconciled', Name='Abgeglichen', Description='Zeigt an ob eine Zahlung bereits mit einem Kontoauszug abgeglichen wurde', Help=NULL WHERE AD_Element_ID=1105 AND IsCentrallyMaintained='Y' ; -- 2017-07-26T14:43:07.848 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Abgeglichen', Description='Zeigt an ob eine Zahlung bereits mit einem Kontoauszug abgeglichen wurde', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=1105) AND IsCentrallyMaintained='Y' ; -- 2017-07-26T14:43:07.887 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Abgeglichen', Name='Abgeglichen' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=1105) ; -- 2017-07-26T14:44:58.399 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-07-26 14:44:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541197 ; -- 2017-07-26T14:44:58.403 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-07-26 14:44:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541198 ; -- 2017-07-26T14:44:58.404 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2017-07-26 14:44:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541189 ; -- 2017-07-26T15:14:59.857 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET IsActive='N',Updated=TO_TIMESTAMP('2017-07-26 15:14:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=755 ; -- 2017-07-26T15:16:24.152 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET IsActive='Y', Name='Manuelle Zuordnung', SeqNo=40,Updated=TO_TIMESTAMP('2017-07-26 15:16:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=755 ; -- 2017-07-26T15:23:37.602 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Abschreibung Betrag',Updated=TO_TIMESTAMP('2017-07-26 15:23:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556330 ; -- 2017-07-26T15:23:50.121 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='Abschreibung Betrag', Name='Abschreibung Betrag', PrintName='Abschreibung Betrag',Updated=TO_TIMESTAMP('2017-07-26 15:23:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=542893 ; -- 2017-07-26T15:23:50.124 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='PaymentWriteOffAmt', Name='Abschreibung Betrag', Description='Abschreibung Betrag', Help=NULL WHERE AD_Element_ID=542893 ; -- 2017-07-26T15:23:50.140 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='PaymentWriteOffAmt', Name='Abschreibung Betrag', Description='Abschreibung Betrag', Help=NULL, AD_Element_ID=542893 WHERE UPPER(ColumnName)='PAYMENTWRITEOFFAMT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-07-26T15:23:50.142 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='PaymentWriteOffAmt', Name='Abschreibung Betrag', Description='Abschreibung Betrag', Help=NULL WHERE AD_Element_ID=542893 AND IsCentrallyMaintained='Y' ; -- 2017-07-26T15:23:50.143 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Abschreibung Betrag', Description='Abschreibung Betrag', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=542893) AND IsCentrallyMaintained='Y' ; -- 2017-07-26T15:23:50.159 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Abschreibung Betrag', Name='Abschreibung Betrag' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=542893) ; -- 2017-07-26T15:24:43.226 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-07-26 15:24:43','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Write-off Amount',PrintName='Write-off Amount' WHERE AD_Element_ID=542893 AND AD_Language='en_US' ; -- 2017-07-26T15:24:43.236 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(542893,'en_US') ; -- 2017-07-26T15:26:38.638 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Vorauszahlung',Updated=TO_TIMESTAMP('2017-07-26 15:26:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11013 ; -- 2017-07-26T15:27:09.500 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='Die Zahlung ist eine Vorauszahlung', Help='', Name='Vorauszahlung', PrintName='Vorauszahlung',Updated=TO_TIMESTAMP('2017-07-26 15:27:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=2663 ; -- 2017-07-26T15:27:09.502 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsPrepayment', Name='Vorauszahlung', Description='Die Zahlung ist eine Vorauszahlung', Help='' WHERE AD_Element_ID=2663 ; -- 2017-07-26T15:27:09.510 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsPrepayment', Name='Vorauszahlung', Description='Die Zahlung ist eine Vorauszahlung', Help='', AD_Element_ID=2663 WHERE UPPER(ColumnName)='ISPREPAYMENT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-07-26T15:27:09.511 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsPrepayment', Name='Vorauszahlung', Description='Die Zahlung ist eine Vorauszahlung', Help='' WHERE AD_Element_ID=2663 AND IsCentrallyMaintained='Y' ; -- 2017-07-26T15:27:09.512 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Vorauszahlung', Description='Die Zahlung ist eine Vorauszahlung', Help='' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=2663) AND IsCentrallyMaintained='Y' ; -- 2017-07-26T15:27:09.523 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Vorauszahlung', Name='Vorauszahlung' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=2663) ; -- 2017-07-26T15:28:54.815 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4133,0,330,540064,547161,TO_TIMESTAMP('2017-07-26 15:28:54','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Zahlungsbetrag',40,0,0,TO_TIMESTAMP('2017-07-26 15:28:54','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T15:29:06.201 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='S',Updated=TO_TIMESTAMP('2017-07-26 15:29:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547161 ; -- 2017-07-26T15:29:37.660 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541195 ; -- 2017-07-26T15:30:35.253 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540049,540955,TO_TIMESTAMP('2017-07-26 15:30:35','YYYY-MM-DD HH24:MI:SS'),100,'Y','order invoice',20,TO_TIMESTAMP('2017-07-26 15:30:35','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T15:30:49.335 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,10902,0,330,540955,547162,TO_TIMESTAMP('2017-07-26 15:30:49','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Auftrag',10,0,0,TO_TIMESTAMP('2017-07-26 15:30:49','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T15:30:58.142 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4257,0,330,540955,547163,TO_TIMESTAMP('2017-07-26 15:30:58','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Rechnung',20,0,0,TO_TIMESTAMP('2017-07-26 15:30:58','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T15:31:08.978 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,6969,0,330,540955,547164,TO_TIMESTAMP('2017-07-26 15:31:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Kosten',30,0,0,TO_TIMESTAMP('2017-07-26 15:31:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T15:31:19.383 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,7809,0,330,540955,547165,TO_TIMESTAMP('2017-07-26 15:31:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Kostenstelle',40,0,0,TO_TIMESTAMP('2017-07-26 15:31:19','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:23:38.358 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4129,0,330,540064,547166,TO_TIMESTAMP('2017-07-26 16:23:38','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Währung',50,0,0,TO_TIMESTAMP('2017-07-26 16:23:38','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:23:44.349 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='S',Updated=TO_TIMESTAMP('2017-07-26 16:23:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547166 ; -- 2017-07-26T16:26:09.791 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4132,0,330,540065,547167,TO_TIMESTAMP('2017-07-26 16:26:09','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Belegart',80,0,0,TO_TIMESTAMP('2017-07-26 16:26:09','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:26:20.862 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=10, WidgetSize='S',Updated=TO_TIMESTAMP('2017-07-26 16:26:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547167 ; -- 2017-07-26T16:26:36.409 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET Name='Datum', SeqNo=20,Updated=TO_TIMESTAMP('2017-07-26 16:26:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541192 ; -- 2017-07-26T16:26:40.582 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541193 ; -- 2017-07-26T16:27:43.565 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET Name='Nr.', SeqNo=20,Updated=TO_TIMESTAMP('2017-07-26 16:27:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541209 ; -- 2017-07-26T16:28:04.042 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541208 ; -- 2017-07-26T16:28:15.054 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2017-07-26 16:28:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541210 ; -- 2017-07-26T16:28:41.843 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541194 ; -- 2017-07-26T16:28:48.711 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541211 ; -- 2017-07-26T16:29:15.325 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Nr.',Updated=TO_TIMESTAMP('2017-07-26 16:29:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4267 ; -- 2017-07-26T16:29:22.243 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Datum',Updated=TO_TIMESTAMP('2017-07-26 16:29:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4265 ; -- 2017-07-26T16:29:32.395 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-07-26 16:29:32','YYYY-MM-DD HH24:MI:SS'),Name='No.' WHERE AD_Field_ID=4267 AND AD_Language='en_US' ; -- 2017-07-26T16:29:42.434 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-07-26 16:29:42','YYYY-MM-DD HH24:MI:SS'),Name='Date' WHERE AD_Field_ID=4265 AND AD_Language='en_US' ; -- 2017-07-26T16:30:26.742 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541197 ; -- 2017-07-26T16:30:26.758 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541198 ; -- 2017-07-26T16:30:26.767 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541199 ; -- 2017-07-26T16:30:26.775 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541200 ; -- 2017-07-26T16:30:30.528 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_ElementGroup WHERE AD_UI_ElementGroup_ID=540066 ; -- 2017-07-26T16:30:36.825 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Column WHERE AD_UI_Column_ID=540054 ; -- 2017-07-26T16:31:15.735 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540050,540956,TO_TIMESTAMP('2017-07-26 16:31:15','YYYY-MM-DD HH24:MI:SS'),100,'Y','flags',20,TO_TIMESTAMP('2017-07-26 16:31:15','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:31:19.517 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540050,540957,TO_TIMESTAMP('2017-07-26 16:31:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','org',30,TO_TIMESTAMP('2017-07-26 16:31:19','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:31:28.099 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4018,0,330,540957,547168,TO_TIMESTAMP('2017-07-26 16:31:28','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Sektion',10,0,0,TO_TIMESTAMP('2017-07-26 16:31:28','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:31:35.564 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4017,0,330,540957,547169,TO_TIMESTAMP('2017-07-26 16:31:35','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Mandant',20,0,0,TO_TIMESTAMP('2017-07-26 16:31:35','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:31:57.905 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4933,0,330,540956,547170,TO_TIMESTAMP('2017-07-26 16:31:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Zahlungseingang',10,0,0,TO_TIMESTAMP('2017-07-26 16:31:57','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:32:11.095 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,11013,0,330,540956,547171,TO_TIMESTAMP('2017-07-26 16:32:11','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Vorauszahlung',20,0,0,TO_TIMESTAMP('2017-07-26 16:32:11','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:32:36.743 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4040,0,330,540956,547172,TO_TIMESTAMP('2017-07-26 16:32:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Abgeglichen',30,0,0,TO_TIMESTAMP('2017-07-26 16:32:36','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:32:57.616 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,4266,0,330,540956,547173,TO_TIMESTAMP('2017-07-26 16:32:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Zugeordnet',40,0,0,TO_TIMESTAMP('2017-07-26 16:32:57','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T16:33:16.463 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541201 ; -- 2017-07-26T16:33:16.476 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541202 ; -- 2017-07-26T16:33:16.484 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541203 ; -- 2017-07-26T16:33:16.493 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541204 ; -- 2017-07-26T16:33:16.500 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=541205 ; -- 2017-07-26T16:33:20.068 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_ElementGroup WHERE AD_UI_ElementGroup_ID=540067 ; -- 2017-07-26T16:33:23.960 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Column WHERE AD_UI_Column_ID=540055 ; -- 2017-07-26T16:33:29.028 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Section_Trl WHERE AD_UI_Section_ID=540039 ; -- 2017-07-26T16:33:29.033 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Section WHERE AD_UI_Section_ID=540039 ; -- 2017-07-26T16:34:52.789 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540065, SeqNo=30,Updated=TO_TIMESTAMP('2017-07-26 16:34:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547170 ; -- 2017-07-26T16:35:00.519 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540065, SeqNo=40,Updated=TO_TIMESTAMP('2017-07-26 16:35:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547171 ; -- 2017-07-26T16:35:07.037 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540065, SeqNo=50,Updated=TO_TIMESTAMP('2017-07-26 16:35:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547172 ; -- 2017-07-26T16:35:13.645 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540065, SeqNo=60,Updated=TO_TIMESTAMP('2017-07-26 16:35:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547173 ; -- 2017-07-26T16:35:52.236 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=25,Updated=TO_TIMESTAMP('2017-07-26 16:35:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541192 ; -- 2017-07-26T16:56:36.477 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-07-26 16:56:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541189 ; -- 2017-07-26T16:56:36.479 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-07-26 16:56:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547161 ; -- 2017-07-26T16:56:36.480 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-07-26 16:56:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547166 ; -- 2017-07-26T16:56:36.482 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-07-26 16:56:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547173 ; -- 2017-07-26T16:56:36.484 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-07-26 16:56:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547172 ; -- 2017-07-26T16:56:36.490 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2017-07-26 16:56:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547163 ; -- 2017-07-26T16:56:36.491 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=100,Updated=TO_TIMESTAMP('2017-07-26 16:56:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547168 ; -- 2017-07-26T17:13:25.316 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Skonto',Updated=TO_TIMESTAMP('2017-07-26 17:13:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11072 ; -- 2017-07-26T17:13:56.645 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Name='Skonto', PrintName='Skonto',Updated=TO_TIMESTAMP('2017-07-26 17:13:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1395 ; -- 2017-07-26T17:13:56.647 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='DiscountAmt', Name='Skonto', Description='Calculated amount of discount', Help='The Discount Amount indicates the discount amount for a document or line.' WHERE AD_Element_ID=1395 ; -- 2017-07-26T17:13:56.660 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='DiscountAmt', Name='Skonto', Description='Calculated amount of discount', Help='The Discount Amount indicates the discount amount for a document or line.', AD_Element_ID=1395 WHERE UPPER(ColumnName)='DISCOUNTAMT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-07-26T17:13:56.661 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='DiscountAmt', Name='Skonto', Description='Calculated amount of discount', Help='The Discount Amount indicates the discount amount for a document or line.' WHERE AD_Element_ID=1395 AND IsCentrallyMaintained='Y' ; -- 2017-07-26T17:13:56.662 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Skonto', Description='Calculated amount of discount', Help='The Discount Amount indicates the discount amount for a document or line.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=1395) AND IsCentrallyMaintained='Y' ; -- 2017-07-26T17:13:56.698 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Skonto', Name='Skonto' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=1395) ; -- 2017-07-26T17:15:37.048 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N',Updated=TO_TIMESTAMP('2017-07-26 17:15:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556330 ; -- 2017-07-26T17:15:46.081 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y',Updated=TO_TIMESTAMP('2017-07-26 17:15:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556330 ; -- 2017-07-26T17:16:48.109 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541172 ; -- 2017-07-26T17:16:48.110 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541177 ; -- 2017-07-26T17:16:48.111 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541168 ; -- 2017-07-26T17:16:48.112 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541169 ; -- 2017-07-26T17:16:48.113 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541170 ; -- 2017-07-26T17:16:48.114 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541171 ; -- 2017-07-26T17:16:48.115 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541173 ; -- 2017-07-26T17:16:48.116 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541174 ; -- 2017-07-26T17:16:48.117 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541175 ; -- 2017-07-26T17:16:48.118 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541176 ; -- 2017-07-26T17:16:48.119 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-07-26 17:16:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541167 ; -- 2017-07-26T17:17:00.593 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=10,Updated=TO_TIMESTAMP('2017-07-26 17:17:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541170 ; -- 2017-07-26T17:17:04.670 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=20,Updated=TO_TIMESTAMP('2017-07-26 17:17:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541171 ; -- 2017-07-26T17:17:07.117 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=30,Updated=TO_TIMESTAMP('2017-07-26 17:17:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541173 ; -- 2017-07-26T17:17:09.520 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=40,Updated=TO_TIMESTAMP('2017-07-26 17:17:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541174 ; -- 2017-07-26T17:17:14.262 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=50,Updated=TO_TIMESTAMP('2017-07-26 17:17:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541175 ; -- 2017-07-26T17:17:16.517 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=60,Updated=TO_TIMESTAMP('2017-07-26 17:17:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541176 ; -- 2017-07-26T17:17:19.266 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=70,Updated=TO_TIMESTAMP('2017-07-26 17:17:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541167 ; -- 2017-07-26T17:31:40.251 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=10,Updated=TO_TIMESTAMP('2017-07-26 17:31:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541170 ; -- 2017-07-26T17:31:40.255 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=20,Updated=TO_TIMESTAMP('2017-07-26 17:31:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541171 ; -- 2017-07-26T17:31:40.260 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=30,Updated=TO_TIMESTAMP('2017-07-26 17:31:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541173 ; -- 2017-07-26T17:32:16.096 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-07-26 17:32:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541181 ; -- 2017-07-26T17:32:16.099 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-07-26 17:32:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541182 ; -- 2017-07-26T17:32:16.100 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-07-26 17:32:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541183 ; -- 2017-07-26T17:32:16.102 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-07-26 17:32:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541184 ; -- 2017-07-26T17:32:16.103 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-07-26 17:32:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541185 ; -- 2017-07-26T17:32:16.104 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-07-26 17:32:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541186 ; -- 2017-07-26T17:32:16.105 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2017-07-26 17:32:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541187 ; -- 2017-07-26T17:32:30.794 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Datum',Updated=TO_TIMESTAMP('2017-07-26 17:32:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556401 ; -- 2017-07-26T17:32:36.730 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Betrag',Updated=TO_TIMESTAMP('2017-07-26 17:32:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556394 ; -- 2017-07-26T17:32:43.396 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Abschreibung',Updated=TO_TIMESTAMP('2017-07-26 17:32:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556396 ; -- 2017-07-26T17:33:03.513 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Über-/Unterzahlung',Updated=TO_TIMESTAMP('2017-07-26 17:33:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556397 ; -- 2017-07-26T17:33:07.164 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Über-/Unterzahlung',Updated=TO_TIMESTAMP('2017-07-26 17:33:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556398 ; -- 2017-07-26T17:33:34.345 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Überwiesen an Konto',Updated=TO_TIMESTAMP('2017-07-26 17:33:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556404 ; -- 2017-07-26T17:33:53.132 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Auszug Zeile',Updated=TO_TIMESTAMP('2017-07-26 17:33:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556405 ; -- 2017-07-26T17:34:07.379 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Auszug Zeile Referenz',Updated=TO_TIMESTAMP('2017-07-26 17:34:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556393 ; -- 2017-07-26T17:35:37.785 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,556411,0,540707,540063,547175,TO_TIMESTAMP('2017-07-26 17:35:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Sektion',10,0,0,TO_TIMESTAMP('2017-07-26 17:35:37','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T17:35:46.351 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,556410,0,540707,540063,547176,TO_TIMESTAMP('2017-07-26 17:35:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Mandant',20,0,0,TO_TIMESTAMP('2017-07-26 17:35:46','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T17:36:05.746 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=100,Updated=TO_TIMESTAMP('2017-07-26 17:36:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547175 ; -- 2017-07-26T17:37:01.961 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_ElementGroup SET UIStyle='primary',Updated=TO_TIMESTAMP('2017-07-26 17:37:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=540063 ; -- 2017-07-26T17:37:11.960 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_ElementGroup SET UIStyle='primary',Updated=TO_TIMESTAMP('2017-07-26 17:37:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=540062 ; -- 2017-07-26T17:37:50.486 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='N',Updated=TO_TIMESTAMP('2017-07-26 17:37:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541168 ; -- 2017-07-26T17:37:53.542 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='N',Updated=TO_TIMESTAMP('2017-07-26 17:37:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541169 ; -- 2017-07-26T17:37:54.641 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='N',Updated=TO_TIMESTAMP('2017-07-26 17:37:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541177 ; -- 2017-07-26T17:37:57.590 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=80,Updated=TO_TIMESTAMP('2017-07-26 17:37:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541172 ; -- 2017-07-26T17:38:26.078 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=10,Updated=TO_TIMESTAMP('2017-07-26 17:38:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541178 ; -- 2017-07-26T17:38:28.577 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=20,Updated=TO_TIMESTAMP('2017-07-26 17:38:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541179 ; -- 2017-07-26T17:38:31.050 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=30,Updated=TO_TIMESTAMP('2017-07-26 17:38:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541180 ; -- 2017-07-26T17:38:33.427 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=40,Updated=TO_TIMESTAMP('2017-07-26 17:38:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541182 ; -- 2017-07-26T17:38:35.927 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=50,Updated=TO_TIMESTAMP('2017-07-26 17:38:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541183 ; -- 2017-07-26T17:38:40.114 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=60,Updated=TO_TIMESTAMP('2017-07-26 17:38:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541184 ; -- 2017-07-26T17:38:43.015 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=70,Updated=TO_TIMESTAMP('2017-07-26 17:38:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541185 ; -- 2017-07-26T17:38:45.567 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=80,Updated=TO_TIMESTAMP('2017-07-26 17:38:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541186 ; -- 2017-07-26T17:38:48.261 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=90,Updated=TO_TIMESTAMP('2017-07-26 17:38:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541187 ; -- 2017-07-26T17:38:56.432 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=100,Updated=TO_TIMESTAMP('2017-07-26 17:38:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547175 ; -- 2017-07-26T17:39:06.095 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=110,Updated=TO_TIMESTAMP('2017-07-26 17:39:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=547176 ; -- 2017-07-26T17:39:11.760 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='N',Updated=TO_TIMESTAMP('2017-07-26 17:39:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541181 ; -- 2017-07-26T17:42:54.403 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Auszug Position',Updated=TO_TIMESTAMP('2017-07-26 17:42:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=540707 ; -- 2017-07-26T17:43:28.122 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,330,540401,TO_TIMESTAMP('2017-07-26 17:43:28','YYYY-MM-DD HH24:MI:SS'),100,'Y',20,TO_TIMESTAMP('2017-07-26 17:43:28','YYYY-MM-DD HH24:MI:SS'),100,'advanced edit') ; -- 2017-07-26T17:43:28.123 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_UI_Section_ID=540401 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2017-07-26T17:44:03.318 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540540,540401,TO_TIMESTAMP('2017-07-26 17:44:03','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-07-26 17:44:03','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-26T17:44:22.256 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_ElementGroup SET AD_UI_Column_ID=540540, SeqNo=10,Updated=TO_TIMESTAMP('2017-07-26 17:44:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=540060 ; -- 2017-07-26T17:46:14.276 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_ElementGroup SET UIStyle='primary',Updated=TO_TIMESTAMP('2017-07-26 17:46:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=540060 ; -- 2017-07-26T17:47:07.031 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsAdvancedField='N', IsDisplayed='N',Updated=TO_TIMESTAMP('2017-07-26 17:47:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541152 ; -- 2017-07-26T17:47:16.173 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsAdvancedField='N', IsDisplayed='N',Updated=TO_TIMESTAMP('2017-07-26 17:47:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=541151 ;
the_stack
-- 2021-05-20T06:40:31.373Z -- URL zum Konzept INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsNotifyUserAfterExecution,IsOneInstanceOnly,IsReport,IsTranslateExcelHeaders,IsUseBPartnerLanguage,JasperReport,JasperReport_Tabular,LockWaitTimeout,Name,PostgrestResponseFormat,RefreshAllAfterExecution,ShowHelp,Type,Updated,UpdatedBy,Value) VALUES ('3',0,0,584830,'N','de.metas.report.jasper.client.process.JasperReportStarter','N',TO_TIMESTAMP('2021-05-20 08:40:31','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.fresh','Y','N','N','N','N','N','Y','Y','Y','@PREFIX@de/metas/reports/pricelist/report.jasper','@PREFIX@de/metas/reports/pricelist/report_TabularView.jasper',0,'Create Purchase Price List','json','N','Y','JasperReportsSQL',TO_TIMESTAMP('2021-05-20 08:40:31','YYYY-MM-DD HH24:MI:SS'),100,'RV_Fresh_PurchasePriceList') ; -- 2021-05-20T06:40:31.380Z -- URL zum Konzept INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_ID=584830 AND NOT EXISTS (SELECT 1 FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) ; -- 2021-05-20T06:41:56.486Z -- URL zum Konzept UPDATE AD_Process_Trl SET IsTranslated='Y', Name='Einkaufspreisliste',Updated=TO_TIMESTAMP('2021-05-20 08:41:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='de_CH' AND AD_Process_ID=584830 ; -- 2021-05-20T06:42:02.937Z -- URL zum Konzept UPDATE AD_Process SET Description=NULL, Help=NULL, Name='Einkaufspreisliste',Updated=TO_TIMESTAMP('2021-05-20 08:42:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=584830 ; -- 2021-05-20T06:42:02.932Z -- URL zum Konzept UPDATE AD_Process_Trl SET IsTranslated='Y', Name='Einkaufspreisliste',Updated=TO_TIMESTAMP('2021-05-20 08:42:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='de_DE' AND AD_Process_ID=584830 ; -- 2021-05-20T06:42:07.198Z -- URL zum Konzept UPDATE AD_Process_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2021-05-20 08:42:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='en_US' AND AD_Process_ID=584830 ; -- 2021-05-20T06:42:11.399Z -- URL zum Konzept UPDATE AD_Process_Trl SET Name='Einkaufspreisliste',Updated=TO_TIMESTAMP('2021-05-20 08:42:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='nl_NL' AND AD_Process_ID=584830 ; -- 2021-05-20T06:42:43.603Z -- URL zum Konzept INSERT INTO AD_Table_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Table_ID,AD_Table_Process_ID,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,WEBUI_DocumentAction,WEBUI_IncludedTabTopAction,WEBUI_ViewAction,WEBUI_ViewQuickAction,WEBUI_ViewQuickAction_Default) VALUES (0,0,584830,291,540933,TO_TIMESTAMP('2021-05-20 08:42:43','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.fresh','Y',TO_TIMESTAMP('2021-05-20 08:42:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N') ; -- 2021-05-20T06:50:44.974Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,450,0,584830,541987,18,199,540487,'M_PriceList_Version_ID',TO_TIMESTAMP('2021-05-20 08:50:44','YYYY-MM-DD HH24:MI:SS'),100,'@SQL=SELECT report.BPartner_Pricelist_Version(@C_BPartner_ID@, ''N'')','Bezeichnet eine einzelne Version der Preisliste','de.metas.fresh',0,'Jede Preisliste kann verschiedene Versionen haben. Die übliche Verwendung ist zur Anzeige eines zeitlichen Gültigkeitsbereiches einer Preisliste. ','Y','N','Y','N','N','N','Version Preisliste',10,TO_TIMESTAMP('2021-05-20 08:50:44','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-20T06:50:44.981Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=541987 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-20T06:51:02.570Z -- URL zum Konzept UPDATE AD_Process_Para SET IsMandatory='Y',Updated=TO_TIMESTAMP('2021-05-20 08:51:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=541987 ; -- 2021-05-20T06:52:09.754Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,187,0,584830,541988,30,'C_BPartner_ID',TO_TIMESTAMP('2021-05-20 08:52:09','YYYY-MM-DD HH24:MI:SS'),100,'@C_BPartner_ID@','Bezeichnet einen Geschäftspartner','de.metas.fresh',0,'Ein Geschäftspartner ist jemand, mit dem Sie interagieren. Dies kann Lieferanten, Kunden, Mitarbeiter oder Handelsvertreter umfassen.','Y','N','Y','N','Y','N','Geschäftspartner',20,TO_TIMESTAMP('2021-05-20 08:52:09','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-20T06:52:09.756Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=541988 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-20T06:53:23.399Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,189,0,584830,541989,18,131,'C_BPartner_Location_ID',TO_TIMESTAMP('2021-05-20 08:53:23','YYYY-MM-DD HH24:MI:SS'),100,'@Deafult_Bill_Location_ID@','Identifiziert die (Liefer-) Adresse des Geschäftspartners','de.metas.fresh',0,'Identifiziert die Adresse des Geschäftspartners','Y','N','Y','N','Y','N','Standort',30,TO_TIMESTAMP('2021-05-20 08:53:23','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-20T06:53:23.401Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=541989 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-20T06:54:15.562Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,577492,0,584830,541990,17,'ReportFormat',TO_TIMESTAMP('2021-05-20 08:54:15','YYYY-MM-DD HH24:MI:SS'),100,'PDF','de.metas.fresh',16,'Y','N','Y','N','Y','N','Report format',40,TO_TIMESTAMP('2021-05-20 08:54:15','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-20T06:54:15.566Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=541990 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-20T06:55:06.737Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,577666,0,584830,541991,20,'p_show_product_price_pi_flag',TO_TIMESTAMP('2021-05-20 08:55:06','YYYY-MM-DD HH24:MI:SS'),100,'Y','de.metas.fresh',0,'Y','N','Y','N','N','N','Preisliste Packvorschriften',50,TO_TIMESTAMP('2021-05-20 08:55:06','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-20T06:55:06.739Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=541991 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-20T07:00:02.206Z -- URL zum Konzept UPDATE AD_Process_Para SET DefaultValue='@Default_Bill_Location_ID@',Updated=TO_TIMESTAMP('2021-05-20 09:00:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=541989 ; -- 2021-05-20T07:01:25.267Z -- URL zum Konzept UPDATE AD_Process_Para SET AD_Reference_Value_ID=541097,Updated=TO_TIMESTAMP('2021-05-20 09:01:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=541990 ; -- Disable the Preisliste process -- 2021-05-20T11:22:19.998Z -- URL zum Konzept UPDATE AD_Table_Process SET IsActive='N',Updated=TO_TIMESTAMP('2021-05-20 13:22:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_Process_ID=540426 ;
the_stack
drop schema if exists dams_ci; drop trigger if exists insert_trigger on test_trigger_src_tbl; drop table if exists test_trigger_des_tbl; drop table if exists test_trigger_src_tbl; drop package if exists trigger_test; drop table if exists test1; drop table if exists dams_ci.test1; drop table if exists dams_ci.DB_LOG; drop table if exists au_pkg; create table au_pkg(id int,name varchar); create schema dams_ci; create table test_trigger_src_tbl(id1 int, id2 int, id3 int); create table test_trigger_des_tbl(id1 int, id2 int, id3 int); create table test1(col1 int); insert into test1 values(50); create table dams_ci.test1(col1 int); drop package if exists exp_pkg; create or replace package exp_pkg as user_exp EXCEPTION; end exp_pkg; create or replace package body exp_pkg as end exp_pkg; / create or replace function func1(param int) return number as declare a exception; begin if (param = 1) then raise exp_pkg.user_exp; end if; raise info 'number is %', param; exception when exp_pkg.user_exp then raise info 'user_exp raise'; return 0; end; / call func1(1); --user_exp raise CREATE TABLE dams_ci.DB_LOG (ID VARCHAR(20), PROC_NAME VARCHAR(100), INFO VARCHAR(4000), LOG_LEVEL VARCHAR(10), TIME_STAMP VARCHAR(23), ERROR_BACKTRACE VARCHAR(4000), ERR_STACK VARCHAR(4000), STEP_NO VARCHAR(20), LOG_DATE VARCHAR(8) ); CREATE OR REPLACE PACKAGE dams_ci.pack_log AS PROCEDURE excption_1(in_desc IN db_log.id%TYPE, in_info IN db_log.info%TYPE); END pack_log; / CREATE OR REPLACE PACKAGE DAMS_CI.UT_P_PCKG_DAMS_DEPT_ISSUE AUTHID CURRENT_USER IS PROCEDURE proc_get_appinfo2(); END UT_P_PCKG_DAMS_DEPT_ISSUE ; / CREATE OR REPLACE PACKAGE "dams_ci"."ctp_mx_pckg_init" AS type ref_cursor IS ref CURSOR; PROCEDURE proc_get_appinfo1(appinfo OUT ref_cursor); END ctp_mx_pckg_init; / create or replace package trigger_test as function tri_insert_func() return trigger; end trigger_test; create or replace package body trigger_test as function tri_insert_func() return trigger as begin insert into test_trigger_des_tbl values(new.id1, new.id2, new.id3); return new; end; end trigger_test; / create trigger insert_trigger before insert on test_trigger_src_tbl for each row execute procedure trigger_test.tri_insert_func(); --不支持触发器调用package函数 insert into test_trigger_src_tbl values(1,1,1); create or replace package dams_ci as procedure proc(); end dams_ci; / insert into test_trigger_src_tbl values(1,1,1); create schema dams_ci; create or replace package dams_ci.emp_bonus13 is var5 int:=42; var6 int:=43; procedure testpro1(); end emp_bonus13; / create or replace package body dams_ci.emp_bonus13 is var1 int:=46; var2 int:=47; procedure testpro1() is a int:=48; b int:=49; begin insert into test1 values(50); commit; end; procedure testpro2() is a int:=48; b int:=49; begin insert into test1 values(50); commit; end; begin testpro1(56); insert into test1 values(var5); end emp_bonus13; / create or replace package dams_ci.emp_bonus13 is var5 int:=42; var6 int:=43; procedure testpro1(); end emp_bonus13; / create or replace package body dams_ci.emp_bonus13 is var1 int:=46; var2 int:=47; procedure testpro1() is a int:=48; b int:=49; begin insert into test1 values(50); commit; end; begin testpro1(56); end emp_bonus13; / drop package body dams_ci.emp_bonus13; select pkgname,pkgspecsrc,pkgbodydeclsrc from gs_package where pkgname='emp_bonus13'; create or replace package feature_cross_test as --111 data1 int; --全局变量 data2 int; --全局变量 function func3(a int --函数入参注释 )return number; --公有函数 procedure proc3(a int /*存储过程入参注释*/); end feature_cross_test; / create or replace package body feature_cross_test as /********************************* 包体头部注释快 end **********************************/ function func3(a int --函数入参注释 end )return number is --函数头部注释 begin data1 := 1; data2 := 2; insert into t1 values(data1); insert into t1 values(data2); return 0; end; procedure proc3(a int /*存储过程入参注释 end*/) is /*********** 存储过程头部注释 end ***********/ begin insert into t1 values (1000); commit; insert into t1 values (2000); rollback; end; end feature_cross_test; --包定义结束 / create or replace package autonomous_pkg_150_1 IS count int := 1; function autonomous_f_150_1(num1 int) return int; end autonomous_pkg_150_1; / create or replace package body autonomous_pkg_150_1 as autonomous_1 int :=10; autonomous_count int :=1; function autonomous_f_150_1(num1 int) return int is re_int int; begin re_int:=autonomous_1; insert into au_pkg values(count,'autonomous_f_150_1_public_count'); insert into au_pkg values(autonomous_count,'autonomous_f_150_1_count'); count:=count+1; autonomous_count:=autonomous_count+1; return re_int+num1; end; function autonomous_f_150_1_private(pnum1 int) return int is re_int int; begin re_int:=autonomous_1; insert into au_pkg values(count,'autonomous_f_150_1_private_public_count'); insert into au_pkg values(autonomous_count,'autonomous_f_150_1_private_private_count'); count:=count+1; autonomous_count:=autonomous_count+1; return re_int+pnum1; end; end autonomous_pkg_150_1; / begin perform autonomous_pkg_150_1.autonomous_f_150_2_out(3); end; / drop function if exists func1; create or replace package exp_pkg as user_exp EXCEPTION; function func1(param int) return number; end exp_pkg; create or replace package body exp_pkg as function func1(param int) return number as begin if (param = 1) then raise user_exp; end if; raise info 'number is %', param; exception when user_exp then raise info 'user_exp raise'; return 0; end; end exp_pkg; / call exp_pkg.func1(1); create or replace package transaction_test as data1 character(20) := 'global data1'; data2 character(20) := 'global data2'; function func(data1 int, data2 int, data1 int) return number; end transaction_test; / create or replace package transaction_test as data1 character(20) := 'global data1'; data2 character(20) := 'global data2'; end transaction_test; / create or replace package body transaction_test as data1 character(20) := 'global data1'; data2 character(20) := 'global data2'; end transaction_test; / drop package transaction_test; drop package if exists exp_pkg; drop package autonomous_pkg_150_1; \sf feature_cross_test.func3 \sf func1 select pkgspecsrc,pkgbodydeclsrc from gs_package where pkgname='feature_cross_test'; create or replace package autonomous_pkg_150 IS count int:=1; PROCEDURE autonomous_p_150(num4 int); end autonomous_pkg_150; / CREATE OR REPLACE PACKAGE BODY autonomous_pkg_150 as autonomous_1 int:=10; autonomous_count int:=1; PROCEDURE autonomous_p_150(num4 int) IS PRAGMA AUTONOMOUS_TRANSACTION; re_int INT; BEGIN re_int:=autonomous_1; autonomous_count:=autonomous_count+1; select count(*)) into re_int from test1; insert into test1 values(autonomous_count); commit; END; END autonomous_pkg_150; / CREATE OR REPLACE PACKAGE BODY autonomous_pkg_150 as autonomous_1 int:=10; autonomous_count int:=1; PROCEDURE autonomous_p_150(num4 int) IS PRAGMA AUTONOMOUS_TRANSACTION; re_int INT; BEGIN re_int:=autonomous_1; autonomous_count:=autonomous_count+1; select count(*) into re_int from test1; insert into test1 values(autonomous_count); commit; END; END autonomous_pkg_150; / create or replace package autonomous_pkg_150_1 IS count int := 1; function autonomous_f_150_1(num1 int) return int; end autonomous_pkg_150_1; / create or replace package body autonomous_pkg_150_1 as autonomous_1 int :=10; autonomous_count int :=1; function autonomous_f_150_1_private(pnum1 int) return int is declare PRAGMA AUTONOMOUS_TRANSACTION; begin return 1; end; function autonomous_f_150_1(num1 int) return int is declare PRAGMA AUTONOMOUS_TRANSACTION; re_int int; begin autonomous_f_150_1_private(1); return 1; end; end autonomous_pkg_150_1; / call autonomous_pkg_150_1.autonomous_f_150_1(1); create or replace package autonomous_pkg_150_2 IS count int := 1; function autonomous_f_150_2(num1 int) return int; end autonomous_pkg_150_2; / create or replace package body autonomous_pkg_150_2 as autonomous_1 int :=10; autonomous_count int :=1; function autonomous_f_150_2(num1 int) return int is declare PRAGMA AUTONOMOUS_TRANSACTION; re_int int; begin return 2; end; function autonomous_f_150_2_private(pnum1 int) return int is declare PRAGMA AUTONOMOUS_TRANSACTION; re_int int; begin autonomous_pkg_150_1.autonomous_f_150_1_private(1); return 2; end; end autonomous_pkg_150_2; / call autonomous_pkg_150_2.autonomous_f_150_2_private(1); drop table if exists au_pkg; create table au_pkg(id int,name varchar); create or replace package autonomous_pkg_150_1 IS count int := 1; function autonomous_f_150_1(num1 int) return int; end autonomous_pkg_150_1; / create or replace package body autonomous_pkg_150_1 as autonomous_1 int :=10; autonomous_count int :=1; function autonomous_f_150_1(num1 int) return int is declare PRAGMA AUTONOMOUS_TRANSACTION; re_int int; begin re_int:=autonomous_1; insert into au_pkg values(count,'autonomous_f_150_1_public_count'); insert into au_pkg values(autonomous_count,'autonomous_f_150_1_count'); count:=count+1; autonomous_count:=autonomous_count+1; return re_int+num1; end; function autonomous_f_150_1_private(pnum1 int) return int is declare PRAGMA AUTONOMOUS_TRANSACTION; re_int int; begin re_int:=autonomous_1; insert into au_pkg values(count,'autonomous_f_150_1_private_public_count'); insert into au_pkg values(autonomous_count,'autonomous_f_150_1_private_private_count'); count:=count+1; autonomous_count:=autonomous_count+1; return re_int+pnum1; end; begin perform autonomous_f_150_1(autonomous_f_150_1_private(1)); perform autonomous_f_150_1_private((select autonomous_f_150_1(2))); end autonomous_pkg_150_1; / declare begin perform autonomous_pkg_150_1.autonomous_f_150_1(2); end; / create or replace package pack_log is ab varchar2(10)='asdf'; bb int = 11; procedure p1(a varchar2(10)); procedure p2(); end pack_log; / create or replace package body pack_log is procedure p1(a varchar2(10)) is begin null; end; procedure p2() is begin null; end; end pack_log; / declare ab varchar2(10):='11'; BEGIN pack_log.p1(pack_log.ab || '11'); insert into test1 values(pack_log.bb); END; / CREATE OR REPLACE PACKAGE CTP_MX_PCKG_INIT AS type ref_cursor IS ref CURSOR; --rcuror ref_cursor; PROCEDURE proc_get_appinfo(appinfo OUT ref_cursor); PROCEDURE proc_get_servinfo(appname IN varchar2, servinfo OUT ref_cursor); --end proc_get_servinfo; PROCEDURE proc_get_monitor_switch(appname IN varchar2, switchinfo OUT ref_cursor); --end proc_get_monitor_switch; PROCEDURE proc_get_useablity_info(checkers OUT ref_cursor); --end proc_get_useablity_info; PROCEDURE proc_get_trade_define(trades OUT ref_cursor); --end proc_get_trade_define; PROCEDURE proc_get_resource_define(resources OUT ref_cursor); --end proc_get_resource_define; PROCEDURE proc_get_trade_info(tradeRef OUT ref_cursor); PROCEDURE proc_get_resource_info(resourceRef OUT ref_cursor); END CTP_MX_PCKG_INIT; / reset session AUTHORIZATION; create or replace package cnt as end cnt; / create user user1 password 'huawei@123'; set session AUTHORIZATION user1 PASSWORD 'huawei@123'; reset session AUTHORIZATION; DROP USER user1; create or replace package commit_rollback_test as procedure exec_func3(ret_num out int); procedure exec_func4(add_num in int); end commit_rollback_test; / create or replace package body commit_rollback_test as procedure exec_func3(ret_num out int) as begin ret_num := 1+1; commit; end; procedure exec_func4(add_num in int) as sum_num int; begin sum_num := add_num + exec_func3(); commit; end; end commit_rollback_test; / call commit_rollback_test.exec_func4(1); create or replace package multi_sql as function func5() return int; function func16() return int; end multi_sql; / create or replace package body multi_sql as function func5() return int as begin return (data5); end; function func16() return int as begin alter function func5() rename to func25; return 0; end; end multi_sql; / create or replace package cnt as c1 sys_refcursor; end cnt; / call multi_sql.func16(); drop package if exists multi_sql; drop package if exists commit_rollback_test; drop package if exists cnt; drop package pack_log; drop package CTP_MX_PCKG_INIT; drop table if exists au_pkg; drop package autonomous_pkg_150_2; drop package autonomous_pkg_150_1; drop package autonomous_pkg_150; drop package feature_cross_test; drop function func1; drop package dams_ci.emp_bonus13; drop package if exists exp_pkg; drop trigger if exists insert_trigger on test_trigger_src_tbl; drop table if exists dams_ci.DB_LOG; drop table if exists test_trigger_des_tbl; drop table if exists test_trigger_src_tbl; drop package if exists dams_ci.pack_log; drop package if exists dams_ci.ut_p_pckg_dams_dept_issue; drop package if exists dams_ci.ctp_mx_pckg_init; drop package if exists trigger_test; drop table if exists test1; drop table if exists dams_ci.test1; drop package if exists trigger_test; drop package if exists dams_ci; drop schema if exists dams_ci cascade; --test online help \h CREATE PACKAGE \h CREATE PACKAGE BODY \h DROP PACKAGE \h DROP PACKAGE BODY
the_stack
-- 2018-02-17T14:22:58.733 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,IsActive,CreatedBy,PrintName,EntityType,ColumnName,AD_Element_ID,AD_Org_ID,Name,UpdatedBy,Created,Updated) VALUES (0,'Y',100,'activityname','U','activityname',543886,0,'activityname',100,TO_TIMESTAMP('2018-02-17 14:22:58','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-02-17 14:22:58','YYYY-MM-DD HH24:MI:SS')) ; -- 2018-02-17T14:22:58.755 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, PO_Name,PO_PrintName,PrintName,PO_Description,PO_Help,Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.PO_Name,t.PO_PrintName,t.PrintName,t.PO_Description,t.PO_Help,t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543886 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2018-02-17T14:22:58.857 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Reference_ID,IsKey,IsParent,IsTranslated,IsIdentifier,AD_Client_ID,IsActive,CreatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,AD_Table_ID,ColumnName,AD_Column_ID,IsMandatory,AD_Org_ID,UpdatedBy,Name,EntityType,FieldLength,Version,Created,Updated) VALUES (10,'N','N','N','N',0,'Y',100,543886,'N','N','N','Y','N',540936,'activityname',559216,'N',0,100,'activityname','U',60,0,TO_TIMESTAMP('2018-02-17 14:22:58','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-02-17 14:22:58','YYYY-MM-DD HH24:MI:SS')) ; -- 2018-02-17T14:22:58.861 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=559216 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-02-17T14:22:58.954 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Reference_ID,IsKey,IsParent,IsTranslated,IsIdentifier,AD_Client_ID,IsActive,CreatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,AD_Table_ID,Help,ColumnName,AD_Column_ID,IsMandatory,Description,AD_Org_ID,UpdatedBy,Name,EntityType,FieldLength,Version,Created,Updated) VALUES (16,'N','N','N','N',0,'Y',100,2000,'N','N','N','Y','N',540936,'Datum, zu dem Zahlung ohne Abzüge oder Rabattierung fällig wird.','DueDate',559217,'N','Datum, zu dem Zahlung fällig wird',0,100,'Datum Fälligkeit','U',35,0,TO_TIMESTAMP('2018-02-17 14:22:58','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-02-17 14:22:58','YYYY-MM-DD HH24:MI:SS')) ; -- 2018-02-17T14:22:58.957 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=559217 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-02-17T14:23:15.477 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.datev',Updated=TO_TIMESTAMP('2018-02-17 14:23:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=559217 ; -- 2018-02-17T14:23:29.480 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='de.metas.datev',Updated=TO_TIMESTAMP('2018-02-17 14:23:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=559216 ; -- 2018-02-17T14:24:08.917 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET PrintName='Activity Name', EntityType='de.metas.datev', ColumnName='ActivityName', Name='Activity Name',Updated=TO_TIMESTAMP('2018-02-17 14:24:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543886 ; -- 2018-02-17T14:24:08.943 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='ActivityName', Name='Activity Name', Description=NULL, Help=NULL WHERE AD_Element_ID=543886 ; -- 2018-02-17T14:24:08.948 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='ActivityName', Name='Activity Name', Description=NULL, Help=NULL, AD_Element_ID=543886 WHERE UPPER(ColumnName)='ACTIVITYNAME' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2018-02-17T14:24:08.957 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='ActivityName', Name='Activity Name', Description=NULL, Help=NULL WHERE AD_Element_ID=543886 AND IsCentrallyMaintained='Y' ; -- 2018-02-17T14:24:08.961 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Activity Name', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543886) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 543886) ; -- 2018-02-17T14:24:09.038 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Activity Name', Name='Activity Name' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=543886) ; -- 2018-02-17T14:25:00.348 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Reference_ID,IsKey,IsParent,IsTranslated,IsIdentifier,AD_Client_ID,IsActive,CreatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,AD_Table_ID,ColumnName,AD_Column_ID,IsMandatory,AD_Org_ID,UpdatedBy,Name,EntityType,FieldLength,Version,SeqNo,Created,Updated) VALUES (10,'N','N','N','N',0,'Y',100,543886,'N','N','N','N','Y','N',540935,'ActivityName',559218,'N',0,100,'Activity Name','de.metas.datev',60,0,0,TO_TIMESTAMP('2018-02-17 14:25:00','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-02-17 14:25:00','YYYY-MM-DD HH24:MI:SS')) ; -- 2018-02-17T14:25:00.354 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=559218 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-02-17T14:25:00.519 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Reference_ID,IsKey,IsParent,IsTranslated,IsIdentifier,AD_Client_ID,IsActive,CreatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,AD_Table_ID,Help,ColumnName,AD_Column_ID,IsMandatory,Description,AD_Org_ID,UpdatedBy,Name,EntityType,FieldLength,Version,SeqNo,Created,Updated) VALUES (16,'N','N','N','N',0,'Y',100,2000,'N','N','N','N','Y','N',540935,'Datum, zu dem Zahlung ohne Abzüge oder Rabattierung fällig wird.','DueDate',559219,'N','Datum, zu dem Zahlung fällig wird',0,100,'Datum Fälligkeit','de.metas.datev',35,0,0,TO_TIMESTAMP('2018-02-17 14:25:00','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-02-17 14:25:00','YYYY-MM-DD HH24:MI:SS')) ; -- 2018-02-17T14:25:00.523 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=559219 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-02-17T14:25:30.877 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('DATEV_ExportLine','ALTER TABLE public.DATEV_ExportLine ADD COLUMN ActivityName VARCHAR(60)') ; -- 2018-02-17T14:25:46.019 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=15, FieldLength=7,Updated=TO_TIMESTAMP('2018-02-17 14:25:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=559219 ; -- 2018-02-17T14:25:52.261 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('DATEV_ExportLine','ALTER TABLE public.DATEV_ExportLine ADD COLUMN DueDate TIMESTAMP WITHOUT TIME ZONE') ; -- 2018-02-17T14:26:10.552 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=15, FieldLength=7,Updated=TO_TIMESTAMP('2018-02-17 14:26:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=559217 ; -- 2018-02-17T14:42:17.959 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Reference_ID,IsKey,IsParent,IsTranslated,IsIdentifier,AD_Client_ID,IsActive,CreatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,AD_Table_ID,ColumnName,AD_Column_ID,IsMandatory,AD_Org_ID,UpdatedBy,Name,EntityType,FieldLength,Version,Created,Updated) VALUES (10,'N','N','N','N',0,'Y',100,275,'N','N','N','Y','N',540936,'Description',559220,'N',0,100,'Beschreibung','de.metas.datev',255,0,TO_TIMESTAMP('2018-02-17 14:42:17','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-02-17 14:42:17','YYYY-MM-DD HH24:MI:SS')) ; -- 2018-02-17T14:42:17.983 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=559220 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-02-17T14:42:38.186 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Reference_ID,IsKey,IsParent,IsTranslated,IsIdentifier,AD_Client_ID,IsActive,CreatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,IsSyncDatabase,IsAlwaysUpdateable,IsAllowLogging,IsEncrypted,AD_Table_ID,ColumnName,AD_Column_ID,IsMandatory,AD_Org_ID,UpdatedBy,Name,EntityType,FieldLength,Version,SeqNo,Created,Updated) VALUES (10,'N','N','N','N',0,'Y',100,275,'N','N','N','N','Y','N',540935,'Description',559221,'N',0,100,'Beschreibung','de.metas.datev',255,0,0,TO_TIMESTAMP('2018-02-17 14:42:38','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-02-17 14:42:38','YYYY-MM-DD HH24:MI:SS')) ; -- 2018-02-17T14:42:38.190 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=559221 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-02-17T14:42:52.664 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('DATEV_ExportLine','ALTER TABLE public.DATEV_ExportLine ADD COLUMN Description VARCHAR(255)') ;
the_stack
-- 2020-07-29T09:16:15.533Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET PrintName='Trading Unit',Updated=TO_TIMESTAMP('2020-07-29 12:16:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=542975 AND AD_Language='en_US' ; -- 2020-07-29T09:16:15.581Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(542975,'en_US') ; -- 2020-07-29T09:16:19.033Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2020-07-29 12:16:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=542975 AND AD_Language='de_CH' ; -- 2020-07-29T09:16:19.035Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(542975,'de_CH') ; -- 2020-07-29T09:16:22.522Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Trading Unit', PrintName='Trading Unit',Updated=TO_TIMESTAMP('2020-07-29 12:16:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=542975 AND AD_Language='en_GB' ; -- 2020-07-29T09:16:22.523Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(542975,'en_GB') ; -- 2020-07-29T09:16:28.265Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2020-07-29 12:16:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=542975 AND AD_Language='de_DE' ; -- 2020-07-29T09:16:28.267Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(542975,'de_DE') ; -- 2020-07-29T09:16:28.280Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(542975,'de_DE') ; -- 2020-07-29T09:48:53.746Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET PrintName='Approved for Invoicing',Updated=TO_TIMESTAMP('2020-07-29 12:48:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=542572 AND AD_Language='en_US' ; -- 2020-07-29T09:48:53.748Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(542572,'en_US') ; -- 2020-07-29T09:49:02.898Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Approved for Invoicing', PrintName='Approved for Invoicing',Updated=TO_TIMESTAMP('2020-07-29 12:49:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=542572 AND AD_Language='en_GB' ; -- 2020-07-29T09:49:02.900Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(542572,'en_GB') ; -- 2020-07-29T09:50:29.784Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,578018,0,'IsNotApprovedForInvoicing',TO_TIMESTAMP('2020-07-29 12:50:29','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','IsNotApprovedForInvoicing','IsNotApprovedForInvoicing',TO_TIMESTAMP('2020-07-29 12:50:29','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-07-29T09:50:29.790Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=578018 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2020-07-29T09:50:39.946Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,578019,0,'IsApprovedForInvoicing',TO_TIMESTAMP('2020-07-29 12:50:39','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','IsApprovedForInvoicing','IsApprovedForInvoicing',TO_TIMESTAMP('2020-07-29 12:50:39','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-07-29T09:50:39.948Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=578019 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2020-07-29T09:51:50.327Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Is Approved For Invoicing ', PrintName='Is Approved For Invoicing ',Updated=TO_TIMESTAMP('2020-07-29 12:51:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578019 AND AD_Language='en_US' ; -- 2020-07-29T09:51:50.329Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578019,'en_US') ; -- 2020-07-29T09:52:02.113Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Is Not Approved For Invoicing ', PrintName='Is Not Approved For Invoicing ',Updated=TO_TIMESTAMP('2020-07-29 12:52:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578018 AND AD_Language='en_US' ; -- 2020-07-29T09:52:02.115Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578018,'en_US') ; -- 2020-07-29T09:52:44.396Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='Net',Updated=TO_TIMESTAMP('2020-07-29 12:52:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1003124 ; -- 2020-07-29T09:52:44.408Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='Net', Name='Netto', Description='Effektiver Preis', Help='Der Einzelpreis oder Effektive Preis bezeichnet den Preis für das Produkt in Ausgangswährung.' WHERE AD_Element_ID=1003124 ; -- 2020-07-29T09:52:44.409Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='Net', Name='Netto', Description='Effektiver Preis', Help='Der Einzelpreis oder Effektive Preis bezeichnet den Preis für das Produkt in Ausgangswährung.', AD_Element_ID=1003124 WHERE UPPER(ColumnName)='NET' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-07-29T09:52:44.412Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='Net', Name='Netto', Description='Effektiver Preis', Help='Der Einzelpreis oder Effektive Preis bezeichnet den Preis für das Produkt in Ausgangswährung.' WHERE AD_Element_ID=1003124 AND IsCentrallyMaintained='Y' ; -- 2020-07-29T09:52:56.912Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2020-07-29 12:52:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1003124 AND AD_Language='de_DE' ; -- 2020-07-29T09:52:56.913Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(1003124,'de_DE') ; -- 2020-07-29T09:52:56.928Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(1003124,'de_DE') ; -- 2020-07-29T09:52:59.661Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2020-07-29 12:52:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1003124 AND AD_Language='de_CH' ; -- 2020-07-29T09:52:59.664Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(1003124,'de_CH') ; -- 2020-07-29T09:57:55.298Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='NetIsApprovedForInvoicing', Name='NetIsApprovedForInvoicing', PrintName='NetIsApprovedForInvoicing',Updated=TO_TIMESTAMP('2020-07-29 12:57:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578019 ; -- 2020-07-29T09:57:55.303Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='NetIsApprovedForInvoicing', Name='NetIsApprovedForInvoicing', Description=NULL, Help=NULL WHERE AD_Element_ID=578019 ; -- 2020-07-29T09:57:55.304Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='NetIsApprovedForInvoicing', Name='NetIsApprovedForInvoicing', Description=NULL, Help=NULL, AD_Element_ID=578019 WHERE UPPER(ColumnName)='NETISAPPROVEDFORINVOICING' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-07-29T09:57:55.306Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='NetIsApprovedForInvoicing', Name='NetIsApprovedForInvoicing', Description=NULL, Help=NULL WHERE AD_Element_ID=578019 AND IsCentrallyMaintained='Y' ; -- 2020-07-29T09:57:55.307Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='NetIsApprovedForInvoicing', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=578019) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 578019) ; -- 2020-07-29T09:57:55.317Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='NetIsApprovedForInvoicing', Name='NetIsApprovedForInvoicing' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=578019) ; -- 2020-07-29T09:57:55.324Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='NetIsApprovedForInvoicing', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 578019 ; -- 2020-07-29T09:57:55.327Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='NetIsApprovedForInvoicing', Description=NULL, Help=NULL WHERE AD_Element_ID = 578019 ; -- 2020-07-29T09:57:55.328Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'NetIsApprovedForInvoicing', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 578019 ; -- 2020-07-29T09:58:00.525Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='NetIsNotApprovedForInvoicing', Name='NetIsNotApprovedForInvoicing', PrintName='NetIsNotApprovedForInvoicing',Updated=TO_TIMESTAMP('2020-07-29 12:58:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578018 ; -- 2020-07-29T09:58:00.529Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='NetIsNotApprovedForInvoicing', Name='NetIsNotApprovedForInvoicing', Description=NULL, Help=NULL WHERE AD_Element_ID=578018 ; -- 2020-07-29T09:58:00.530Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='NetIsNotApprovedForInvoicing', Name='NetIsNotApprovedForInvoicing', Description=NULL, Help=NULL, AD_Element_ID=578018 WHERE UPPER(ColumnName)='NETISNOTAPPROVEDFORINVOICING' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-07-29T09:58:00.532Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='NetIsNotApprovedForInvoicing', Name='NetIsNotApprovedForInvoicing', Description=NULL, Help=NULL WHERE AD_Element_ID=578018 AND IsCentrallyMaintained='Y' ; -- 2020-07-29T09:58:00.533Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='NetIsNotApprovedForInvoicing', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=578018) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 578018) ; -- 2020-07-29T09:58:00.540Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='NetIsNotApprovedForInvoicing', Name='NetIsNotApprovedForInvoicing' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=578018) ; -- 2020-07-29T09:58:00.542Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='NetIsNotApprovedForInvoicing', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 578018 ; -- 2020-07-29T09:58:00.544Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='NetIsNotApprovedForInvoicing', Description=NULL, Help=NULL WHERE AD_Element_ID = 578018 ; -- 2020-07-29T09:58:00.545Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'NetIsNotApprovedForInvoicing', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 578018 ; -- 2020-07-29T09:58:36.043Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Name='Net: Approved For Invoicing ', PrintName='Net: Approved For Invoicing ',Updated=TO_TIMESTAMP('2020-07-29 12:58:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578019 AND AD_Language='en_US' ; -- 2020-07-29T09:58:36.045Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578019,'en_US') ; -- 2020-07-29T09:58:44.917Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Name='Net: Not Approved For Invoicing ', PrintName='Net: Not Approved For Invoicing ',Updated=TO_TIMESTAMP('2020-07-29 12:58:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578018 AND AD_Language='en_US' ; -- 2020-07-29T09:58:44.919Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578018,'en_US') ; -- 2020-07-29T10:00:39.198Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Name='Net (Approved For Invoicing)', PrintName='Net (Approved For Invoicing)',Updated=TO_TIMESTAMP('2020-07-29 13:00:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578019 AND AD_Language='en_US' ; -- 2020-07-29T10:00:39.200Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578019,'en_US') ; -- 2020-07-29T10:00:49.981Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Name='Net (Not Approved For Invoicing)', PrintName='Net (Not Approved For Invoicing)',Updated=TO_TIMESTAMP('2020-07-29 13:00:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578018 AND AD_Language='en_US' ; -- 2020-07-29T10:00:49.983Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578018,'en_US') ; -- 2020-07-29T10:06:07.819Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET PrintName='To be Updated',Updated=TO_TIMESTAMP('2020-07-29 13:06:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541237 AND AD_Language='en_US' ; -- 2020-07-29T10:06:07.821Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(541237,'en_US') ; -- 2020-07-29T10:08:24.699Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Name='Recompute', PrintName='Recompute',Updated=TO_TIMESTAMP('2020-07-29 13:08:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=541237 AND AD_Language='en_US' ; -- 2020-07-29T10:08:24.700Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(541237,'en_US') ; -- 2020-07-29T10:57:22.771Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Netto (Mit Freigabe)', PrintName='Netto (Mit Freigabe)',Updated=TO_TIMESTAMP('2020-07-29 13:57:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578019 AND AD_Language='de_CH' ; -- 2020-07-29T10:57:22.804Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578019,'de_CH') ; -- 2020-07-29T10:57:26.556Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Netto (Mit Freigabe)', PrintName='Netto (Mit Freigabe)',Updated=TO_TIMESTAMP('2020-07-29 13:57:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578019 AND AD_Language='de_DE' ; -- 2020-07-29T10:57:26.557Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578019,'de_DE') ; -- 2020-07-29T10:57:26.565Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(578019,'de_DE') ; -- 2020-07-29T10:57:26.567Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='NetIsApprovedForInvoicing', Name='Netto (Mit Freigabe)', Description=NULL, Help=NULL WHERE AD_Element_ID=578019 ; -- 2020-07-29T10:57:26.569Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='NetIsApprovedForInvoicing', Name='Netto (Mit Freigabe)', Description=NULL, Help=NULL, AD_Element_ID=578019 WHERE UPPER(ColumnName)='NETISAPPROVEDFORINVOICING' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-07-29T10:57:26.571Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='NetIsApprovedForInvoicing', Name='Netto (Mit Freigabe)', Description=NULL, Help=NULL WHERE AD_Element_ID=578019 AND IsCentrallyMaintained='Y' ; -- 2020-07-29T10:57:26.573Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Netto (Mit Freigabe)', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=578019) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 578019) ; -- 2020-07-29T10:57:26.581Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Netto (Mit Freigabe)', Name='Netto (Mit Freigabe)' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=578019) ; -- 2020-07-29T10:57:26.583Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Netto (Mit Freigabe)', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 578019 ; -- 2020-07-29T10:57:26.585Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Netto (Mit Freigabe)', Description=NULL, Help=NULL WHERE AD_Element_ID = 578019 ; -- 2020-07-29T10:57:26.587Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Netto (Mit Freigabe)', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 578019 ; -- 2020-07-29T10:57:48.301Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Netto (Ohne Freigabe)', PrintName='Netto (Ohne Freigabe)',Updated=TO_TIMESTAMP('2020-07-29 13:57:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578018 AND AD_Language='de_CH' ; -- 2020-07-29T10:57:48.303Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578018,'de_CH') ; -- 2020-07-29T10:57:51.855Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Netto (Ohne Freigabe)', PrintName='Netto (Ohne Freigabe)',Updated=TO_TIMESTAMP('2020-07-29 13:57:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578018 AND AD_Language='de_DE' ; -- 2020-07-29T10:57:51.857Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578018,'de_DE') ; -- 2020-07-29T10:57:51.865Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(578018,'de_DE') ; -- 2020-07-29T10:57:51.867Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='NetIsNotApprovedForInvoicing', Name='Netto (Ohne Freigabe)', Description=NULL, Help=NULL WHERE AD_Element_ID=578018 ; -- 2020-07-29T10:57:51.868Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='NetIsNotApprovedForInvoicing', Name='Netto (Ohne Freigabe)', Description=NULL, Help=NULL, AD_Element_ID=578018 WHERE UPPER(ColumnName)='NETISNOTAPPROVEDFORINVOICING' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-07-29T10:57:51.870Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='NetIsNotApprovedForInvoicing', Name='Netto (Ohne Freigabe)', Description=NULL, Help=NULL WHERE AD_Element_ID=578018 AND IsCentrallyMaintained='Y' ; -- 2020-07-29T10:57:51.871Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Netto (Ohne Freigabe)', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=578018) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 578018) ; -- 2020-07-29T10:57:51.877Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Netto (Ohne Freigabe)', Name='Netto (Ohne Freigabe)' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=578018) ; -- 2020-07-29T10:57:51.879Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Netto (Ohne Freigabe)', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 578018 ; -- 2020-07-29T10:57:51.881Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Netto (Ohne Freigabe)', Description=NULL, Help=NULL WHERE AD_Element_ID = 578018 ; -- 2020-07-29T10:57:51.882Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Netto (Ohne Freigabe)', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 578018 ; -- 2020-07-29T11:30:47.231Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,578020,0,'IsGoods',TO_TIMESTAMP('2020-07-29 14:30:46','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Goods','Goods',TO_TIMESTAMP('2020-07-29 14:30:46','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-07-29T11:30:47.237Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=578020 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2020-07-29T11:30:52.454Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Ware', PrintName='Ware',Updated=TO_TIMESTAMP('2020-07-29 14:30:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578020 AND AD_Language='de_CH' ; -- 2020-07-29T11:30:52.456Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578020,'de_CH') ; -- 2020-07-29T11:30:58.189Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Ware', PrintName='Ware',Updated=TO_TIMESTAMP('2020-07-29 14:30:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578020 AND AD_Language='de_DE' ; -- 2020-07-29T11:30:58.190Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578020,'de_DE') ; -- 2020-07-29T11:30:58.197Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(578020,'de_DE') ; -- 2020-07-29T11:30:58.201Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsGoods', Name='Ware', Description=NULL, Help=NULL WHERE AD_Element_ID=578020 ; -- 2020-07-29T11:30:58.203Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsGoods', Name='Ware', Description=NULL, Help=NULL, AD_Element_ID=578020 WHERE UPPER(ColumnName)='ISGOODS' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-07-29T11:30:58.204Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsGoods', Name='Ware', Description=NULL, Help=NULL WHERE AD_Element_ID=578020 AND IsCentrallyMaintained='Y' ; -- 2020-07-29T11:30:58.205Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Ware', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=578020) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 578020) ; -- 2020-07-29T11:30:58.214Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Ware', Name='Ware' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=578020) ; -- 2020-07-29T11:30:58.216Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Ware', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 578020 ; -- 2020-07-29T11:30:58.218Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Ware', Description=NULL, Help=NULL WHERE AD_Element_ID = 578020 ; -- 2020-07-29T11:30:58.219Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Ware', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 578020 ; -- 2020-07-29T11:30:59.919Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2020-07-29 14:30:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578020 AND AD_Language='en_US' ; -- 2020-07-29T11:30:59.920Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578020,'en_US') ; -- 2020-07-29T11:40:36.109Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Help='"IsGoods" is the opposite of "IsTradingUnit". If a ProductCategory is "Goods" ("Ware"), then it is not a Trading Unit ("Gebinde").',Updated=TO_TIMESTAMP('2020-07-29 14:40:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578020 ; -- 2020-07-29T11:40:36.112Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsGoods', Name='Ware', Description=NULL, Help='"IsGoods" is the opposite of "IsTradingUnit". If a ProductCategory is "Goods" ("Ware"), then it is not a Trading Unit ("Gebinde").' WHERE AD_Element_ID=578020 ; -- 2020-07-29T11:40:36.113Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsGoods', Name='Ware', Description=NULL, Help='"IsGoods" is the opposite of "IsTradingUnit". If a ProductCategory is "Goods" ("Ware"), then it is not a Trading Unit ("Gebinde").', AD_Element_ID=578020 WHERE UPPER(ColumnName)='ISGOODS' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-07-29T11:40:36.114Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsGoods', Name='Ware', Description=NULL, Help='"IsGoods" is the opposite of "IsTradingUnit". If a ProductCategory is "Goods" ("Ware"), then it is not a Trading Unit ("Gebinde").' WHERE AD_Element_ID=578020 AND IsCentrallyMaintained='Y' ; -- 2020-07-29T11:40:36.115Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Ware', Description=NULL, Help='"IsGoods" is the opposite of "IsTradingUnit". If a ProductCategory is "Goods" ("Ware"), then it is not a Trading Unit ("Gebinde").' WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=578020) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 578020) ; -- 2020-07-29T11:40:36.120Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Ware', Description=NULL, Help='"IsGoods" is the opposite of "IsTradingUnit". If a ProductCategory is "Goods" ("Ware"), then it is not a Trading Unit ("Gebinde").', CommitWarning = NULL WHERE AD_Element_ID = 578020 ; -- 2020-07-29T11:40:36.122Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Ware', Description=NULL, Help='"IsGoods" is the opposite of "IsTradingUnit". If a ProductCategory is "Goods" ("Ware"), then it is not a Trading Unit ("Gebinde").' WHERE AD_Element_ID = 578020 ; -- 2020-07-29T11:40:36.123Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Ware', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 578020 ;
the_stack
CREATE DATABASE flow; use flow; -- flow.dispatcher_callback definition CREATE TABLE `dispatcher_callback` ( `id` varchar(40) NOT NULL, `type` varchar(10) NOT NULL COMMENT '回调类型', `task_def_key` varchar(64) DEFAULT NULL, `process_instance_id` varchar(64) DEFAULT NULL, `other_info` varchar(255) DEFAULT NULL COMMENT '其他信息', `creator_id` varchar(40) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- flow.flow definition CREATE TABLE `flow` ( `id` varchar(40) NOT NULL DEFAULT '' COMMENT '流程id', `app_id` varchar(100) NOT NULL DEFAULT '' COMMENT '应用id', `source_id` varchar(100) NOT NULL DEFAULT '' COMMENT '源头流程id', `name` varchar(50) NOT NULL DEFAULT '' COMMENT '流程名称', `trigger_mode` varchar(10) NOT NULL DEFAULT '' COMMENT '触发方式', `form_id` varchar(100) NOT NULL DEFAULT '', `bpmn_text` text NOT NULL COMMENT '流程xml文件内容', `process_key` varchar(200) NOT NULL DEFAULT '' COMMENT '流程key', `status` varchar(10) NOT NULL DEFAULT '' COMMENT '状态', `can_cancel` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否允许撤回', `can_urge` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否允许催办', `can_view_status_msg` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否允许查看状态和留言', `can_msg` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否允许留言', `can_cancel_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '允许撤回类型', `can_cancel_nodes` varchar(1000) NOT NULL DEFAULT '' COMMENT '指定节点允许撤回', `instance_name` varchar(1000) NOT NULL DEFAULT '' COMMENT '流程实例标题', `key_fields` varchar(1000) NOT NULL DEFAULT '' COMMENT '流程摘要', `process_id` varchar(40) NOT NULL DEFAULT '' COMMENT 'process中流程的id', `creator_id` varchar(40) NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程表'; -- flow.flow_abnormal_task definition CREATE TABLE `flow_abnormal_task` ( `id` varchar(40) NOT NULL DEFAULT '', `flow_instance_id` varchar(100) NOT NULL DEFAULT '' COMMENT '流程实例id', `process_instance_id` varchar(100) NOT NULL DEFAULT '' COMMENT 'camunda流程实例id', `task_id` varchar(100) NOT NULL DEFAULT '' COMMENT '任务id', `task_name` varchar(100) NOT NULL DEFAULT '' COMMENT '任务名称', `task_def_key` varchar(100) NOT NULL DEFAULT '' COMMENT '任务key', `reason` varchar(100) NOT NULL DEFAULT '' COMMENT '异常原因', `remark` varchar(100) NOT NULL DEFAULT '' COMMENT '备注', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态', `creator_id` varchar(40) NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='异常任务'; -- flow.flow_comment definition CREATE TABLE `flow_comment` ( `id` varchar(40) NOT NULL COMMENT '主键', `flow_instance_id` varchar(40) NOT NULL DEFAULT '' COMMENT '流程实例id', `comment_user_id` varchar(40) NOT NULL DEFAULT '' COMMENT '讨论人id', `content` text NOT NULL COMMENT '讨论内容', `creator_id` varchar(40) NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `flow_comment_flow_instance_id_index` (`flow_instance_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- flow.flow_comment_attachment definition CREATE TABLE `flow_comment_attachment` ( `id` varchar(40) NOT NULL COMMENT '主键', `flow_comment_id` varchar(40) NOT NULL COMMENT '流程讨论表id', `attachment_name` varchar(300) NOT NULL DEFAULT '' COMMENT '附件名称', `attachment_url` varchar(500) NOT NULL DEFAULT '' COMMENT '附件地址', `creator_id` varchar(40) NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `flow_comment_attachment_flow_comment_id_index` (`flow_comment_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- flow.flow_instance definition CREATE TABLE `flow_instance` ( `id` varchar(40) NOT NULL DEFAULT '' COMMENT '流程实例id', `app_id` varchar(100) NOT NULL DEFAULT '' COMMENT '应用id', `app_name` varchar(100) NOT NULL DEFAULT '' COMMENT '应用名称', `flow_id` varchar(40) NOT NULL DEFAULT '' COMMENT '流程id', `process_instance_id` varchar(100) NOT NULL DEFAULT '' COMMENT 'camunda流程实例id', `form_id` varchar(100) DEFAULT '' COMMENT '表单id', `form_instance_id` varchar(40) NOT NULL DEFAULT '' COMMENT '表单数据id', `name` varchar(100) NOT NULL DEFAULT '' COMMENT '流程名称', `apply_no` varchar(500) NOT NULL DEFAULT '' COMMENT '流水号', `apply_user_id` varchar(40) NOT NULL DEFAULT '' COMMENT '申请人id', `apply_user_name` varchar(100) NOT NULL DEFAULT '' COMMENT '申请人姓名', `status` varchar(30) NOT NULL DEFAULT '' COMMENT '审批单状态', `creator_id` varchar(40) NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程实例'; -- flow.flow_instance_step definition CREATE TABLE `flow_instance_step` ( `id` varchar(64) NOT NULL COMMENT '主键', `process_instance_id` varchar(64) NOT NULL DEFAULT '' COMMENT '流程实例id', `task_id` varchar(64) NOT NULL DEFAULT '' COMMENT '任务id', `task_type` varchar(20) NOT NULL DEFAULT '' COMMENT '节点类型:或签、会签、任填、全填、开始、结束', `task_def_key` varchar(255) NOT NULL DEFAULT '' COMMENT '流程节点定义key', `task_name` varchar(64) NOT NULL DEFAULT '' COMMENT '任务名称', `node_instance_id` varchar(64) NOT NULL DEFAULT '' COMMENT '节点实例ID', `handle_user_ids` varchar(4000) NOT NULL DEFAULT '' COMMENT '处理人', `status` varchar(20) NOT NULL DEFAULT '' COMMENT '步骤处理结果,通过、拒绝、完成填写、已回退、打回重填、自动跳过、自动交给管理员', `creator_id` varchar(40) NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程实例步骤表'; -- flow.flow_instance_variables definition CREATE TABLE `flow_instance_variables` ( `id` varchar(40) NOT NULL DEFAULT '' COMMENT '主键', `process_instance_id` varchar(40) NOT NULL DEFAULT '' COMMENT '流程实例id', `name` varchar(50) NOT NULL DEFAULT '' COMMENT '变量名称SYSTEM:系统变量 CUSTOM:自定义变量', `type` varchar(20) NOT NULL DEFAULT '' COMMENT '变量类型', `code` varchar(50) NOT NULL DEFAULT '' COMMENT '变量标识', `field_type` varchar(50) NOT NULL DEFAULT '' COMMENT '字段类型', `format` varchar(50) NOT NULL DEFAULT '' COMMENT '字段格式', `value` varchar(255) NOT NULL DEFAULT '' COMMENT '变量值', `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '注释', `creator_id` varchar(40) NOT NULL DEFAULT '', `create_time` varchar(40) DEFAULT NULL, `modifier_id` varchar(40) NOT NULL DEFAULT '', `modify_time` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`), KEY `flow_id` (`process_instance_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程实例变量表'; -- flow.flow_operation_record definition CREATE TABLE `flow_operation_record` ( `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `process_instance_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `instance_step_id` varchar(64) NOT NULL DEFAULT '' COMMENT '流程实例环节表主键', `handle_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '处理人', `handle_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `handle_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `task_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `task_name` varchar(100) NOT NULL DEFAULT '', `task_def_key` varchar(255) NOT NULL DEFAULT '' COMMENT '任务定义的ID', `remark` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `correlation_data` text NOT NULL, `status` varchar(20) NOT NULL DEFAULT '', `creator_id` varchar(40) NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程操作记录'; -- flow.flow_trigger_rule definition CREATE TABLE `flow_trigger_rule` ( `id` varchar(40) NOT NULL DEFAULT '' COMMENT 'id', `flow_id` varchar(100) NOT NULL DEFAULT '' COMMENT '流程id', `form_id` varchar(100) NOT NULL DEFAULT '' COMMENT '表单id', `rule` text NOT NULL COMMENT '规则', `creator_id` varchar(40) NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程触发规则'; -- flow.flow_urge definition CREATE TABLE `flow_urge` ( `id` varchar(40) NOT NULL, `task_id` varchar(64) DEFAULT NULL COMMENT '任务id', `process_instance_id` varchar(64) DEFAULT NULL COMMENT '流程实例id', `creator_id` varchar(40) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '创建人', `create_time` varchar(40) DEFAULT NULL COMMENT '创建时间', `modifier_id` varchar(40) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '更新人', `modify_time` varchar(40) DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- flow.flow_variables definition CREATE TABLE `flow_variables` ( `id` varchar(40) NOT NULL DEFAULT '' COMMENT '主键', `flow_id` varchar(40) NOT NULL DEFAULT '' COMMENT '流程id', `name` varchar(50) NOT NULL DEFAULT '' COMMENT '变量名称SYSTEM:系统变量 CUSTOM:自定义变量', `type` varchar(20) NOT NULL DEFAULT '' COMMENT '变量类型', `code` varchar(50) NOT NULL DEFAULT '' COMMENT '变量标识', `field_type` varchar(50) NOT NULL DEFAULT '' COMMENT '字段类型', `format` varchar(50) NOT NULL DEFAULT '' COMMENT '字段格式', `default_value` varchar(255) NOT NULL DEFAULT '' COMMENT '默认值', `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '注释', `creator_id` varchar(40) NOT NULL DEFAULT '', `create_time` varchar(40) DEFAULT NULL, `modifier_id` varchar(40) NOT NULL DEFAULT '', `modify_time` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`), KEY `flow_id` (`flow_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工作流变量表'; -- flow.instance_execution definition CREATE TABLE `instance_execution` ( `id` varchar(40) NOT NULL DEFAULT '' COMMENT '主键', `process_instance_id` varchar(40) NOT NULL DEFAULT '' COMMENT '流程实例id', `execution_id` varchar(50) NOT NULL DEFAULT '' COMMENT 'executionid', `result` varchar(20) NOT NULL DEFAULT '' COMMENT '分支结果:通过、拒绝', `creator_id` varchar(40) NOT NULL DEFAULT '', `create_time` varchar(40) DEFAULT NULL, `modifier_id` varchar(40) NOT NULL DEFAULT '', `modify_time` varchar(40) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO flow_variables (id,flow_id,name,`type`,code,field_type,format,default_value,`desc`,creator_id,create_time,modifier_id,modify_time) VALUES ('1','0','流程发起人','SYSTEM','flowVar_instanceCreatorName','string','','','','0','2021-09-14T14:30:18+0000','0','2021-09-14T14:30:18+0000'), ('2','0','流程发起时间','SYSTEM','flowVar_instanceCreateTime','datetime','','','','0','2021-09-14T14:30:18+0000','0','2021-09-14T14:30:18+0000'), ('3','0','流程状态','SYSTEM','flowVar_instanceStatus','string','','','','0','2021-09-14T14:30:18+0000','0','2021-09-14T14:30:18+0000'); CREATE TABLE `flow_form_field` ( `id` varchar(40) NOT NULL DEFAULT '' COMMENT '主键', `flow_id` varchar(40) NOT NULL DEFAULT '' COMMENT '流程id', `form_id` varchar(50) NOT NULL DEFAULT '' COMMENT '表单id', `field_name` varchar(50) NOT NULL DEFAULT '' COMMENT '字段名', `field_value_path` varchar(100) NOT NULL DEFAULT '' COMMENT '字段值path', `creator_id` varchar(40) NOT NULL DEFAULT '', `create_time` varchar(40) DEFAULT NULL, `modifier_id` varchar(40) NOT NULL DEFAULT '', `modify_time` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`), KEY `flow_id` (`flow_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工作流表单字段'; ALTER TABLE flow_operation_record ADD rel_node_def_key varchar(255) NOT NULL DEFAULT '' COMMENT '关联的node节点'; update flow_variables set field_type ="string" where field_type ='TEXT'; update flow_variables set field_type ="boolean" where field_type ='BOOLEAN'; update flow_variables set field_type ="datetime" where field_type ='DATE'; update flow_variables set field_type ="number" where field_type ='NUMBER' ; update flow_instance_variables set field_type ="string" where field_type ='TEXT'; update flow_instance_variables set field_type ="boolean" where field_type ='BOOLEAN'; update flow_instance_variables set field_type ="datetime" where field_type ='DATE'; update flow_instance_variables set field_type ="number" where field_type ='NUMBER' ;
the_stack
-- this was missing on one user's DB, so we insert it again, if needed -- 2020-09-17T11:17:39.003Z -- URL zum Konzept INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) select 0,578113,0,'Parameter_M_Warehouse_ID',TO_TIMESTAMP('2020-09-17 14:17:38','YYYY-MM-DD HH24:MI:SS'),100,'Lager oder Ort für Dienstleistung','D','Das Lager identifiziert ein einzelnes Lager für Artikel oder einen Standort an dem Dienstleistungen geboten werden.','Y','Lager','Lager',TO_TIMESTAMP('2020-09-17 14:17:38','YYYY-MM-DD HH24:MI:SS'),100 where not exists (select 1 from ad_element where ad_element_id=578113); ; -- 2020-09-17T11:17:39.110Z -- URL zum Konzept INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=578113 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2021-05-26T17:37:41.395Z -- URL zum Konzept INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsNotifyUserAfterExecution,IsOneInstanceOnly,IsReport,IsTranslateExcelHeaders,IsUseBPartnerLanguage,LockWaitTimeout,Name,PostgrestResponseFormat,RefreshAllAfterExecution,ShowHelp,Type,Updated,UpdatedBy,Value) VALUES ('3',0,0,584834,'Y','de.metas.impexp.excel.process.ExportToExcelProcess','N',TO_TIMESTAMP('2021-05-26 20:37:40','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.acct','Y','N','N','N','N','N','N','Y','Y',0,'Products with QtyBook (Excel)','json','N','N','Excel',TO_TIMESTAMP('2021-05-26 20:37:40','YYYY-MM-DD HH24:MI:SS'),100,'M_Product_QtyBooked_For_Date') ; -- 2021-05-26T17:37:41.632Z -- URL zum Konzept INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_ID=584834 AND NOT EXISTS (SELECT 1 FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) ; -- 2021-05-26T17:39:37.927Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,2700,0,584834,542007,30,'M_CostElement_ID',TO_TIMESTAMP('2021-05-26 20:39:37','YYYY-MM-DD HH24:MI:SS'),100,'@SQL=SELECT ce.M_CostElement_ID AS DefaultValue FROM M_CostElement ce JOIN c_acctschema sch on ce.costingmethod = sch.costingmethod JOIN ad_clientinfo ci on sch.c_acctschema_id = ci.c_acctschema1_id WHERE ci.ad_client_id = @#AD_Client_ID@','Produkt-Kostenart','de.metas.acct',0,'Y','N','Y','N','Y','N','Kostenart',10,TO_TIMESTAMP('2021-05-26 20:39:37','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-26T17:39:37.968Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=542007 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-26T17:40:13.357Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,577422,0,584834,542008,30,540272,'Parameter_M_Product_ID',TO_TIMESTAMP('2021-05-26 20:40:12','YYYY-MM-DD HH24:MI:SS'),100,'Produkt, Leistung, Artikel','de.metas.acct',0,'Bezeichnet eine Einheit, die in dieser Organisation gekauft oder verkauft wird.','Y','N','Y','N','N','N','Produkt',20,TO_TIMESTAMP('2021-05-26 20:40:12','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-26T17:40:13.398Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=542008 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-26T17:40:37Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,578113,0,584834,542009,30,540420,'Parameter_M_Warehouse_ID',TO_TIMESTAMP('2021-05-26 20:40:36','YYYY-MM-DD HH24:MI:SS'),100,'Lager oder Ort für Dienstleistung','de.metas.acct',0,'Das Lager identifiziert ein einzelnes Lager für Artikel oder einen Standort an dem Dienstleistungen geboten werden.','Y','N','Y','N','N','N','Lager',30,TO_TIMESTAMP('2021-05-26 20:40:36','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-26T17:40:37.048Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=542009 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-26T17:41:21.425Z -- URL zum Konzept INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,577762,0,584834,542010,15,'Date',TO_TIMESTAMP('2021-05-26 20:41:21','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.acct',0,'Y','N','Y','N','N','N','Datum',40,TO_TIMESTAMP('2021-05-26 20:41:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-26T17:41:21.453Z -- URL zum Konzept INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Process_Para_ID=542010 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2021-05-26T17:42:42.809Z -- URL zum Konzept UPDATE AD_Process SET SQLStatement='SELECT * FROM "de_metas_acct".report_M_Product_QtyBooked_For_Date( @M_CostElement_ID/-1@, @Parameter_M_Product_ID@, @Parameter_M_Warehouse_ID@, ''@Date@'')',Updated=TO_TIMESTAMP('2021-05-26 20:42:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=584834 ; -- 2021-05-26T17:47:09.493Z -- URL zum Konzept UPDATE AD_Process SET Name='Products with QtyBook',Updated=TO_TIMESTAMP('2021-05-26 20:47:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=584834 ; -- 2021-05-26T17:47:09.493Z -- URL zum Konzept UPDATE AD_Process SET Name='Products with QtyBook',Updated=TO_TIMESTAMP('2021-05-26 20:47:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=584834 ; -- 2021-05-26T17:49:12.416Z -- URL zum Konzept INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,579258,0,TO_TIMESTAMP('2021-05-26 20:49:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Products with QtyBook','Products with QtyBook',TO_TIMESTAMP('2021-05-26 20:49:12','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-26T17:49:12.632Z -- URL zum Konzept INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=579258 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2021-05-26T17:49:55.870Z -- URL zum Konzept INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Element_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Created,CreatedBy,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('P',0,579258,541717,0,584834,TO_TIMESTAMP('2021-05-26 20:49:55','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.acct','M_Product_QtyBooked_For_Date','Y','N','N','N','N','Products with QtyBook',TO_TIMESTAMP('2021-05-26 20:49:55','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2021-05-26T17:49:55.977Z -- URL zum Konzept INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Menu_ID, t.Description,t.Name,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Menu_ID=541717 AND NOT EXISTS (SELECT 1 FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) ; -- 2021-05-26T17:49:56.024Z -- URL zum Konzept INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', now(), 100, now(), 100,t.AD_Tree_ID, 541717, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.AD_Table_ID=116 AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=541717) ; -- 2021-05-26T17:49:56.102Z -- URL zum Konzept /* DDL */ select update_menu_translation_from_ad_element(579258) ; -- 2021-05-26T17:49:58.598Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=541584 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.638Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=540905 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.663Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=540814 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.710Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=541297 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.741Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=540803 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.763Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=541377 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.810Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=540904 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.841Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=540749 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.879Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=540779 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.910Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=540910 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.948Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=541308 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:58.980Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=541313 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.011Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=540758 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.042Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=540759 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.081Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=540806 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.102Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=540891 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.133Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=540896 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.180Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=540903 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.211Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=541405 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.242Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=540906 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.265Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=20, Updated=now(), UpdatedBy=100 WHERE Node_ID=541455 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.327Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=21, Updated=now(), UpdatedBy=100 WHERE Node_ID=541710 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.365Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=22, Updated=now(), UpdatedBy=100 WHERE Node_ID=541454 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.396Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=23, Updated=now(), UpdatedBy=100 WHERE Node_ID=540907 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.428Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=24, Updated=now(), UpdatedBy=100 WHERE Node_ID=540908 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.465Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=25, Updated=now(), UpdatedBy=100 WHERE Node_ID=541015 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.497Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=26, Updated=now(), UpdatedBy=100 WHERE Node_ID=541016 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.528Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=27, Updated=now(), UpdatedBy=100 WHERE Node_ID=541042 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.566Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=28, Updated=now(), UpdatedBy=100 WHERE Node_ID=315 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.597Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=29, Updated=now(), UpdatedBy=100 WHERE Node_ID=541368 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.630Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=30, Updated=now(), UpdatedBy=100 WHERE Node_ID=541120 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.650Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=31, Updated=now(), UpdatedBy=100 WHERE Node_ID=541125 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.682Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=32, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000056 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.713Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=33, Updated=now(), UpdatedBy=100 WHERE Node_ID=541304 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.751Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=34, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000064 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.782Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=35, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000072 AND AD_Tree_ID=10 ; -- 2021-05-26T17:49:59.813Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=36, Updated=now(), UpdatedBy=100 WHERE Node_ID=541717 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.450Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=541584 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.480Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=540905 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.520Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=540814 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.551Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=541297 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.592Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=540803 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.622Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=541377 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.659Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=540904 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.688Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=540749 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.720Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=540779 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.759Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=540910 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.791Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=541308 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.824Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=541313 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.859Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=540758 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.904Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=540759 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.935Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=540806 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.966Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=540891 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:02.997Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=540896 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.033Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=540903 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.064Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=541405 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.094Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=540906 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.125Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=20, Updated=now(), UpdatedBy=100 WHERE Node_ID=541455 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.160Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=21, Updated=now(), UpdatedBy=100 WHERE Node_ID=541710 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.198Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=22, Updated=now(), UpdatedBy=100 WHERE Node_ID=541717 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.221Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=23, Updated=now(), UpdatedBy=100 WHERE Node_ID=541454 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.269Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=24, Updated=now(), UpdatedBy=100 WHERE Node_ID=540907 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.310Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=25, Updated=now(), UpdatedBy=100 WHERE Node_ID=540908 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.341Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=26, Updated=now(), UpdatedBy=100 WHERE Node_ID=541015 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.371Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=27, Updated=now(), UpdatedBy=100 WHERE Node_ID=541016 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.402Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=28, Updated=now(), UpdatedBy=100 WHERE Node_ID=541042 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.433Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=29, Updated=now(), UpdatedBy=100 WHERE Node_ID=315 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.464Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=30, Updated=now(), UpdatedBy=100 WHERE Node_ID=541368 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.505Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=31, Updated=now(), UpdatedBy=100 WHERE Node_ID=541120 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.536Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=32, Updated=now(), UpdatedBy=100 WHERE Node_ID=541125 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.572Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=33, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000056 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.613Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=34, Updated=now(), UpdatedBy=100 WHERE Node_ID=541304 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.644Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=35, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000064 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:03.675Z -- URL zum Konzept UPDATE AD_TreeNodeMM SET Parent_ID=1000015, SeqNo=36, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000072 AND AD_Tree_ID=10 ; -- 2021-05-26T17:50:24.922Z -- URL zum Konzept UPDATE AD_Element_Trl SET Name='Products With QtyBook', PrintName='Products With QtyBook',Updated=TO_TIMESTAMP('2021-05-26 20:50:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='de_DE' ; -- 2021-05-26T17:50:24.962Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'de_DE') ; -- 2021-05-26T17:50:25.054Z -- URL zum Konzept /* DDL */ select update_ad_element_on_ad_element_trl_update(579258,'de_DE') ; -- 2021-05-26T17:50:25.085Z -- URL zum Konzept UPDATE AD_Column SET ColumnName=NULL, Name='Products With QtyBook', Description=NULL, Help=NULL WHERE AD_Element_ID=579258 ; -- 2021-05-26T17:50:25.123Z -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName=NULL, Name='Products With QtyBook', Description=NULL, Help=NULL WHERE AD_Element_ID=579258 AND IsCentrallyMaintained='Y' ; -- 2021-05-26T17:50:25.154Z -- URL zum Konzept UPDATE AD_Field SET Name='Products With QtyBook', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=579258) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 579258) ; -- 2021-05-26T17:50:25.217Z -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Products With QtyBook', Name='Products With QtyBook' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=579258) ; -- 2021-05-26T17:50:25.255Z -- URL zum Konzept UPDATE AD_Tab SET Name='Products With QtyBook', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 579258 ; -- 2021-05-26T17:50:25.286Z -- URL zum Konzept UPDATE AD_WINDOW SET Name='Products With QtyBook', Description=NULL, Help=NULL WHERE AD_Element_ID = 579258 ; -- 2021-05-26T17:50:25.324Z -- URL zum Konzept UPDATE AD_Menu SET Name = 'Products With QtyBook', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 579258 ; -- 2021-05-26T17:50:28.463Z -- URL zum Konzept UPDATE AD_Element_Trl SET Name='Products With QtyBook', PrintName='Products With QtyBook',Updated=TO_TIMESTAMP('2021-05-26 20:50:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='de_CH' ; -- 2021-05-26T17:50:28.478Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'de_CH') ; -- 2021-05-26T17:50:32.323Z -- URL zum Konzept UPDATE AD_Element_Trl SET Name='Products With QtyBook', PrintName='Products With QtyBook',Updated=TO_TIMESTAMP('2021-05-26 20:50:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='en_US' ; -- 2021-05-26T17:50:32.345Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'en_US') ; -- 2021-05-26T17:50:35.933Z -- URL zum Konzept UPDATE AD_Element_Trl SET Name='Products With QtyBook', PrintName='Products With QtyBook',Updated=TO_TIMESTAMP('2021-05-26 20:50:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='nl_NL' ; -- 2021-05-26T17:50:35.971Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'nl_NL') ; -- 2021-05-26T17:55:41.479Z -- URL zum Konzept UPDATE AD_Process SET SQLStatement='SELECT * FROM "de_metas_acct".report_M_Product_QtyBooked_For_Date( @M_CostElement_ID/-1@, @Parameter_M_Product_ID/-1@, @Parameter_M_Warehouse_ID/-1@, ''@Date@'')',Updated=TO_TIMESTAMP('2021-05-26 20:55:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=584834 ; -- 2021-05-27T16:30:27.270Z -- URL zum Konzept UPDATE AD_Process SET Name='Buchbestand (Excel)',Updated=TO_TIMESTAMP('2021-05-27 19:30:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=584834 ; -- 2021-05-27T16:30:27.730Z -- URL zum Konzept UPDATE AD_Menu SET Description=NULL, IsActive='Y', Name='Buchbestand (Excel)',Updated=TO_TIMESTAMP('2021-05-27 19:30:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=541717 ; -- 2021-05-27T16:30:37.901Z -- URL zum Konzept UPDATE AD_Process_Trl SET IsTranslated='Y', Name='Buchbestand (Excel)',Updated=TO_TIMESTAMP('2021-05-27 19:30:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='de_CH' AND AD_Process_ID=584834 ; -- 2021-05-27T16:31:27.412Z -- URL zum Konzept UPDATE AD_Element_Trl SET Name='Buchbestand (Excel)', PrintName='Buchbestand (Excel)',Updated=TO_TIMESTAMP('2021-05-27 19:31:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='de_CH' ; -- 2021-05-27T16:31:27.549Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'de_CH') ; -- 2021-05-27T16:31:31.001Z -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Buchbestand (Excel)', PrintName='Buchbestand (Excel)',Updated=TO_TIMESTAMP('2021-05-27 19:31:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='de_DE' ; -- 2021-05-27T16:31:31.147Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'de_DE') ; -- 2021-05-27T16:31:31.220Z -- URL zum Konzept /* DDL */ select update_ad_element_on_ad_element_trl_update(579258,'de_DE') ; -- 2021-05-27T16:31:31.257Z -- URL zum Konzept UPDATE AD_Column SET ColumnName=NULL, Name='Buchbestand (Excel)', Description=NULL, Help=NULL WHERE AD_Element_ID=579258 ; -- 2021-05-27T16:31:31.291Z -- URL zum Konzept UPDATE AD_Process_Para SET ColumnName=NULL, Name='Buchbestand (Excel)', Description=NULL, Help=NULL WHERE AD_Element_ID=579258 AND IsCentrallyMaintained='Y' ; -- 2021-05-27T16:31:31.323Z -- URL zum Konzept UPDATE AD_Field SET Name='Buchbestand (Excel)', Description=NULL, Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=579258) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 579258) ; -- 2021-05-27T16:31:31.589Z -- URL zum Konzept UPDATE AD_PrintFormatItem pi SET PrintName='Buchbestand (Excel)', Name='Buchbestand (Excel)' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=579258) ; -- 2021-05-27T16:31:31.621Z -- URL zum Konzept UPDATE AD_Tab SET Name='Buchbestand (Excel)', Description=NULL, Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 579258 ; -- 2021-05-27T16:31:31.656Z -- URL zum Konzept UPDATE AD_WINDOW SET Name='Buchbestand (Excel)', Description=NULL, Help=NULL WHERE AD_Element_ID = 579258 ; -- 2021-05-27T16:31:31.691Z -- URL zum Konzept UPDATE AD_Menu SET Name = 'Buchbestand (Excel)', Description = NULL, WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 579258 ; -- 2021-05-27T16:31:40.109Z -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Products With Booked Quantity', PrintName='Products With Booked Quantity',Updated=TO_TIMESTAMP('2021-05-27 19:31:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='en_US' ; -- 2021-05-27T16:31:40.235Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'en_US') ; -- 2021-05-27T16:31:45.789Z -- URL zum Konzept UPDATE AD_Element_Trl SET Name='Products With Booked Quantity', PrintName='Products With Booked Quantity',Updated=TO_TIMESTAMP('2021-05-27 19:31:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='nl_NL' ; -- 2021-05-27T16:31:45.914Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'nl_NL') ; -- 2021-05-27T16:31:49.299Z -- URL zum Konzept UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2021-05-27 19:31:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579258 AND AD_Language='de_CH' ; -- 2021-05-27T16:31:49.446Z -- URL zum Konzept /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(579258,'de_CH') ; -- 2021-05-27T16:32:01.510Z -- URL zum Konzept UPDATE AD_Process_Trl SET IsTranslated='Y', Name='Products With Booked Quantity',Updated=TO_TIMESTAMP('2021-05-27 19:32:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='en_US' AND AD_Process_ID=584834 ; -- 2021-05-27T16:32:06.444Z -- URL zum Konzept UPDATE AD_Process_Trl SET Name='Products With Booked Quantity',Updated=TO_TIMESTAMP('2021-05-27 19:32:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Language='nl_NL' AND AD_Process_ID=584834 ;
the_stack
-- phpMyAdmin SQL Dump -- version 2.11.9.2 -- http://www.phpmyadmin.net -- -- 主机: localhost -- 生成日期: 2013 年 08 月 28 日 16:00 -- 服务器版本: 5.1.28 -- PHP 版本: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- 数据库: `thinkphp_system` -- -- -------------------------------------------------------- -- -- 表的结构 `tp_access` -- CREATE TABLE IF NOT EXISTS `tp_access` ( `role_id` smallint(6) unsigned NOT NULL, `node_id` smallint(6) unsigned NOT NULL, `pid` smallint(6) unsigned NOT NULL, `level` tinyint(1) NOT NULL, `module` varchar(50) DEFAULT NULL, KEY `groupId` (`role_id`), KEY `nodeId` (`node_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- 导出表中的数据 `tp_access` -- INSERT INTO `tp_access` (`role_id`, `node_id`, `pid`, `level`, `module`) VALUES (1, 20, 19, 3, NULL), (1, 19, 1, 2, NULL), (1, 17, 8, 3, NULL), (1, 11, 8, 3, NULL), (1, 10, 8, 3, NULL), (1, 9, 8, 3, NULL), (1, 16, 8, 3, NULL), (1, 8, 28, 2, NULL), (1, 28, 13, 0, NULL), (1, 13, 1, 0, NULL), (1, 6, 2, 3, NULL), (1, 7, 2, 3, NULL), (1, 4, 2, 3, NULL), (1, 5, 2, 3, NULL), (1, 3, 2, 3, NULL), (1, 2, 1, 2, NULL), (1, 38, 21, 3, NULL), (1, 37, 21, 3, NULL), (1, 33, 21, 3, NULL), (1, 32, 21, 3, NULL), (1, 31, 21, 3, NULL), (3, 5, 2, 3, NULL), (3, 3, 2, 3, NULL), (3, 2, 1, 2, NULL), (3, 38, 21, 3, NULL), (3, 37, 21, 3, NULL), (3, 33, 21, 3, NULL), (3, 32, 21, 3, NULL), (3, 31, 21, 3, NULL), (3, 23, 21, 3, NULL), (3, 22, 21, 3, NULL), (3, 40, 21, 3, NULL), (3, 36, 21, 3, NULL), (3, 35, 21, 3, NULL), (3, 34, 21, 3, NULL), (3, 30, 21, 3, NULL), (3, 21, 18, 2, NULL), (3, 18, 1, 0, NULL), (3, 62, 46, 0, NULL), (3, 49, 46, 0, NULL), (3, 47, 46, 3, NULL), (3, 46, 45, 2, NULL), (3, 45, 1, 0, NULL), (3, 15, 25, 0, NULL), (1, 23, 21, 3, NULL), (1, 22, 21, 3, NULL), (1, 36, 21, 3, NULL), (1, 35, 21, 3, NULL), (1, 34, 21, 3, NULL), (1, 30, 21, 3, NULL), (1, 21, 18, 2, NULL), (3, 25, 14, 0, NULL), (3, 14, 1, 0, NULL), (3, 1, 0, 1, NULL), (1, 18, 1, 0, NULL), (1, 15, 25, 0, NULL), (1, 25, 14, 0, NULL), (1, 14, 1, 0, NULL), (1, 1, 0, 1, NULL), (2, 61, 59, 3, NULL), (2, 60, 59, 3, NULL), (2, 59, 58, 2, NULL), (2, 58, 1, 0, NULL), (2, 57, 54, 3, NULL), (2, 56, 54, 3, NULL), (2, 55, 54, 3, NULL), (2, 54, 53, 2, NULL), (2, 53, 1, 0, NULL), (2, 20, 19, 3, NULL), (2, 19, 1, 2, NULL), (1, 53, 1, 0, NULL), (1, 54, 53, 2, NULL), (1, 55, 54, 3, NULL), (1, 56, 54, 3, NULL), (1, 57, 54, 3, NULL), (2, 6, 2, 3, NULL), (2, 7, 2, 3, NULL), (2, 4, 2, 3, NULL), (2, 5, 2, 3, NULL), (2, 3, 2, 3, NULL), (2, 2, 1, 2, NULL), (2, 15, 25, 0, NULL), (2, 25, 14, 0, NULL), (2, 14, 1, 0, NULL), (2, 1, 0, 1, NULL), (3, 4, 2, 3, NULL), (3, 7, 2, 3, NULL), (3, 6, 2, 3, NULL), (3, 19, 1, 2, NULL), (3, 20, 19, 3, NULL); -- -------------------------------------------------------- -- -- 表的结构 `tp_files` -- CREATE TABLE IF NOT EXISTS `tp_files` ( `id` int(16) NOT NULL AUTO_INCREMENT, `original_name` varchar(32) NOT NULL, `file_name` varchar(32) NOT NULL, `file_size` int(10) NOT NULL, `file_type` varchar(16) DEFAULT NULL, `upload_time` varchar(27) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ; -- -- 导出表中的数据 `tp_files` -- INSERT INTO `tp_files` (`id`, `original_name`, `file_name`, `file_size`, `file_type`, `upload_time`) VALUES (1, '7logo.jpg', '1376381423.jpg', 3502, 'image/jpeg', '1376381423'), (2, 'login_member.jpg', '1376381667.jpg', 32845, 'image/jpeg', '1376381667'), (3, 'QQ图片20130606132717.jpg', '1376381707.jpg', 10274, 'image/jpeg', '1376381707'), (5, 'M.jpg', '1376382199.jpg', 113314, 'image/jpeg', '1376382199'), (6, 'SAP系统状态信息.jpg', '1376387602.jpg', 90951, 'image/jpeg', '1376387602'), (7, '01.jpg', '1376446447.jpg', 140782, 'image/jpeg', '1376446447'), (8, '文本文档01.txt', '1376446464.txt', 301, 'text/plain', '1376446464'), (9, '新建 Microsoft Office Word 文档.docx', '1376446476.docx', 11873, 'application/vnd.', '1376446476'), (10, 'qp_area.xlsx', '1376446488.xlsx', 9784, 'application/vnd.', '1376446488'); -- -------------------------------------------------------- -- -- 表的结构 `tp_member` -- CREATE TABLE IF NOT EXISTS `tp_member` ( `id` int(8) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(32) CHARACTER SET utf8 NOT NULL, `password` char(32) NOT NULL, `email` varchar(64) CHARACTER SET utf8 NOT NULL, `reg_time` int(11) unsigned NOT NULL, `last_login_time` varchar(16) CHARACTER SET utf8 DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- 导出表中的数据 `tp_member` -- INSERT INTO `tp_member` (`id`, `username`, `password`, `email`, `reg_time`, `last_login_time`) VALUES (1, 'admin', '7fef6171469e80d32c0559f88b377245', 'admin@4u4v.net', 1375262553, '2013-08-13 08:54'), (2, '水木', 'f4eddb1257c91ed28fd2fead367337e9', '35991353@qq.com', 1376028842, '2013-08-09 17:33'), (3, '4u4v', 'f4eddb1257c91ed28fd2fead367337e9', 'admin@4u4v.com', 1377672534, '2013-08-28 14:56'), (4, 'high', 'f4eddb1257c91ed28fd2fead367337e9', 'high@qq.com', 1377672976, NULL); -- -------------------------------------------------------- -- -- 表的结构 `tp_news` -- CREATE TABLE IF NOT EXISTS `tp_news` ( `id` smallint(4) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `content` varchar(255) NOT NULL, `create_time` int(11) unsigned NOT NULL, `status` tinyint(1) unsigned NOT NULL, `click` int(16) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ; -- -- 导出表中的数据 `tp_news` -- INSERT INTO `tp_news` (`id`, `title`, `content`, `create_time`, `status`, `click`) VALUES (1, '测试标题1', '<p>这里是测试内容1。这里是测试内容。这里是测试内容。这里是测试内容1。</p>\r\n<p>这里是测试内容1。这里是测试内容。这里是测试内容。这里是测试内容。</p>', 1374477140, 1, 0), (5, '新闻标题', '这是<a href="http://shuimu.js.cn">新闻内容</a>\r\n支持HTML哦!', 0, 0, 5), (2, '测试标题2', '测试内容。。。测试内容。。。测试内容。。。', 1374561995, 0, 2), (3, '测试标题3', 'ThinkPHP示例之3:表单处理', 1374565709, 0, 3), (7, '新闻标题7', '新闻内容新闻内容新闻内容新闻内容新闻内容新闻内容', 1375855131, 1, 6), (6, '新闻标题6', '新闻内容新闻内容新闻内容新闻内容新闻内容新闻内容新闻内容', 1375855080, 1, 6), (8, '新闻标题8', '新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8<br />新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8新闻内容8', 1375855181, 1, 6); -- -------------------------------------------------------- -- -- 表的结构 `tp_node` -- CREATE TABLE IF NOT EXISTS `tp_node` ( `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL COMMENT '节点名称', `title` varchar(50) NOT NULL COMMENT '菜单名称', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否激活 1:是 2:否', `remark` varchar(255) DEFAULT NULL COMMENT '备注说明', `pid` smallint(6) unsigned NOT NULL COMMENT '父ID', `level` tinyint(1) unsigned NOT NULL COMMENT '节点等级', `data` varchar(255) DEFAULT NULL COMMENT '附加参数', `sort` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '排序权重', `display` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '菜单显示类型 0:不显示 1:导航菜单 2:左侧菜单', PRIMARY KEY (`id`), KEY `level` (`level`), KEY `pid` (`pid`), KEY `status` (`status`), KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=69 ; -- -- 导出表中的数据 `tp_node` -- INSERT INTO `tp_node` (`id`, `name`, `title`, `status`, `remark`, `pid`, `level`, `data`, `sort`, `display`) VALUES (1, 'cms', '根节点', 1, '不可删除', 0, 1, NULL, 0, 0), (2, 'index', '后台主框架模块', 1, '所有后台用户组都必须有此权限,否则后台无法登录', 1, 2, '', 10, 0), (3, 'index', 'index方法', 1, 'Index模块的index方法', 2, 3, '', 5, 0), (4, 'left', 'left方法', 1, 'Index模块的left方法', 2, 3, '', 3, 0), (5, 'top', 'top方法', 1, 'Index模块的top方法', 2, 3, '', 4, 0), (6, 'main', 'main方法', 1, 'Index模块的main方法', 2, 3, '', 1, 0), (7, 'footer', 'footer方法', 1, 'Index模块的footer方法', 2, 3, '', 2, 0), (8, 'Node', '菜单节点管理', 1, '', 28, 2, '?s=/Admin/Node/index', 1, 2), (9, 'add', '添加菜单', 1, '', 8, 3, '', 4, 0), (10, 'edit', '修改菜单', 1, '', 8, 3, '', 3, 0), (11, 'del', '删除菜单', 1, '', 8, 3, '', 2, 0), (13, 'extend', '扩展功能', 1, '', 1, 0, '', 9, 1), (14, 'public_main', '我的面板', 1, '', 1, 0, '', 40, 1), (15, 'main', '系统环境', 1, '快捷菜单', 25, 0, '?s=/Admin/Index/main', 10, 2), (16, 'index', '菜单列表', 1, '', 8, 3, '', 5, 0), (17, 'sort', '菜单排序', 1, '', 8, 3, '', 1, 0), (18, 'UserCenter', '用户管理', 1, '', 1, 0, '', 20, 1), (19, 'cache', '缓存模块', 1, '', 1, 2, '', 0, 0), (20, 'delCore', '删除核心缓存', 1, '', 19, 3, '', 0, 0), (21, 'User', '后台用户管理', 1, '', 18, 2, '', 0, 2), (22, 'role', '角色权限管理', 1, '', 21, 3, '?s=/Admin/User/role', 4, 2), (23, 'role_add', '角色添加', 1, '', 21, 3, '?s=/Admin/User/role_add', 0, 0), (25, 'my', '我的面板', 1, '', 14, 0, '', 0, 2), (30, 'index', '后台用户管理', 1, '', 21, 3, '?s=/Admin/User/index', 10, 2), (28, 'extend_sub', '扩展功能', 1, '', 13, 0, '', 0, 2), (31, 'role_edit', '角色编辑', 1, '', 21, 3, '', 0, 0), (32, 'role_del', '角色删除', 1, '', 21, 3, '', 0, 0), (33, 'role_sort', '角色排序', 1, '', 21, 3, '', 0, 0), (34, 'add', '后台用户添加', 1, '', 21, 3, '?s=/Admin/User/add', 9, 2), (35, 'edit', '后台某用户编辑', 1, '', 21, 3, '?s=/Admin/User/edit/id/3', 8, 0), (36, 'del', '后台用户删除', 1, '', 21, 3, '', 7, 0), (37, 'access', '角色权限浏览', 1, '', 21, 3, '', 0, 0), (38, 'access_edit', '角色权限编辑', 1, '', 21, 3, '', 0, 0), (40, 'check_username', '检查用户名', 1, 'ajax验证', 21, 3, '', 6, 0), (47, 'conf', '浏览网站各配置信息', 1, '', 46, 3, '', 0, 0), (45, 'system_settings', '系统设置', 1, '', 1, 0, '', 30, 1), (46, 'Config', '系统配置', 1, '', 45, 2, '', 0, 2), (48, 'updateweb', '更新网站相关配置', 1, '', 46, 3, '', 0, 0), (49, 'confweb', '网站信息设置', 1, '', 46, 0, '?s=/Admin/Config/conf/id/web', 0, 2), (50, 'updatedb', '更新数据库链接配置', 1, '', 46, 3, '', 0, 0), (51, 'confdb', '数据库链接配置', 1, '', 46, 0, '?s=/Admin/Config/conf/id/db', 0, 2), (53, 'NewsCenter', '新闻管理', 1, '', 1, 0, '', 0, 1), (54, 'News', '新闻管理模块', 1, '', 53, 2, '', 0, 2), (55, 'index', '后台新闻管理', 1, '', 54, 3, '?s=/Admin/News/index', 0, 2), (56, 'add', '后台新闻添加', 1, '', 54, 3, '?s=/Admin/News/add', 0, 2), (57, 'edit', '后台新闻编辑', 1, '', 54, 3, '?s=/Admin/News/edit', 0, 0), (58, 'FilesManage', '文件管理', 1, '', 1, 0, '', 0, 1), (59, 'Files', '文件管理模块', 1, '', 58, 2, '', 0, 2), (60, 'index', '图片文件列表', 1, '', 59, 3, '?s=/Admin/Files/index', 0, 2), (61, 'add', '上传图片文件', 1, '', 59, 3, '?s=/Admin/Files/add', 0, 2), (62, 'confmail', '邮件服务配置', 1, '', 46, 0, '?s=/Admin/Config/conf/id/mail', 0, 2), (63, 'updatemail', '更新邮件服务器配置', 1, '', 46, 3, '', 0, 0), (64, 'BackupManage', '备份管理', 1, '', 1, 0, '', 0, 1), (65, 'Baksql', '备份管理模块', 1, '', 64, 2, '', 0, 2), (66, 'index', '备份文件管理', 1, '', 65, 3, '?s=/Admin/Baksql/index', 0, 2), (67, 'tablist', '数据表信息', 1, '各数据表信息', 65, 3, '?s=/Admin/Baksql/tablist', 0, 2), (68, 'backall', 'MySQL一键备份', 1, '备份整个数据库', 65, 3, '?s=/Admin/Baksql/backall', 0, 2); -- -------------------------------------------------------- -- -- 表的结构 `tp_role` -- CREATE TABLE IF NOT EXISTS `tp_role` ( `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL COMMENT '后台组名', `pid` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '父ID', `status` tinyint(1) unsigned DEFAULT '0' COMMENT '是否激活 1:是 0:否', `sort` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '排序权重', `remark` varchar(255) DEFAULT NULL COMMENT '备注说明', PRIMARY KEY (`id`), KEY `pid` (`pid`), KEY `status` (`status`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ; -- -- 导出表中的数据 `tp_role` -- INSERT INTO `tp_role` (`id`, `name`, `pid`, `status`, `sort`, `remark`) VALUES (1, '超级管理员', 0, 1, 50, '超级管理员组'), (2, '网站编辑', 0, 1, 40, '编辑组'), (3, '站点监督员', 0, 1, 49, '站点监督员组'); -- -------------------------------------------------------- -- -- 表的结构 `tp_role_user` -- CREATE TABLE IF NOT EXISTS `tp_role_user` ( `user_id` int(10) unsigned NOT NULL, `role_id` smallint(6) unsigned NOT NULL, KEY `group_id` (`role_id`), KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- 导出表中的数据 `tp_role_user` -- INSERT INTO `tp_role_user` (`user_id`, `role_id`) VALUES (3, 2), (1, 1), (8, 1); -- -------------------------------------------------------- -- -- 表的结构 `tp_user` -- CREATE TABLE IF NOT EXISTS `tp_user` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(50) NOT NULL, `password` char(32) NOT NULL, `role` smallint(6) unsigned NOT NULL COMMENT '组ID', `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态 1:启用 0:禁止', `remark` varchar(255) DEFAULT NULL COMMENT '备注说明', `last_login_time` int(11) unsigned NOT NULL COMMENT '最后登录时间', `last_login_ip` varchar(15) DEFAULT NULL COMMENT '最后登录IP', `last_location` varchar(100) DEFAULT NULL COMMENT '最后登录位置', PRIMARY KEY (`id`), KEY `username` (`username`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='用户表' AUTO_INCREMENT=9 ; -- -- 导出表中的数据 `tp_user` -- INSERT INTO `tp_user` (`id`, `username`, `password`, `role`, `status`, `remark`, `last_login_time`, `last_login_ip`, `last_location`) VALUES (1, 'admin', '7fef6171469e80d32c0559f88b377245', 1, 1, '神级管理员,可无视系统权限.', 1376961366, '127.0.0.1', ''), (3, 'editor', 'f4eddb1257c91ed28fd2fead367337e9', 2, 1, '', 1376961309, '127.0.0.1', ''), (8, '水木', 'f4eddb1257c91ed28fd2fead367337e9', 1, 1, '拥有后台所有管理权限', 1375262553, '127.0.0.1', '新建用户');
the_stack
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 25, 2020 at 03:26 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `institutions` -- -- -------------------------------------------------------- -- -- Table structure for table `activities` -- CREATE TABLE `activities` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `name` text DEFAULT NULL, `explanation` text DEFAULT NULL, `student_id` int(11) DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `activities` -- INSERT INTO `activities` (`id`, `school_id`, `name`, `explanation`, `student_id`, `date_of_register`) VALUES (7, 16, 'Football Two', 'Playing Football Well', 39, '2019-12-07 10:57:31'), (8, 16, 'Football', 'he Plays Football', 44, '2020-01-05 20:56:43'), (9, 16, 'Basketball', 'He Loves to play basket ball', 44, '2020-01-05 20:57:12'); -- -------------------------------------------------------- -- -- Table structure for table `children_feedback` -- CREATE TABLE `children_feedback` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `subject` text DEFAULT NULL, `feedback` text DEFAULT NULL, `teacher_name` text DEFAULT NULL, `date_of_feedback` timestamp NOT NULL DEFAULT current_timestamp(), `student_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `children_feedback` -- INSERT INTO `children_feedback` (`id`, `school_id`, `subject`, `feedback`, `teacher_name`, `date_of_feedback`, `student_id`) VALUES (6, 16, 'math', 'Very bad at this subject', 'Hoda', '2019-12-07 17:16:07', 39), (7, 16, 'asdasf', 'asfdsafsasasasafds', 'asddsasafsfdsf', '2019-12-07 17:19:55', 39), (8, 16, 'bad at math', 'He can not solve problems', 'Mahmoud', '2020-01-19 18:19:18', 44), (9, 16, 'Arabic', 'He did not answer my questions', 'Khalid Mahmoud', '2020-01-19 18:59:04', 44); -- -------------------------------------------------------- -- -- Table structure for table `complants` -- CREATE TABLE `complants` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `type` text DEFAULT NULL, `name` text DEFAULT NULL, `number` text DEFAULT NULL, `title` text DEFAULT NULL, `feedback` text DEFAULT NULL, `date_of_complant` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `complants` -- INSERT INTO `complants` (`id`, `school_id`, `type`, `name`, `number`, `title`, `feedback`, `date_of_complant`) VALUES (1, 2, 'Parent', 'Mohamed Mahmoud', '01021987978', 'Bad Treatment', 'teacher cursed my son', '2019-10-29 21:32:42'), (2, 3, 'Teacher', 'Teacher Ahmed El Shobokshey', '0124678879', 'Bad Treatment ', 'Bad Treatment from Staff', '2019-10-29 21:33:50'), (9, 3, 'type', 'name', 'number', 'title', 'feedback', '2020-01-08 18:36:36'), (21, NULL, 'type', 'Name', 'PhoneNumber', 'TITLE', 'Feedback', '2020-01-08 18:53:40'), (22, NULL, 'asdsad', 'asd', 'asdsad', 'asasd', 'asdsadasdsadsadsdaasdsaddsa', '2020-01-08 19:47:03'), (23, 3, 'type', 'asd', 'asdsad', 'asasd', 'asdsadasdsadsadsdaasdsaddsa', '2020-01-08 19:54:39'), (24, 3, 'Be Beb', 'asd', 'asdsad', 'asasd', 'asdsadasdsadsadsdaasdsaddsa', '2020-01-08 19:55:07'), (29, 3, 'Be Beb', 'asd', 'asdsad', 'asasd', 'asdsadasdsadsadsdaasdsaddsaHow ', '2020-01-08 19:58:27'), (30, 16, 'asdsda', 'sadsaddsdsdsdssad', 'sadsasdsdadssadsa', 'asdasd', 'sdsadsadasdsasadsadsad', '2020-01-08 19:59:45'), (31, 16, 'asdsda', 'sadsaddsdsdsdssad', 'sadsasdsdadssadsa', 'asdasd', 'sdsadsadasdsasadsadsad', '2020-01-08 20:02:54'), (32, 16, 'asdsda', 'sadsaddsdsdsdssad', 'sadsasdsdadssadsa', 'asdasd', 'sdsadsadasdsasadsadsad', '2020-01-08 20:03:25'), (47, NULL, '', '', '', '', '', '2020-01-12 21:16:02'), (48, 16, 'Father', 'Mohamed Mohamed Yassein', '123456', 'Bad Treatment', 'teacher is ignoring my son and not dealing with him in a good way', '2020-01-12 21:18:44'), (50, 16, 'Mother', 'Noha Mahmoiud', '012456546456', 'Bad Treatment', 'Teacher asgj are treating my son on a bad way my son name is Khaled mahmoud', '2020-01-19 11:49:54'), (51, 16, 'Mother', 'Naira Khlaed Ahmed Mohamed ', '012456756786 ', 'Ignoring ', 'The teacher of math ignore my son and not let him participate', '2020-01-19 12:03:22'), (52, 16, 'Aunt ', 'Nahia mahmou ', '132465465', 'Dealing', 'He Punsihed the student in a bad way teacher of the math', '2020-01-19 12:12:34'), (53, 16, 'father ', 'Mohamed khaled', '01246456', 'Bad treatment ', 'the teacher of math are treating my son on a bad way', '2020-01-19 18:16:17'); -- -------------------------------------------------------- -- -- Table structure for table `control_groups` -- CREATE TABLE `control_groups` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp(), `student_id` int(11) DEFAULT NULL, `group_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `control_groups` -- INSERT INTO `control_groups` (`id`, `school_id`, `date_of_register`, `student_id`, `group_id`) VALUES (18, 16, '2020-01-05 20:56:15', 44, 5), (19, 16, '2020-01-06 23:31:50', 44, 6), (20, 16, '2020-01-19 19:08:23', 39, 5); -- -------------------------------------------------------- -- -- Table structure for table `fees` -- CREATE TABLE `fees` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `fees_amount` float DEFAULT NULL, `date_of_pay` timestamp NULL DEFAULT current_timestamp(), `student_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `fees` -- INSERT INTO `fees` (`id`, `school_id`, `fees_amount`, `date_of_pay`, `student_id`) VALUES (8, 16, 2500, '2019-12-08 15:43:56', 39), (9, 16, 150, '2019-12-08 15:44:05', 39), (10, 16, 100, '2019-12-08 15:44:10', 39), (11, 16, 200, '2019-12-08 15:44:28', 38), (12, 16, 300, '2019-12-10 17:23:40', 39), (13, 16, 150, '2020-01-05 20:59:45', 44), (14, 16, 700, '2020-01-05 20:59:49', 44), (15, 16, 600, '2020-01-05 20:59:57', 44); -- -------------------------------------------------------- -- -- Table structure for table `groups` -- CREATE TABLE `groups` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `name` text DEFAULT NULL, `subject` text DEFAULT NULL, `time_of_room` text DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp(), `teacher_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `groups` -- INSERT INTO `groups` (`id`, `school_id`, `name`, `subject`, `time_of_room`, `date_of_register`, `teacher_id`) VALUES (5, 16, 'G52', 'Science', '1 AM', '2020-01-05 20:55:38', 3), (6, 16, 'G55', 'Math', '6 AM', '2020-01-06 23:31:19', 3); -- -------------------------------------------------------- -- -- Table structure for table `medication` -- CREATE TABLE `medication` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `name` text DEFAULT NULL, `description` text DEFAULT NULL, `time_of_treatment` text DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp(), `student_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `medication` -- INSERT INTO `medication` (`id`, `school_id`, `name`, `description`, `time_of_treatment`, `date_of_register`, `student_id`) VALUES (7, 16, 'Bones Harmful', 'You must not touch him', 'at 9 am', '2019-12-07 21:12:42', 39), (8, 16, 'Cold', 'He has a strong cold', 'at 9 am', '2020-01-05 20:58:45', 44); -- -------------------------------------------------------- -- -- Table structure for table `parents` -- CREATE TABLE `parents` ( `id` int(11) NOT NULL, `username` text NOT NULL, `password` text NOT NULL, `name` text NOT NULL, `email` text NOT NULL, `address` text NOT NULL, `number` text NOT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp(), `school_id` int(11) DEFAULT NULL, `student_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `parents` -- INSERT INTO `parents` (`id`, `username`, `password`, `name`, `email`, `address`, `number`, `date_of_register`, `school_id`, `student_id`) VALUES (164, 'asd', '$2y$10$Ddm/MAP37Hi3tnUJTGDPquCBXOTZWJb6W3LPRr/Lh/l7lAWZe8r2y', 'ASD', 'asdsadsadsad8@gmail.com', 'Egypt, Dakahlia', '123456', '2019-12-07 11:46:27', 16, 39), (165, 'oo', '$2y$10$xtVwYWUqZC5wZ8aQPkoWR.k8J606WvJnCOXcjI.f94fKUFwlrYhbi', 'Abdallah Yassein', 'aasdsaddsa@yahoo.com', 'Egypt, Dakahlia', '0102456789', '2019-12-07 18:49:26', 16, 40), (166, 'Mohamed', '$2y$10$zKp4tT9Zkji8LzQhVvnByucZC0ZswO5EnKo7HAmAf/8WpKkekb63u', 'Mohamed Mohamed', 'abdaasdsadsadsaein@yahoo.com', 'Egypt, Dakahlia', '0121323123', '2019-12-10 17:23:20', 16, 40), (167, 'ahmed', '$2y$10$l6ZP1WW77yKc6cHXFVqDdOFHwttATtcyzG2woV09Cqw1MvEI6DqyK', 'Mohamed Mohamed ', 'nooasdr@gmail.com', 'Egypt, Dakahlia', '0101232131', '2019-12-20 16:27:36', 16, 39), (168, 'asdf', '123456', 'test', 'tasdasddsat@yahoo.com', 'Ashmon', '0102121', '2019-12-20 19:17:53', 16, 22), (169, 'abdallahyassein', '$2y$10$gLXmN2s0sa9qMEvBFA7LsO8i9ChBs2hXCMQ/qdykimIxjo2/Kjea2', 'aKoKo', 'gasdsadsadsad8@gmail.com', 'Egypt, Dakahlia', '01021232136', '2019-12-26 18:04:57', 16, 39), (170, 'asdfg', '$2y$10$K9fqB7tA8iCUiSu23ZeFo.4u1.nUEu/kXLfENpfYkHm1l0Rvc4ZPq', 'Asad', 'asdasdasdsad8@gmail.com', 'Egypt, Dakahlia', '010123213', '2019-12-26 18:05:23', 16, 39), (171, 'mahmoudmohamed', '$2y$10$T7E0wek8E/DaEmK.iAqTjOP2VoiHEV.RE2UcysCouIJmtBfIXZaOe', 'Hoda', 'gasdasdsad8@gmail.com', 'Egypt, Dakahlia', '010212323', '2020-01-05 20:54:49', 16, 44); -- -------------------------------------------------------- -- -- Table structure for table `people_emergency` -- CREATE TABLE `people_emergency` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `name` text DEFAULT NULL, `number` text DEFAULT NULL, `relation` text DEFAULT NULL, `email` text DEFAULT NULL, `address` text DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp(), `student_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `people_emergency` -- INSERT INTO `people_emergency` (`id`, `school_id`, `name`, `number`, `relation`, `email`, `address`, `date_of_register`, `student_id`) VALUES (6, 16, 'Aha', '123213213', 'Cousin', 'aaaaaaa@yahoo.com', 'Egypt, Dakahlia', '2019-12-11 18:23:28', 39), (8, 16, 'asdas', '1232123', 'Cousin', 'gaaaaa@gmail.com', 'Egypt, Dakahlia', '2019-12-11 18:23:59', 40), (10, 16, 'Noor', '114546', 'Cousin', 'glosdsdsd8@gmail.com', 'Egypt, Dakahlia', '2019-12-11 18:24:18', 40), (11, 16, 'abdallah yassein', '789789789564', 'Cousin', 'asdsafd2@yahoo.com', 'Egypt, Dakahlia', '2019-12-11 18:24:27', 40), (12, 16, 'Hoda Mahmoud Khaled', '123456', 'Cousin', 'nooasdasdsadr@gmail.com', 'Egypt, Dakahlia', '2020-01-05 20:57:59', 44), (13, 16, 'Soad', '123456', 'Aunt', 'asdasdasdasda', 'Egypt, Dakahlia', '2020-01-05 20:58:15', 44); -- -------------------------------------------------------- -- -- Table structure for table `schedules` -- CREATE TABLE `schedules` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `appointment1` text DEFAULT NULL, `appointment2` text DEFAULT NULL, `appointment3` text DEFAULT NULL, `appointment4` text DEFAULT NULL, `appointment5` text DEFAULT NULL, `appointment6` text DEFAULT NULL, `appointment7` text DEFAULT NULL, `appointment8` text DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp(), `grade` text DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `schedules` -- INSERT INTO `schedules` (`id`, `school_id`, `appointment1`, `appointment2`, `appointment3`, `appointment4`, `appointment5`, `appointment6`, `appointment7`, `appointment8`, `date_of_register`, `grade`) VALUES (8, 16, 'Arabic', 'English', 'Math', 'Science', 'Rest', 'Rest', 'Rest', 'Rest', '2019-12-11 21:13:22', '5'), (11, 16, 'Math', 'Math', 'Math', 'Math', '', '', '', '', '2019-12-11 21:33:09', '6'); -- -------------------------------------------------------- -- -- Table structure for table `schools` -- CREATE TABLE `schools` ( `id` int(11) NOT NULL, `username` text NOT NULL, `password` text NOT NULL, `name` text NOT NULL, `email` text NOT NULL, `address` text NOT NULL, `number` text NOT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `schools` -- INSERT INTO `schools` (`id`, `username`, `password`, `name`, `email`, `address`, `number`, `date_of_register`) VALUES (2, 'test_school', 'test_school', 'Test School', 'test_school@yahoo.com', 'test place', '1098752369', '2019-10-27 19:46:18'), (3, 'test_school_2', 'test_school_2', 'Second School', 'test_school_2@yahoo.com', 'Giza', '01021548987', '2019-10-29 21:11:52'), (15, 'abdallahyassein', '$2y$10$b4QGHFPVy7LxLu4tEq1RLOzE4cgpgkUMSCh3Lt0JZ4Nq37BOfWg8W', 'abdallah yassein', 'abdallasdsadsadain@yahoo.com', 'Egypt, Dakahlia', '0101212448789', '2019-10-30 22:19:47'), (16, 'noor', '$2y$10$v5wDwu5NVyPnEk64OMkftOiCDiasJwaQheU06L4Kco/4.WYJLx7.G', 'Noor', 'noor@gmail.com', 'Egypt, Dakahlia', '0101212448789', '2019-11-05 11:56:39'), (17, 'malak', '$2y$10$UoeQY4exzj7evWcXRW2mWuEFIsvakmQ9Y42JPinx8LzrmUyt2Nf.W', 'Malak', 'abdallasdn@yahoo.com', 'Egypt, Dakahlia', '0101212448789', '2019-11-13 23:54:02'), (18, 'hager', '$2y$10$sCkZLThhoNV2G7hjcFsJceD/.E3mYxYYzvQ.v6w5Dpo6JRFAmANny', 'Hager', 'gasdasdsad8@gmail.com', 'Egypt, Dakahlia', '010214645', '2019-11-14 21:38:22'), (19, 'reem', '$2y$10$k0op27xwnGJMyn2ZS6ql7.rxsyQm5X6OPpbKeYTW8SH.AHtAIhse2', 'REEM', 'asadsadsadsda@yahoo.com', 'Egypt, Dakahlia', '123456', '2019-11-15 12:41:28'), (20, 'school_name', '$2y$10$4M9C4ZS2UejmnCV5VuFm0.IOCsu10piQ1.MmVffqRII/xbBVRuUYi', 'AlMahmohjg School', 'school_email@yahoo.com', 'Dakqahlia', '0123756456', '2020-01-19 19:06:18'); -- -------------------------------------------------------- -- -- Table structure for table `sibiling` -- CREATE TABLE `sibiling` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `name` text DEFAULT NULL, `date_of_birth` text DEFAULT NULL, `student_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `sibiling` -- INSERT INTO `sibiling` (`id`, `school_id`, `name`, `date_of_birth`, `student_id`) VALUES (9, 16, 'Yassein', '3/5/1997', 39), (10, 16, 'Abdallah Yassein', '3/4/2001', 40), (12, 16, 'Akho', '3/3/1998', 44), (13, 16, 'Saberina', '3/5/2005', 44); -- -------------------------------------------------------- -- -- Table structure for table `staffs` -- CREATE TABLE `staffs` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `username` text DEFAULT NULL, `password` text DEFAULT NULL, `name` text DEFAULT NULL, `job` text DEFAULT NULL, `number` text DEFAULT NULL, `address` text DEFAULT NULL, `email` text DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `staffs` -- INSERT INTO `staffs` (`id`, `school_id`, `username`, `password`, `name`, `job`, `number`, `address`, `email`, `date_of_register`) VALUES (4, 16, 'malak', '$2y$10$uHYW3rb8bIaHSPJCpnVcTOapPj1mz6dgyPqt/ygbPRnmrWPNAsj.S', 'Mohamed Mohamed Yassein', 'Manager', '123456', 'Egypt, Dakahlia', 'asdasdasdasda', '2019-12-10 20:15:37'); -- -------------------------------------------------------- -- -- Table structure for table `students` -- CREATE TABLE `students` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `username` text DEFAULT NULL, `password` text DEFAULT NULL, `name` text DEFAULT NULL, `grade` text DEFAULT NULL, `date_of_birth` text DEFAULT NULL, `address` text DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `students` -- INSERT INTO `students` (`id`, `school_id`, `username`, `password`, `name`, `grade`, `date_of_birth`, `address`, `date_of_register`) VALUES (21, 17, 'asd', '$2y$10$hkodsia5kJp4ApVGWjIYv.QBLQwUJLY3pJrXaAEuuwmPuggota7Im', 'Ahmed Sad Mahmoud Khalid', '6', '3/5/1997', 'Egypt, Dakahlia', '2019-11-14 21:34:41'), (22, 18, 'mahmouda', '$2y$10$q617GbHrjxFD9.8hanDQxegtTsNUizfmRkFpzcaAe8KzQRj1dsJPC', 'Mahmoud Mohamed Mahmoud', '7', '3/5/1998', 'Egypt, Dakahlia', '2019-11-14 22:59:27'), (24, 19, 'hodaa', '$2y$10$k6R/5Yc34KydmvoO1/EcOef3x4HjBlAET18MyzgY3PfjV9PQukj4O', 'abdallah yassein', '6', '3/5/1998', 'Egypt, Dakahlia', '2019-11-15 12:42:10'), (37, 16, 'noor', '$2y$10$H7g.GzY6/DurQZULmLznXeYXYDpFS2puf6UIDnSMMrY3SmMuKDvLq', 'Noor Khaled Mohamed Mahmoud', '5', '3/5/1997', 'Egypt, Dakahlia', '2019-12-07 10:40:39'), (38, 16, 'noor1', '$2y$10$BhOWaqnbZbaLFEDBzgjOUu/xhvsFod/QD4DpgmJcK1jcAYTLsqNzW', 'Mohamed Mohamed Yassein', '6', '3/5/1997', 'Egypt, Dakahlia', '2019-12-07 10:40:57'), (39, 16, 'noor2', '$2y$10$6K5mR7dc10FbJBwAj5T1s.ja4Y.ycNOHokvAJ/49gM.hcoZYwWoTK', 'Ahmed Mohamed Elbadry', '9', '3/4/2001', 'Egypt, Dakahlia', '2019-12-07 10:41:15'), (40, 16, 'hager', '$2y$10$6mRTEMordEDBRgk/k.EPnu6VyCQOhNMoF7S3zvpswOun4JHW1S6yW', 'Ahmed Mohamed Mohamed Yassein', '6', '3/5/1997', 'Egypt, Dakahlia', '2019-12-07 10:41:39'), (43, 16, 'asdsad', '$2y$10$cKgDi7fVBivDfYlP7A1DhOQBYB5iexeR1mD5k7U4zSAJhApp4klAq', 'Mohamed Mohamed Yassein', '3', '3/5/1997', '1232', '2019-12-10 17:28:29'), (44, 16, 'mahmoudmohamed', '$2y$10$6JOP49JWzRXMY8tAKlgDK.Bx0ulh1ptcTH2tyWfVPViYxG4ilw5au', 'Mahmoud Mohamd Ahmed', '5', '3/5/1998', 'Egypt, Dakahlia', '2020-01-05 20:53:56'); -- -------------------------------------------------------- -- -- Table structure for table `tasks` -- CREATE TABLE `tasks` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `group_id` int(11) DEFAULT NULL, `subject` text DEFAULT NULL, `task` text DEFAULT NULL, `date_of_task` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `tasks` -- INSERT INTO `tasks` (`id`, `school_id`, `group_id`, `subject`, `task`, `date_of_task`) VALUES (1, 16, 5, 'page 55', 'solve all problems have a good day guys', '2020-01-13 20:44:21'), (2, 16, 6, 'asdsadsa', 'Page 25 at working book is important', '2020-01-13 20:45:22'), (3, 16, 5, 'tomorrow', 'asdsadsadasdsadasddsasadsdadsasdasadsddhgjhjkhuyuytyutytytyttruyrtuyrtuyruyrtuytruyyururuuryrtuytrtyuru', '2020-01-14 14:01:57'), (4, 16, 5, 'how are you', 'aserthjkl,mgderhjkoiyumbn', '2020-01-14 14:13:28'), (5, 16, 5, 'Hope nice Day', 'Work Hard on Simple Exams', '2020-01-14 23:26:34'), (6, 16, 5, 'Page 54 (Science)', 'Solve Page 54 at work book', '2020-01-19 12:15:40'), (7, 16, 6, 'Page 13 (SCiecne)', 'Solve Page 13 at work book we well check it tomorrow', '2020-01-19 12:16:37'); -- -------------------------------------------------------- -- -- Table structure for table `teachers` -- CREATE TABLE `teachers` ( `id` int(11) NOT NULL, `school_id` int(11) DEFAULT NULL, `username` text DEFAULT NULL, `password` text DEFAULT NULL, `name` text DEFAULT NULL, `subject` text DEFAULT NULL, `number` text DEFAULT NULL, `email` text DEFAULT NULL, `address` text DEFAULT NULL, `date_of_register` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `teachers` -- INSERT INTO `teachers` (`id`, `school_id`, `username`, `password`, `name`, `subject`, `number`, `email`, `address`, `date_of_register`) VALUES (3, 16, 'abdallahyassein', '$2y$10$xJr5DjvQDtJ5kRdjA6jMouvc9qYTWdfR.ycOnJe56iWX3iOw3lmjO', 'Abdallah Yassein', 'Science', '0101212448789', 'abdallaasdsad@yahoo.com', 'Egypt, Dakahlia', '2019-11-13 18:24:46'); -- -- Indexes for dumped tables -- -- -- Indexes for table `activities` -- ALTER TABLE `activities` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `student_id` (`student_id`); -- -- Indexes for table `children_feedback` -- ALTER TABLE `children_feedback` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `student_id` (`student_id`); -- -- Indexes for table `complants` -- ALTER TABLE `complants` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`); -- -- Indexes for table `control_groups` -- ALTER TABLE `control_groups` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `student_id` (`student_id`), ADD KEY `group_id` (`group_id`); -- -- Indexes for table `fees` -- ALTER TABLE `fees` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `student_id` (`student_id`); -- -- Indexes for table `groups` -- ALTER TABLE `groups` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `teacher_id` (`teacher_id`); -- -- Indexes for table `medication` -- ALTER TABLE `medication` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `student_id` (`student_id`); -- -- Indexes for table `parents` -- ALTER TABLE `parents` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`) USING HASH, ADD KEY `school_id` (`school_id`), ADD KEY `student_id` (`student_id`); -- -- Indexes for table `people_emergency` -- ALTER TABLE `people_emergency` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `student_id` (`student_id`); -- -- Indexes for table `schedules` -- ALTER TABLE `schedules` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`); -- -- Indexes for table `schools` -- ALTER TABLE `schools` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`) USING HASH; -- -- Indexes for table `sibiling` -- ALTER TABLE `sibiling` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `student_id` (`student_id`); -- -- Indexes for table `staffs` -- ALTER TABLE `staffs` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`); -- -- Indexes for table `students` -- ALTER TABLE `students` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`) USING HASH, ADD KEY `school_id` (`school_id`); -- -- Indexes for table `tasks` -- ALTER TABLE `tasks` ADD PRIMARY KEY (`id`), ADD KEY `school_id` (`school_id`), ADD KEY `group_id` (`group_id`); -- -- Indexes for table `teachers` -- ALTER TABLE `teachers` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`) USING HASH, ADD KEY `school_id` (`school_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `activities` -- ALTER TABLE `activities` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `children_feedback` -- ALTER TABLE `children_feedback` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `complants` -- ALTER TABLE `complants` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54; -- -- AUTO_INCREMENT for table `control_groups` -- ALTER TABLE `control_groups` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; -- -- AUTO_INCREMENT for table `fees` -- ALTER TABLE `fees` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; -- -- AUTO_INCREMENT for table `groups` -- ALTER TABLE `groups` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `medication` -- ALTER TABLE `medication` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `parents` -- ALTER TABLE `parents` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=172; -- -- AUTO_INCREMENT for table `people_emergency` -- ALTER TABLE `people_emergency` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `schedules` -- ALTER TABLE `schedules` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT for table `schools` -- ALTER TABLE `schools` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; -- -- AUTO_INCREMENT for table `sibiling` -- ALTER TABLE `sibiling` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `staffs` -- ALTER TABLE `staffs` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `students` -- ALTER TABLE `students` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45; -- -- AUTO_INCREMENT for table `tasks` -- ALTER TABLE `tasks` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `teachers` -- ALTER TABLE `teachers` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- Constraints for dumped tables -- -- -- Constraints for table `activities` -- ALTER TABLE `activities` ADD CONSTRAINT `activities_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `activities_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE; -- -- Constraints for table `children_feedback` -- ALTER TABLE `children_feedback` ADD CONSTRAINT `children_feedback_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `children_feedback_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE; -- -- Constraints for table `complants` -- ALTER TABLE `complants` ADD CONSTRAINT `complants_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`); -- -- Constraints for table `control_groups` -- ALTER TABLE `control_groups` ADD CONSTRAINT `control_groups_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `control_groups_ibfk_3` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `control_groups_ibfk_4` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE CASCADE; -- -- Constraints for table `fees` -- ALTER TABLE `fees` ADD CONSTRAINT `fees_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `fees_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE; -- -- Constraints for table `groups` -- ALTER TABLE `groups` ADD CONSTRAINT `groups_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `groups_ibfk_2` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`id`); -- -- Constraints for table `medication` -- ALTER TABLE `medication` ADD CONSTRAINT `medication_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `medication_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE; -- -- Constraints for table `parents` -- ALTER TABLE `parents` ADD CONSTRAINT `parents_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `parents_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE; -- -- Constraints for table `people_emergency` -- ALTER TABLE `people_emergency` ADD CONSTRAINT `people_emergency_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `people_emergency_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE; -- -- Constraints for table `schedules` -- ALTER TABLE `schedules` ADD CONSTRAINT `schedules_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`); -- -- Constraints for table `sibiling` -- ALTER TABLE `sibiling` ADD CONSTRAINT `sibiling_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `sibiling_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE; -- -- Constraints for table `staffs` -- ALTER TABLE `staffs` ADD CONSTRAINT `staffs_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`); -- -- Constraints for table `tasks` -- ALTER TABLE `tasks` ADD CONSTRAINT `tasks_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`), ADD CONSTRAINT `tasks_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`); -- -- Constraints for table `teachers` -- ALTER TABLE `teachers` ADD CONSTRAINT `teachers_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
the_stack
-- Modify some of the tables: rearranging and adding columns -- These changes will likely be incorporated into a future version of OMOP CDM ALTER TABLE observation_period ADD COLUMN "observation_period_start_datetime" TIMESTAMP NOT NULL ; ALTER TABLE observation_period ADD COLUMN "observation_period_end_datetime" TIMESTAMP NOT NULL ; ALTER TABLE visit_occurrence ADD COLUMN "admitting_concept_id" INTEGER NULL ; ALTER TABLE visit_occurrence ADD COLUMN "discharge_to_source_concept_id" INTEGER NULL ; ALTER TABLE visit_detail ADD COLUMN "visit_detail_source_value" VARCHAR(50) NULL ; ALTER TABLE visit_detail ADD COLUMN "visit_detail_source_concept_id" INTEGER NULL ; ALTER TABLE visit_detail ADD COLUMN "admitting_concept_id" INTEGER NULL ; ALTER TABLE visit_detail ADD COLUMN "discharge_to_source_concept_id" INTEGER NULL; -- those are usefull ALTER TABLE dose_era ADD COLUMN temporal_unit_concept_id integer; COMMENT ON COLUMN dose_era.temporal_unit_concept_id IS 'Stores temporal unit, daily, hourly ...'; ALTER TABLE dose_era ADD COLUMN temporal_value numeric; COMMENT ON COLUMN dose_era.temporal_value IS 'Stores temporal value'; ALTER TABLE drug_exposure ADD COLUMN quantity_source_value text ; COMMENT ON COLUMN drug_exposure.quantity_source_value IS 'Stores the source quantity value'; -- Below are columns we are considering adding --ALTER TABLE death ADD COLUMN visit_detail_id BIGINT; --COMMENT ON COLUMN death.visit_detail_id IS '[CONTRIB] A foreign key to the visit in the VISIT_DETAIL table during where the death occured'; --ALTER TABLE death ADD COLUMN visit_occurrence_id BIGINT; --COMMENT ON COLUMN death.visit_occurrence_id IS '[CONTRIB] A foreign key to the visit in the VISIT_OCCURRENCE table during where the death occured'; -- --ALTER TABLE death ADD COLUMN death_visit_detail_delay double precision; --COMMENT ON COLUMN death.death_visit_detail_delay IS '[CONTRIB] Difference between deathtime and visit_start_datetime of VISIT_DETAIL table'; -- --ALTER TABLE death ADD COLUMN death_visit_occurrence_delay double precision; --COMMENT ON COLUMN death.death_visit_occurrence_delay IS '[CONTRIB] Difference between deathtime and visit_start_datetime of VISIT_OCCURRENCE table'; -- --ALTER TABLE measurement ADD COLUMN quality_concept_id bigint; --COMMENT ON COLUMN measurement.quality_concept_id IS '[CONTRIB] Quality mask, can be queried with regex, to filter based on quality aspects'; -- --ALTER TABLE visit_occurrence ADD COLUMN age_in_year integer; --COMMENT ON COLUMN visit_occurrence.age_in_year IS '[CONTRIB] Age at visit'; -- --ALTER TABLE visit_occurrence ADD COLUMN age_in_month integer; --COMMENT ON COLUMN visit_occurrence.age_in_month IS '[CONTRIB] Age at visit'; -- --ALTER TABLE visit_occurrence ADD COLUMN age_in_day integer; --COMMENT ON COLUMN visit_occurrence.age_in_day IS '[CONTRIB] Age at visit'; -- --ALTER TABLE visit_occurrence ADD COLUMN visit_occurrence_length double precision; --COMMENT ON COLUMN visit_occurrence.visit_occurrence_length IS '[CONTRIB] Length of visit occurrence'; -- --ALTER TABLE visit_detail ADD COLUMN visit_detail_length double precision; --COMMENT ON COLUMN visit_detail.visit_detail_length IS '[CONTRIB] Length of visit detail'; -- --ALTER TABLE visit_detail ADD COLUMN discharge_delay double precision; --COMMENT ON COLUMN visit_detail.discharge_delay IS '[CONTRIB] Delay between discharge decision and effective discharge'; -- there is actually no need to limit the character size in postgres. -- limiting them is error prone and does not improve any performances or etl security -- the OMOP spec says it is possible to alter the text length -- SELECT -- 'ALTER TABLE '||columns.table_name||' ALTER COLUMN '||columns.column_name||' TYPE text;' -- FROM -- information_schema.columns -- WHERE -- columns.table_catalog = 'mimic' AND -- columns.table_schema = 'omop' AND -- columns.data_type ilike 'character%'; ALTER TABLE attribute_definition ALTER COLUMN attribute_name TYPE text; ALTER TABLE cdm_source ALTER COLUMN cdm_source_name TYPE text; ALTER TABLE cdm_source ALTER COLUMN cdm_source_abbreviation TYPE text; ALTER TABLE cdm_source ALTER COLUMN cdm_holder TYPE text; ALTER TABLE cdm_source ALTER COLUMN source_documentation_reference TYPE text; ALTER TABLE cdm_source ALTER COLUMN cdm_etl_reference TYPE text; ALTER TABLE cdm_source ALTER COLUMN cdm_version TYPE text; ALTER TABLE cdm_source ALTER COLUMN vocabulary_version TYPE text; ALTER TABLE vocabulary ALTER COLUMN vocabulary_id TYPE text; ALTER TABLE vocabulary ALTER COLUMN vocabulary_name TYPE text; ALTER TABLE vocabulary ALTER COLUMN vocabulary_reference TYPE text; ALTER TABLE vocabulary ALTER COLUMN vocabulary_version TYPE text; ALTER TABLE note_nlp ALTER COLUMN snippet TYPE text; -- ALTER TABLE note_nlp ALTER COLUMN offset TYPE text; ALTER TABLE note_nlp ALTER COLUMN lexical_variant TYPE text; ALTER TABLE note_nlp ALTER COLUMN nlp_system TYPE text; ALTER TABLE note_nlp ALTER COLUMN term_exists TYPE text; ALTER TABLE note_nlp ALTER COLUMN term_temporal TYPE text; ALTER TABLE note_nlp ALTER COLUMN term_modifiers TYPE text; ALTER TABLE person ALTER COLUMN person_source_value TYPE text; ALTER TABLE person ALTER COLUMN gender_source_value TYPE text; ALTER TABLE person ALTER COLUMN race_source_value TYPE text; ALTER TABLE person ALTER COLUMN ethnicity_source_value TYPE text; ALTER TABLE payer_plan_period ALTER COLUMN payer_source_value TYPE text; ALTER TABLE payer_plan_period ALTER COLUMN plan_source_value TYPE text; ALTER TABLE payer_plan_period ALTER COLUMN family_source_value TYPE text; ALTER TABLE domain ALTER COLUMN domain_id TYPE text; ALTER TABLE domain ALTER COLUMN domain_name TYPE text; ALTER TABLE concept_relationship ALTER COLUMN relationship_id TYPE text; ALTER TABLE concept_relationship ALTER COLUMN invalid_reason TYPE text; ALTER TABLE relationship ALTER COLUMN relationship_id TYPE text; ALTER TABLE relationship ALTER COLUMN relationship_name TYPE text; ALTER TABLE relationship ALTER COLUMN is_hierarchical TYPE text; ALTER TABLE relationship ALTER COLUMN defines_ancestry TYPE text; ALTER TABLE relationship ALTER COLUMN reverse_relationship_id TYPE text; ALTER TABLE concept_synonym ALTER COLUMN concept_synonym_name TYPE text; ALTER TABLE drug_strength ALTER COLUMN invalid_reason TYPE text; ALTER TABLE location ALTER COLUMN address_1 TYPE text; ALTER TABLE location ALTER COLUMN address_2 TYPE text; ALTER TABLE location ALTER COLUMN city TYPE text; ALTER TABLE location ALTER COLUMN state TYPE text; ALTER TABLE location ALTER COLUMN zip TYPE text; ALTER TABLE location ALTER COLUMN county TYPE text; ALTER TABLE location ALTER COLUMN location_source_value TYPE text; ALTER TABLE cohort_definition ALTER COLUMN cohort_definition_name TYPE text; ALTER TABLE specimen ALTER COLUMN specimen_source_id TYPE text; ALTER TABLE specimen ALTER COLUMN specimen_source_value TYPE text; ALTER TABLE specimen ALTER COLUMN unit_source_value TYPE text; ALTER TABLE specimen ALTER COLUMN anatomic_site_source_value TYPE text; ALTER TABLE specimen ALTER COLUMN disease_status_source_value TYPE text; ALTER TABLE death ALTER COLUMN cause_source_value TYPE text; ALTER TABLE visit_detail ALTER COLUMN visit_source_value TYPE text; ALTER TABLE visit_detail ALTER COLUMN admitting_source_value TYPE text; ALTER TABLE visit_detail ALTER COLUMN discharge_to_source_value TYPE text; ALTER TABLE procedure_occurrence ALTER COLUMN procedure_source_value TYPE text; ALTER TABLE procedure_occurrence ALTER COLUMN modifier_source_value TYPE text; ALTER TABLE drug_exposure ALTER COLUMN stop_reason TYPE text; ALTER TABLE drug_exposure ALTER COLUMN lot_number TYPE text; ALTER TABLE drug_exposure ALTER COLUMN drug_source_value TYPE text; ALTER TABLE drug_exposure ALTER COLUMN route_source_value TYPE text; ALTER TABLE drug_exposure ALTER COLUMN dose_unit_source_value TYPE text; ALTER TABLE condition_occurrence ALTER COLUMN stop_reason TYPE text; ALTER TABLE condition_occurrence ALTER COLUMN condition_source_value TYPE text; ALTER TABLE condition_occurrence ALTER COLUMN condition_status_source_value TYPE text; ALTER TABLE note ALTER COLUMN note_title TYPE text; ALTER TABLE note ALTER COLUMN note_source_value TYPE text; ALTER TABLE care_site ALTER COLUMN care_site_name TYPE text; ALTER TABLE care_site ALTER COLUMN care_site_source_value TYPE text; ALTER TABLE care_site ALTER COLUMN place_of_service_source_value TYPE text; ALTER TABLE provider ALTER COLUMN provider_name TYPE text; ALTER TABLE provider ALTER COLUMN npi TYPE text; ALTER TABLE provider ALTER COLUMN dea TYPE text; ALTER TABLE provider ALTER COLUMN provider_source_value TYPE text; ALTER TABLE provider ALTER COLUMN specialty_source_value TYPE text; ALTER TABLE provider ALTER COLUMN gender_source_value TYPE text; ALTER TABLE observation ALTER COLUMN value_as_string TYPE text; ALTER TABLE observation ALTER COLUMN observation_source_value TYPE text; ALTER TABLE observation ALTER COLUMN unit_source_value TYPE text; ALTER TABLE observation ALTER COLUMN qualifier_source_value TYPE text; ALTER TABLE source_to_concept_map ALTER COLUMN source_code TYPE text; ALTER TABLE source_to_concept_map ALTER COLUMN source_vocabulary_id TYPE text; ALTER TABLE source_to_concept_map ALTER COLUMN source_code_description TYPE text; ALTER TABLE source_to_concept_map ALTER COLUMN target_vocabulary_id TYPE text; ALTER TABLE source_to_concept_map ALTER COLUMN invalid_reason TYPE text; ALTER TABLE concept_class ALTER COLUMN concept_class_id TYPE text; ALTER TABLE concept_class ALTER COLUMN concept_class_name TYPE text; ALTER TABLE cost ALTER COLUMN cost_domain_id TYPE text; ALTER TABLE cost ALTER COLUMN revenue_code_source_value TYPE text; ALTER TABLE cost ALTER COLUMN drg_source_value TYPE text; ALTER TABLE device_exposure ALTER COLUMN unique_device_id TYPE text; ALTER TABLE device_exposure ALTER COLUMN device_source_value TYPE text; ALTER TABLE measurement ALTER COLUMN measurement_source_value TYPE text; ALTER TABLE measurement ALTER COLUMN unit_source_value TYPE text; ALTER TABLE measurement ALTER COLUMN value_source_value TYPE text; ALTER TABLE visit_occurrence ALTER COLUMN visit_source_value TYPE text; ALTER TABLE visit_occurrence ALTER COLUMN admitting_source_value TYPE text; ALTER TABLE visit_occurrence ALTER COLUMN discharge_to_source_value TYPE text; ALTER TABLE concept ALTER COLUMN concept_name TYPE text; ALTER TABLE concept ALTER COLUMN domain_id TYPE text; ALTER TABLE concept ALTER COLUMN vocabulary_id TYPE text; ALTER TABLE concept ALTER COLUMN concept_class_id TYPE text; ALTER TABLE concept ALTER COLUMN standard_concept TYPE text; ALTER TABLE concept ALTER COLUMN concept_code TYPE text; ALTER TABLE concept ALTER COLUMN invalid_reason TYPE text; -- mimic does not provide some dates for drugs. -- this allows populating them ALTER TABLE drug_exposure ALTER COLUMN drug_exposure_start_date DROP NOT NULL; ALTER TABLE drug_exposure ALTER COLUMN drug_exposure_end_date DROP NOT NULL; ALTER TABLE dose_era ALTER COLUMN dose_era_start_date DROP NOT NULL; ALTER TABLE dose_era ALTER COLUMN dose_era_end_date DROP NOT NULL; -- NOTE NLP table looks like missing columns -- cf http://forums.ohdsi.org/t/note-nlp-questions/3379/4 ALTER TABLE note_nlp DROP COLUMN "offset" ; ALTER TABLE note_nlp ADD COLUMN "offset_begin" integer ; ALTER TABLE note_nlp ADD COLUMN "offset_end" integer ; ALTER TABLE note_nlp ADD COLUMN "section_source_value" text ; ALTER TABLE note_nlp ADD COLUMN "section_source_concept_id" integer ; -- bigint is a better choice for future and international database merging challenges -- SELECT -- 'ALTER TABLE '||columns.table_name||' ALTER COLUMN '||columns.column_name||' TYPE bigint;' -- FROM -- information_schema.columns -- WHERE -- columns.table_catalog = 'mimic' AND -- columns.table_schema = 'omop' AND -- columns.data_type = 'integer'; -- ALTER TABLE concept_class ALTER COLUMN concept_class_concept_id TYPE bigint; -- ALTER TABLE source_to_concept_map ALTER COLUMN source_concept_id TYPE bigint; -- ALTER TABLE source_to_concept_map ALTER COLUMN target_concept_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN measurement_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN measurement_concept_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN measurement_type_concept_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN operator_concept_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN value_as_concept_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN unit_concept_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN visit_detail_id TYPE bigint; -- ALTER TABLE measurement ALTER COLUMN measurement_source_concept_id TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN device_exposure_id TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN device_concept_id TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN device_type_concept_id TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN quantity TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN visit_detail_id TYPE bigint; -- ALTER TABLE device_exposure ALTER COLUMN device_source_concept_id TYPE bigint; -- ALTER TABLE vocabulary ALTER COLUMN vocabulary_concept_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN visit_concept_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN visit_type_concept_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN care_site_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN visit_source_concept_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN admitting_concept_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN discharge_to_concept_id TYPE bigint; -- ALTER TABLE visit_occurrence ALTER COLUMN preceding_visit_occurrence_id TYPE bigint; -- ALTER TABLE attribute_definition ALTER COLUMN attribute_definition_id TYPE bigint; -- ALTER TABLE attribute_definition ALTER COLUMN attribute_type_concept_id TYPE bigint; -- ALTER TABLE note_nlp ALTER COLUMN note_id TYPE bigint; -- ALTER TABLE note_nlp ALTER COLUMN section_concept_id TYPE bigint; -- ALTER TABLE note_nlp ALTER COLUMN note_nlp_concept_id TYPE bigint; -- ALTER TABLE note_nlp ALTER COLUMN note_nlp_source_concept_id TYPE bigint; -- ALTER TABLE dose_era ALTER COLUMN dose_era_id TYPE bigint; -- ALTER TABLE dose_era ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE dose_era ALTER COLUMN drug_concept_id TYPE bigint; -- ALTER TABLE dose_era ALTER COLUMN unit_concept_id TYPE bigint; -- ALTER TABLE concept ALTER COLUMN concept_id TYPE bigint; -- ALTER TABLE concept_relationship ALTER COLUMN concept_id_1 TYPE bigint; -- ALTER TABLE concept_relationship ALTER COLUMN concept_id_2 TYPE bigint; -- ALTER TABLE domain ALTER COLUMN domain_concept_id TYPE bigint; -- ALTER TABLE cohort ALTER COLUMN cohort_definition_id TYPE bigint; -- ALTER TABLE cohort ALTER COLUMN subject_id TYPE bigint; -- ALTER TABLE cohort_attribute ALTER COLUMN cohort_definition_id TYPE bigint; -- ALTER TABLE cohort_attribute ALTER COLUMN subject_id TYPE bigint; -- ALTER TABLE cohort_attribute ALTER COLUMN attribute_definition_id TYPE bigint; -- ALTER TABLE cohort_attribute ALTER COLUMN value_as_concept_id TYPE bigint; -- ALTER TABLE fact_relationship ALTER COLUMN domain_concept_id_1 TYPE bigint; -- ALTER TABLE fact_relationship ALTER COLUMN fact_id_1 TYPE bigint; -- ALTER TABLE fact_relationship ALTER COLUMN domain_concept_id_2 TYPE bigint; -- ALTER TABLE fact_relationship ALTER COLUMN fact_id_2 TYPE bigint; -- ALTER TABLE fact_relationship ALTER COLUMN relationship_concept_id TYPE bigint; -- ALTER TABLE drug_era ALTER COLUMN drug_era_id TYPE bigint; -- ALTER TABLE drug_era ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE drug_era ALTER COLUMN drug_concept_id TYPE bigint; -- ALTER TABLE drug_era ALTER COLUMN drug_exposure_count TYPE bigint; -- ALTER TABLE drug_era ALTER COLUMN gap_days TYPE bigint; -- ALTER TABLE relationship ALTER COLUMN relationship_concept_id TYPE bigint; -- ALTER TABLE concept_synonym ALTER COLUMN concept_id TYPE bigint; -- ALTER TABLE concept_synonym ALTER COLUMN language_concept_id TYPE bigint; -- ALTER TABLE cost ALTER COLUMN cost_id TYPE bigint; -- ALTER TABLE cost ALTER COLUMN cost_event_id TYPE bigint; -- ALTER TABLE cost ALTER COLUMN cost_type_concept_id TYPE bigint; -- ALTER TABLE cost ALTER COLUMN currency_concept_id TYPE bigint; -- ALTER TABLE cost ALTER COLUMN payer_plan_period_id TYPE bigint; -- ALTER TABLE cost ALTER COLUMN revenue_code_concept_id TYPE bigint; -- ALTER TABLE cost ALTER COLUMN drg_concept_id TYPE bigint; -- ALTER TABLE concept_ancestor ALTER COLUMN ancestor_concept_id TYPE bigint; -- ALTER TABLE concept_ancestor ALTER COLUMN descendant_concept_id TYPE bigint; -- ALTER TABLE concept_ancestor ALTER COLUMN min_levels_of_separation TYPE bigint; -- ALTER TABLE concept_ancestor ALTER COLUMN max_levels_of_separation TYPE bigint; -- ALTER TABLE death ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE death ALTER COLUMN death_type_concept_id TYPE bigint; -- ALTER TABLE death ALTER COLUMN cause_concept_id TYPE bigint; -- ALTER TABLE death ALTER COLUMN cause_source_concept_id TYPE bigint; -- ALTER TABLE drug_strength ALTER COLUMN drug_concept_id TYPE bigint; -- ALTER TABLE drug_strength ALTER COLUMN ingredient_concept_id TYPE bigint; -- ALTER TABLE drug_strength ALTER COLUMN amount_unit_concept_id TYPE bigint; -- ALTER TABLE drug_strength ALTER COLUMN numerator_unit_concept_id TYPE bigint; -- ALTER TABLE drug_strength ALTER COLUMN denominator_unit_concept_id TYPE bigint; -- ALTER TABLE drug_strength ALTER COLUMN box_size TYPE bigint; -- ALTER TABLE specimen ALTER COLUMN specimen_id TYPE bigint; -- ALTER TABLE specimen ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE specimen ALTER COLUMN specimen_concept_id TYPE bigint; -- ALTER TABLE specimen ALTER COLUMN specimen_type_concept_id TYPE bigint; -- ALTER TABLE specimen ALTER COLUMN unit_concept_id TYPE bigint; -- ALTER TABLE specimen ALTER COLUMN anatomic_site_concept_id TYPE bigint; -- ALTER TABLE specimen ALTER COLUMN disease_status_concept_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN condition_occurrence_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN condition_concept_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN condition_type_concept_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN visit_detail_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN condition_source_concept_id TYPE bigint; -- ALTER TABLE condition_occurrence ALTER COLUMN condition_status_concept_id TYPE bigint; -- ALTER TABLE observation_period ALTER COLUMN observation_period_id TYPE bigint; -- ALTER TABLE observation_period ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE observation_period ALTER COLUMN period_type_concept_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN visit_detail_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN visit_detail_concept_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN visit_type_concept_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN care_site_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN visit_source_concept_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN admitting_concept_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN discharge_to_concept_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN preceding_visit_detail_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN visit_detail_parent_id TYPE bigint; -- ALTER TABLE visit_detail ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN drug_exposure_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN drug_concept_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN drug_type_concept_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN refills TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN days_supply TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN route_concept_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN visit_detail_id TYPE bigint; -- ALTER TABLE drug_exposure ALTER COLUMN drug_source_concept_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN note_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN note_type_concept_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN note_class_concept_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN encoding_concept_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN language_concept_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE note ALTER COLUMN visit_detail_id TYPE bigint; -- ALTER TABLE location ALTER COLUMN location_id TYPE bigint; -- ALTER TABLE cohort_definition ALTER COLUMN cohort_definition_id TYPE bigint; -- ALTER TABLE cohort_definition ALTER COLUMN definition_type_concept_id TYPE bigint; -- ALTER TABLE cohort_definition ALTER COLUMN subject_concept_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN observation_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN observation_concept_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN observation_type_concept_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN value_as_concept_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN qualifier_concept_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN unit_concept_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN visit_detail_id TYPE bigint; -- ALTER TABLE observation ALTER COLUMN observation_source_concept_id TYPE bigint; -- ALTER TABLE provider ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE provider ALTER COLUMN specialty_concept_id TYPE bigint; -- ALTER TABLE provider ALTER COLUMN care_site_id TYPE bigint; -- ALTER TABLE provider ALTER COLUMN year_of_birth TYPE bigint; -- ALTER TABLE provider ALTER COLUMN gender_concept_id TYPE bigint; -- ALTER TABLE provider ALTER COLUMN specialty_source_concept_id TYPE bigint; -- ALTER TABLE provider ALTER COLUMN gender_source_concept_id TYPE bigint; -- ALTER TABLE condition_era ALTER COLUMN condition_era_id TYPE bigint; -- ALTER TABLE condition_era ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE condition_era ALTER COLUMN condition_concept_id TYPE bigint; -- ALTER TABLE condition_era ALTER COLUMN condition_occurrence_count TYPE bigint; -- ALTER TABLE payer_plan_period ALTER COLUMN payer_plan_period_id TYPE bigint; -- ALTER TABLE payer_plan_period ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE care_site ALTER COLUMN care_site_id TYPE bigint; -- ALTER TABLE care_site ALTER COLUMN place_of_service_concept_id TYPE bigint; -- ALTER TABLE care_site ALTER COLUMN location_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN procedure_occurrence_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN procedure_concept_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN procedure_type_concept_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN modifier_concept_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN quantity TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN visit_occurrence_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN visit_detail_id TYPE bigint; -- ALTER TABLE procedure_occurrence ALTER COLUMN procedure_source_concept_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN person_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN gender_concept_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN year_of_birth TYPE bigint; -- ALTER TABLE person ALTER COLUMN month_of_birth TYPE bigint; -- ALTER TABLE person ALTER COLUMN day_of_birth TYPE bigint; -- ALTER TABLE person ALTER COLUMN race_concept_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN ethnicity_concept_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN location_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN provider_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN care_site_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN gender_source_concept_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN race_source_concept_id TYPE bigint; -- ALTER TABLE person ALTER COLUMN ethnicity_source_concept_id TYPE bigint;
the_stack
-- 2019-10-08T11:34:06.381Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,577153,0,'IsUpdateLocationAndContactForInvoice',TO_TIMESTAMP('2019-10-08 14:34:06','YYYY-MM-DD HH24:MI:SS'),100,'When this parameter is set on true, the invoices that are to be created will get the current users and locations of their business partners, regardless of the users and locations set in the enquewed invoice candidates. The values in the invoice candidates will not be updated.','D','Y','Update Location and Contact for Invoice','Update Location and Contact for Invoice',TO_TIMESTAMP('2019-10-08 14:34:06','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-10-08T11:34:06.397Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, CommitWarning,Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Element_ID, t.CommitWarning,t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' OR l.IsBaseLanguage='Y') AND t.AD_Element_ID=577153 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2019-10-08T11:42:53.846Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,577153,0,540304,541615,20,'IsUpdateLocationAndContactForInvoice',TO_TIMESTAMP('2019-10-08 14:42:53','YYYY-MM-DD HH24:MI:SS'),100,'N','When this parameter is set on true, the invoices that are to be created will get the current users and locations of their business partners, regardless of the users and locations set in the enquewed invoice candidates. The values in the invoice candidates','de.metas.invoicecandidate',0,'Y','N','Y','N','Y','N','Update Location and Contact for Invoice',80,TO_TIMESTAMP('2019-10-08 14:42:53','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-10-08T11:42:53.863Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Process_Para_ID=541615 AND NOT EXISTS (SELECT 1 FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 2019-10-08T11:44:22.396Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='',Updated=TO_TIMESTAMP('2019-10-08 14:44:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='de_CH' ; -- 2019-10-08T11:44:22.459Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'de_CH') ; -- 2019-10-08T11:45:58.149Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='When this parameter is set on true, the invoices that are to be created will get the current users and locations of their business partners, regardless of the values set in the enqueued invoice candidates. The invoice candidates will suffer no update.',Updated=TO_TIMESTAMP('2019-10-08 14:45:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='en_US' ; -- 2019-10-08T11:45:58.153Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'en_US') ; -- 2019-10-08T11:46:18.260Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y',Updated=TO_TIMESTAMP('2019-10-08 14:46:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='en_US' ; -- 2019-10-08T11:46:18.264Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'en_US') ; -- 2019-10-09T11:34:03.864Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='', Help='When this parameter is set on true, the invoices that are to be created will get the current users and locations of their business partners, regardless of the Bill_Location and Bill_User values set in the enqueued invoice candidates. The invoice candidates will suffer no update. Nevertheless, the Bill_Location_Override and Bill_User_Override will be respected if they are set in the invoice candidates.',Updated=TO_TIMESTAMP('2019-10-09 14:34:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='en_US' ; -- 2019-10-09T11:34:03.905Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'en_US') ; -- 2019-10-09T11:54:12.261Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET IsActive='Y', SeqNo=40,Updated=TO_TIMESTAMP('2019-10-09 14:54:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=541615 ; -- 2019-10-09T11:54:12.269Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET IsActive='Y', SeqNo=50,Updated=TO_TIMESTAMP('2019-10-09 14:54:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=540424 ; -- 2019-10-09T11:54:12.272Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET IsActive='Y', SeqNo=60,Updated=TO_TIMESTAMP('2019-10-09 14:54:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=540640 ; -- 2019-10-09T11:54:12.275Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET IsActive='Y', SeqNo=70,Updated=TO_TIMESTAMP('2019-10-09 14:54:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=540610 ; -- 2019-10-09T11:54:12.282Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET IsActive='Y', SeqNo=80,Updated=TO_TIMESTAMP('2019-10-09 14:54:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=540653 ; -- 2019-10-09T12:16:55.308Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Rechnungsadresse und -kontakt aktualisieren', PrintName='Rechnungsadresse und -kontakt aktualisieren',Updated=TO_TIMESTAMP('2019-10-09 15:16:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='de_CH' ; -- 2019-10-09T12:16:55.312Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'de_CH') ; -- 2019-10-09T12:18:03.310Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description=' ',Updated=TO_TIMESTAMP('2019-10-09 15:18:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='de_DE' ; -- 2019-10-09T12:18:03.315Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'de_DE') ; -- 2019-10-09T12:18:03.352Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(577153,'de_DE') ; -- 2019-10-09T12:18:03.353Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Update Location and Contact for Invoice', Description=' ', Help=NULL WHERE AD_Element_ID=577153 ; -- 2019-10-09T12:18:03.355Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Update Location and Contact for Invoice', Description=' ', Help=NULL, AD_Element_ID=577153 WHERE UPPER(ColumnName)='ISUPDATELOCATIONANDCONTACTFORINVOICE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2019-10-09T12:18:03.360Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Update Location and Contact for Invoice', Description=' ', Help=NULL WHERE AD_Element_ID=577153 AND IsCentrallyMaintained='Y' ; -- 2019-10-09T12:18:03.361Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Update Location and Contact for Invoice', Description=' ', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=577153) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 577153) ; -- 2019-10-09T12:18:03.403Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Update Location and Contact for Invoice', Description=' ', Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:18:03.404Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Update Location and Contact for Invoice', Description=' ', Help=NULL WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:18:03.405Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Update Location and Contact for Invoice', Description = ' ', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:18:18.437Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='Rechnungsadresse und -kontakt aktualisieren', PrintName='Rechnungsadresse und -kontakt aktualisieren',Updated=TO_TIMESTAMP('2019-10-09 15:18:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='de_DE' ; -- 2019-10-09T12:18:18.440Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'de_DE') ; -- 2019-10-09T12:18:18.462Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(577153,'de_DE') ; -- 2019-10-09T12:18:18.467Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help=NULL WHERE AD_Element_ID=577153 ; -- 2019-10-09T12:18:18.468Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help=NULL, AD_Element_ID=577153 WHERE UPPER(ColumnName)='ISUPDATELOCATIONANDCONTACTFORINVOICE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2019-10-09T12:18:18.469Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help=NULL WHERE AD_Element_ID=577153 AND IsCentrallyMaintained='Y' ; -- 2019-10-09T12:18:18.470Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=577153) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 577153) ; -- 2019-10-09T12:18:18.476Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Rechnungsadresse und -kontakt aktualisieren', Name='Rechnungsadresse und -kontakt aktualisieren' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=577153) ; -- 2019-10-09T12:18:18.477Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:18:18.478Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help=NULL WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:18:18.479Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Rechnungsadresse und -kontakt aktualisieren', Description = ' ', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:42:21.013Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Help='Wenn dieser Parameter aktiviert ist, erhalten die zu erstellenden Rechnungen die aktuellen Benutzer und Standorte ihrer Geschäftspartner, unabhängig von den Werten in Bill_Location und Bill_User, die in den eingereihten Rechnungskandidaten eingestellt sind. Die Rechnungskandidaten selbst werden nicht verändert. Dennoch werden die Werte von Bill_Location_Override und Bill_User_Override eingehalten, sofern sie in den Rechnungskandidaten gesetzt sind.',Updated=TO_TIMESTAMP('2019-10-09 15:42:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='de_CH' ; -- 2019-10-09T12:42:21.017Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'de_CH') ; -- 2019-10-09T12:42:24.563Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Help='Wenn dieser Parameter aktiviert ist, erhalten die zu erstellenden Rechnungen die aktuellen Benutzer und Standorte ihrer Geschäftspartner, unabhängig von den Werten in Bill_Location und Bill_User, die in den eingereihten Rechnungskandidaten eingestellt sind. Die Rechnungskandidaten selbst werden nicht verändert. Dennoch werden die Werte von Bill_Location_Override und Bill_User_Override eingehalten, sofern sie in den Rechnungskandidaten gesetzt sind.',Updated=TO_TIMESTAMP('2019-10-09 15:42:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='de_DE' ; -- 2019-10-09T12:42:24.565Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'de_DE') ; -- 2019-10-09T12:42:24.573Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(577153,'de_DE') ; -- 2019-10-09T12:42:24.574Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help='Wenn dieser Parameter aktiviert ist, erhalten die zu erstellenden Rechnungen die aktuellen Benutzer und Standorte ihrer Geschäftspartner, unabhängig von den Werten in Bill_Location und Bill_User, die in den eingereihten Rechnungskandidaten eingestellt sind. Die Rechnungskandidaten selbst werden nicht verändert. Dennoch werden die Werte von Bill_Location_Override und Bill_User_Override eingehalten, sofern sie in den Rechnungskandidaten gesetzt sind.' WHERE AD_Element_ID=577153 ; -- 2019-10-09T12:42:24.575Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help='Wenn dieser Parameter aktiviert ist, erhalten die zu erstellenden Rechnungen die aktuellen Benutzer und Standorte ihrer Geschäftspartner, unabhängig von den Werten in Bill_Location und Bill_User, die in den eingereihten Rechnungskandidaten eingestellt sind. Die Rechnungskandidaten selbst werden nicht verändert. Dennoch werden die Werte von Bill_Location_Override und Bill_User_Override eingehalten, sofern sie in den Rechnungskandidaten gesetzt sind.', AD_Element_ID=577153 WHERE UPPER(ColumnName)='ISUPDATELOCATIONANDCONTACTFORINVOICE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2019-10-09T12:42:24.576Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsUpdateLocationAndContactForInvoice', Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help='Wenn dieser Parameter aktiviert ist, erhalten die zu erstellenden Rechnungen die aktuellen Benutzer und Standorte ihrer Geschäftspartner, unabhängig von den Werten in Bill_Location und Bill_User, die in den eingereihten Rechnungskandidaten eingestellt sind. Die Rechnungskandidaten selbst werden nicht verändert. Dennoch werden die Werte von Bill_Location_Override und Bill_User_Override eingehalten, sofern sie in den Rechnungskandidaten gesetzt sind.' WHERE AD_Element_ID=577153 AND IsCentrallyMaintained='Y' ; -- 2019-10-09T12:42:24.577Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help='Wenn dieser Parameter aktiviert ist, erhalten die zu erstellenden Rechnungen die aktuellen Benutzer und Standorte ihrer Geschäftspartner, unabhängig von den Werten in Bill_Location und Bill_User, die in den eingereihten Rechnungskandidaten eingestellt sind. Die Rechnungskandidaten selbst werden nicht verändert. Dennoch werden die Werte von Bill_Location_Override und Bill_User_Override eingehalten, sofern sie in den Rechnungskandidaten gesetzt sind.' WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=577153) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 577153) ; -- 2019-10-09T12:42:24.582Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help='Wenn dieser Parameter aktiviert ist, erhalten die zu erstellenden Rechnungen die aktuellen Benutzer und Standorte ihrer Geschäftspartner, unabhängig von den Werten in Bill_Location und Bill_User, die in den eingereihten Rechnungskandidaten eingestellt sind. Die Rechnungskandidaten selbst werden nicht verändert. Dennoch werden die Werte von Bill_Location_Override und Bill_User_Override eingehalten, sofern sie in den Rechnungskandidaten gesetzt sind.', CommitWarning = NULL WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:42:24.584Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='Rechnungsadresse und -kontakt aktualisieren', Description=' ', Help='Wenn dieser Parameter aktiviert ist, erhalten die zu erstellenden Rechnungen die aktuellen Benutzer und Standorte ihrer Geschäftspartner, unabhängig von den Werten in Bill_Location und Bill_User, die in den eingereihten Rechnungskandidaten eingestellt sind. Die Rechnungskandidaten selbst werden nicht verändert. Dennoch werden die Werte von Bill_Location_Override und Bill_User_Override eingehalten, sofern sie in den Rechnungskandidaten gesetzt sind.' WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:42:24.584Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'Rechnungsadresse und -kontakt aktualisieren', Description = ' ', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 577153 ; -- 2019-10-09T12:42:43.988Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Help='When this parameter is set on true, the invoices that are to be created will get the current users and locations of their business partners, regardless of the Bill_Location and Bill_User values set in the enqueued invoice candidates. The invoice candidates themselves will not be changed. Nevertheless, the Bill_Location_Override and Bill_User_Override will be respected if they are set in the invoice candidates.',Updated=TO_TIMESTAMP('2019-10-09 15:42:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=577153 AND AD_Language='en_US' ; -- 2019-10-09T12:42:43.991Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(577153,'en_US') ;
the_stack
CREATE OR REPLACE PACKAGE te_templates_api AUTHID current_user AS /** * <h1>Application Program Interface [API] against the TE_TEMPLATES table for the tePLSQL project.</h1> * * This package imports and exports a series of tePLSQL templates for the TE_TEMPLATES using XML. * * <h2>File Format</h2> * Example XML Format: * <code> * <teplsql> * <templates> * <template> * <NAME>hello world</NAME> * <DESCRIPTION>This is a "Hello World" template</DESCRIPTION> * <CREATED_BY>SCOTT TIGER</CREATED_BY> * <CREATED_DATE>2016-11-19</CREATED_DATE> * <MODIFIED_BY>SCOTT TIGHER</MODIFIED_BY> * <MODIFIED_DATE>2016-11-19</MODIFIED_DATE> * <TEMPLATE>Hello World!</TEMPLATE> * <template/> * </templates> * </teplsql> * </code> * * File Extenstion should be .xml or .teplsql * DATE columns are those imported/exported via XML SQL. YYYY-MM-DD * The Node "/teplsql/templates/template/TEMPLATE" can be CDATA type data. * Multiple /teplsql/templates/template Nodes are expected. * * <h2>Security</h2> * This is an AUTHID CURRENT_USER package. * * The caller must have appropriate INSERT/UPDATE/SELECT permission on the TE_TEMPLATES table. * * For APEX: * The 'parsing schema' needs EXECUTE permission in order to run. (This is in addtion to INSERT/SELECT/UPDATE on TE_TEMPLATES * * For Oracle Directory: * <ul> * <li>The caller needs INSERT/SELECT/UPDATE permissions on the table TE_TEMPLATES</li> * <li>The caller must also have appropriate READ/WRITE permission on the Oracle Directory if the "directory_*" interfaces are used.</li> * </ul> * * <h2>Primative Functions</h2> * These functions are the main functions of the package. * <ul> * <li>xml_import - imports an XML LOB into the TE_TEMPLATES table</li> * <li>xml_export - returns the XML in CLOB format (todo: this should return an XMLType</li> * <li>assert - this verifies that the XML is valid for import()</li> * </ul> * * <h2>PL/SQL Interfaces</h2> * These procedures allow you to import from/export to a file using an Oracle Directoyr * * <ul> * <li>file_import - imports templates from an XML file found in an Oracle Directory.</li> * <li>file_export - exports templates into an XML file located in an Oracle Directory.</li> * </ul> * * <h2>APEX Interfaces</h2> * These procedures are for use from within Oracle Application Express (APEX) * <ul> * <li>apex_import - use to import a file uploaded via "File Browse..." Item type into APEX_APPLICATION_TEMP_FILES. APEX 5.0 or higher is required</li> * <li>apex_export - a BEFORE HEADER process that allows the end-user to download the XML file. The Filename must end in xml or teplsql</li> * </ul> * * <h2>List of Values</h2> * These are Pipelined Functions that allow you to create a List of Values for your application. * <ul> * <li>import_options_lov - returns a list of options for the import() series of procedures</li> * <li>export_options_lov - returns a list of option for the export() series of procedures</li> * </ul> * * * <h3>IMPORT Options</h3> * overwrite - if NAME matches, always OVERWRITE * ignore - if NAME matches, ignore * error - if NAME mathches, raise an error * * * * </h3>EXPORTS Options</h3> * exact - Match p_search_values against NAME using a case insentive exact mathch. * like - Match p_search_values against NAME using a case insentive LIKE match. You must provide "%" keys. * regexp - Match p_search_values against NAME using a case sensitive Regular Expression match. * * @headcom */ SUBTYPE options_t IS INTEGER NOT NULL; g_option_uninitilized CONSTANT options_t :=-1; TYPE lov_t IS RECORD ( option_value options_t DEFAULT g_option_uninitilized , option_desc VARCHAR2( 50 ) ); TYPE lov_nt IS TABLE OF lov_t; g_import_overwrite CONSTANT options_t := 1; g_import_ignore CONSTANT options_t := 2; g_import_error CONSTANT options_t := 0; g_import_default CONSTANT options_t := g_import_overwrite; g_export_exact CONSTANT options_t := 1; g_export_like CONSTANT options_t := 2; g_export_regexp CONSTANT options_t := 3; g_export_dot CONSTANT options_t := 4; g_export_default CONSTANT options_t := g_export_exact; invalid_option EXCEPTION; invalid_tePLSQL_xml EXCEPTION; /** * Asserts that the XML conforms to the current XML Schema for tePLSQL TE_TEMPLATES * * TODO: this is currently a NOOP * * @param p_xml The XML to test * @raises invalid_tePLSQL_xml Raised when input XML is not an tePLSQL XML document. */ PROCEDURE assert_xml ( p_xml IN XMLTYPE ); /* * Returns a List of Values for IMPORT Options * * The following languages are supported: * <ul> * <li>'EN' - English</li> * </ul> * * Default language is 'EN' * * usage * <code> * select * * from table( te_templates_api.import_options_lov() ) * </code> * * All unsupported languages will raise the 'invalid_option' exception. * * At this time, only EN is supported. * * @param p_lang The language for Description. * @returns List of Values (LoV) suitable for User Interfaces * @raises invalid_option Raised if the language is not supported. */ FUNCTION import_options_lov ( p_lang IN VARCHAR2 DEFAULT 'EN' ) RETURN lov_nt PIPELINED; /** * Returns a List of Values for EXPORT Options * * The following languages are supported: * <ul> * <li>'EN' - English</li> * </ul> * * Default language is 'EN' * * * usage * <code> * select * * from table( te_templates_api.export_options_lov() ) * </code> * * All unsupported languages will raise the 'invalid_option' exception. * * At this time, only EN is supported. * * @param p_lang The language for Description. * @returns List of Values (LoV) suitable for User Interfaces * @raises invalid_option Raised if the language is not supported. */ FUNCTION export_options_lov ( p_lang IN VARCHAR2 DEFAULT 'EN' ) RETURN lov_nt PIPELINED; /* * Imports a series of tePLSQL templates from a given XML document. * * The document must have already passed the "assert_xml()" function. * * @param p_xml The set of tePLSQL templates in XMLType format * @returns List of Values (LoV) suitable for User Interfaces * @param p_duplicates Defines how to handle duplicate. Default is "overwrite". * @raises invalid_option Raised when option is invalid. */ PROCEDURE xml_import ( p_xml IN XMLTYPE , p_duplicates IN options_t DEFAULT g_import_default ); /** * Returns an XML Document for a series of templates based on the <i>p_search_value</i> * * @param p_search_value The search value to use * @param p_search_type Defines how to match. Match is either Exact (default), LIKE, or Regulare Expression * @returns XML Document of Templates suitable for import via xml_import() * @raises invalid_option Raised when option is invalid.. */ FUNCTION xml_export ( p_search_value IN VARCHAR2 DEFAULT NULL , p_search_type IN options_t DEFAULT g_export_default ) RETURN XMLTYPE; /** * Imports a file from an Oracle DIRECTORY location. * * Filename must have either the ".xml" extension or the ".teplsql" extension. * * @param p_oradir The name of the Oracle DIRECTORY. * @param p_filename The name of the file to import (including extension) * @param p_duplicates The Import option to how to handle duplicate template NAMEs * @raises invalid_option Raised when option is invalid or filename is not correct. * @raises invalid_tePLSQL_xml Raised if filename is invalid or XML is not a tePLSQL XML document. */ PROCEDURE file_import ( p_oradir IN VARCHAR2 , p_filename IN VARCHAR2 , p_duplicates IN options_t DEFAULT g_import_default ); /** * Exports a collection of templates to a file in an Oracle DIRECTORY location. * * Filename must have either the ".xml" extension or the ".teplsql" extension. * * @param p_oradir The name of the Oracle DIRECTORY. * @param p_filename The name of the file to export (including extension) * @param p_search_value The search value to use * @param p_search_type Defines how to match. Match is either Exact (default), LIKE, or Regulare Expression * @raises invalid_option Raised when option is invalid or filename is not correct. * */ PROCEDURE file_export ( p_oradir IN VARCHAR2 , p_filename IN VARCHAR2 , p_search_value IN VARCHAR2 DEFAULT NULL , p_search_type IN options_t DEFAULT g_export_default ); /** * APEX utility to return a file, that was uploded via "File Browse..." Item Type, as a CLOB. * * @paream p_filename This is the value returned by the "File Browse..." Item. It is used to identify the correct file to process. */ FUNCTION filebrowse_as_clob ( p_filename IN VARCHAR2 ) RETURN CLOB; /** * Interface for APEX Process. * * This is a single call interface for APEX Process. * * Thie "File Browse..." Item needs to save the file to APEX_APPLICATION_TEMP_FILES. * * Example Usage * <code> * te_templates_api.apex_import( :P10_FILE_BROWSE, :P10_IMPORT_LOV ); * </code> * * @param p_filename This is the value returned by the "File Browse..." Item. It is used to identify the correct file to process. * @param p_duplicates Defines how to handle duplicate. Default is "overwrite". */ PROCEDURE apex_import ( p_filename IN VARCHAR2 , p_duplicates IN options_t DEFAULT g_import_default ); /** * Interface for APEX Process. * * This is a single call interface for APEX Process. * * This downloads a colletion of templates as an XML Document. * File extension shoul be '.xml' or '.teplsql'. * * Example Usage * <code> * te_templates_api.apex_import( :P10_FILENAME_TEXT, :P10_SEARCH_TEXT, :P10_EXPORT_LOV ); * </code> * * @param p_filename This is the value returned by the "File Browse..." Item. It is used to identify the correct file to process. * @param p_search_value The search value to use * @param p_search_type Defines how to match. Match is either Exact (default), LIKE, or Regulare Expression * @raises invalid_option Raised when option is invalid or filename is not correct. */ PROCEDURE apex_export ( p_filename IN VARCHAR2 , p_search_value IN VARCHAR2 , p_search_type IN VARCHAR2 ); END; /
the_stack
\set ON_ERROR_STOP 1 BEGIN; SET search_path = 'documentation'; CREATE TABLE l_area_area_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_area.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_artist_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_artist.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_event_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_event.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_instrument_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_instrument.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_label_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_label.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_place_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_place.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_recording_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_recording.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_release_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_release.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_artist_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_artist.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_event_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_event.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_instrument_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_instrument.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_label_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_label.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_place_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_place.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_recording_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_recording.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_release_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_release.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_event_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_event.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_instrument_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_instrument.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_label_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_label.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_place_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_place.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_recording_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_recording.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_release_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_release.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_event_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_event_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_instrument_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_instrument.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_label_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_label.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_place_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_place.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_recording_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_recording.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_release_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_release.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_instrument_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_instrument_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_label_label_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_label_label.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_label_place_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_label_place.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_label_recording_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_label_recording.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_label_release_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_label_release.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_label_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_label_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_label_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_label_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_label_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_label_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_place_place_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_place_place.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_place_recording_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_place_recording.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_place_release_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_place_release.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_place_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_place_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_place_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_place_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_place_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_place_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_recording_recording_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_recording_recording.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_recording_release_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_recording_release.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_recording_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_recording_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_recording_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_recording_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_recording_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_recording_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_release_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_release.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_group_release_group_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_group_release_group.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_group_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_group_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_group_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_group_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_area_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_area_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_artist_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_artist_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_label_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_label_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_place_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_place_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_recording_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_recording_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_release_group_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_release_group_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_series_series_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_series_series.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_series_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_series_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_series_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_series_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_url_url_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_url_url.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_url_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_url_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE l_work_work_example ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.l_work_work.id published BOOLEAN NOT NULL, name TEXT NOT NULL ); CREATE TABLE link_type_documentation ( -- replicate (verbose) id INTEGER NOT NULL, -- PK, references musicbrainz.link_type.id documentation TEXT NOT NULL, examples_deleted SMALLINT NOT NULL DEFAULT 0 ); COMMIT;
the_stack
-- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the -- "License"); you may not use this file except in compliance -- with the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, -- software distributed under the License is distributed on an -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -- KIND, either express or implied. See the License for the -- specific language governing permissions and limitations -- under the License. #Schema upgrade from 3.0.2 to 3.0.3; DELETE FROM `cloud`.`configuration` WHERE name='consoleproxy.cpu.mhz'; DELETE FROM `cloud`.`configuration` WHERE name='secstorage.vm.cpu.mhz'; DELETE FROM `cloud`.`configuration` WHERE name='consoleproxy.ram.size'; DELETE FROM `cloud`.`configuration` WHERE name='secstorage.vm.ram.size'; DELETE FROM `cloud`.`configuration` WHERE name='open.vswitch.vlan.network'; DELETE FROM `cloud`.`configuration` WHERE name='open.vswitch.tunnel.network'; INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'consoleproxy.service.offering', NULL, 'Service offering used by console proxy; if NULL - system offering will be used'); INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'secstorage.service.offering', NULL, 'Service offering used by secondary storage; if NULL - system offering will be used'); INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 'management-server', 'sdn.ovs.controller', NULL, 'Enable/Disable Open vSwitch SDN controller for L2-in-L3 overlay networks'); INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 'management-server', 'sdn.ovs.controller.default.label', NULL, 'Default network label to be used when fetching interface for GRE endpoints'); ALTER TABLE `cloud`.`user_vm` ADD COLUMN `update_parameters` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Defines if the parameters need to be set for the vm'; UPDATE `cloud`.`user_vm` SET update_parameters=0 where id>0; INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'ha.tag', NULL, 'HA tag defining that the host marked with this tag can be used for HA purposes only'); # Changes for Upload Volume CREATE TABLE `cloud`.`volume_host_ref` ( `id` bigint unsigned NOT NULL auto_increment, `host_id` bigint unsigned NOT NULL, `volume_id` bigint unsigned NOT NULL, `zone_id` bigint unsigned NOT NULL, `created` DATETIME NOT NULL, `last_updated` DATETIME, `job_id` varchar(255), `download_pct` int(10) unsigned, `size` bigint unsigned, `physical_size` bigint unsigned DEFAULT 0, `download_state` varchar(255), `checksum` varchar(255) COMMENT 'checksum for the data disk', `error_str` varchar(255), `local_path` varchar(255), `install_path` varchar(255), `url` varchar(255), `format` varchar(32) NOT NULL COMMENT 'format for the volume', `destroyed` tinyint(1) COMMENT 'indicates whether the volume_host entry was destroyed by the user or not', PRIMARY KEY (`id`), CONSTRAINT `fk_volume_host_ref__host_id` FOREIGN KEY `fk_volume_host_ref__host_id` (`host_id`) REFERENCES `host` (`id`) ON DELETE CASCADE, INDEX `i_volume_host_ref__host_id`(`host_id`), CONSTRAINT `fk_volume_host_ref__volume_id` FOREIGN KEY `fk_volume_host_ref__volume_id` (`volume_id`) REFERENCES `volumes` (`id`), INDEX `i_volume_host_ref__volume_id`(`volume_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; INSERT IGNORE INTO `cloud`.`disk_offering` (name, display_text, customized, unique_name, disk_size, system_use, type) VALUES ( 'Custom', 'Custom Disk', 1, 'Cloud.com-Custom', 0, 0, 'Disk'); INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Storage', 'DEFAULT', 'management-server', 'storage.max.volume.upload.size', 500, 'The maximum size for a uploaded volume(in GB).'); # Changes for OVS tunnel manager # The Following tables are not used anymore DROP TABLE IF EXISTS `cloud`.`ovs_host_vlan_alloc`; DROP TABLE IF EXISTS `cloud`.`ovs_tunnel`; DROP TABLE IF EXISTS `cloud`.`ovs_tunnel_alloc`; DROP TABLE IF EXISTS `cloud`.`ovs_vlan_mapping_dirty`; DROP TABLE IF EXISTS `cloud`.`ovs_vm_flow_log`; DROP TABLE IF EXISTS `cloud`.`ovs_work`; CREATE TABLE `cloud`.`ovs_tunnel_interface` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `ip` varchar(16) DEFAULT NULL, `netmask` varchar(16) DEFAULT NULL, `mac` varchar(18) DEFAULT NULL, `host_id` bigint(20) DEFAULT NULL, `label` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; CREATE TABLE `cloud`.`ovs_tunnel_network`( `id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT, `from` bigint unsigned COMMENT 'from host id', `to` bigint unsigned COMMENT 'to host id', `network_id` bigint unsigned COMMENT 'network identifier', `key` int unsigned COMMENT 'gre key', `port_name` varchar(32) COMMENT 'in port on open vswitch', `state` varchar(16) default 'FAILED' COMMENT 'result of tunnel creatation', PRIMARY KEY(`from`, `to`, `network_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `cloud`.`ovs_tunnel_interface` (`ip`, `netmask`, `mac`, `host_id`, `label`) VALUES ('0', '0', '0', 0, 'lock'); INSERT INTO `cloud`.`ovs_tunnel_network` (`from`, `to`, `network_id`, `key`, `port_name`, `state`) VALUES (0, 0, 0, 0, 'lock', 'SUCCESS'); UPDATE `cloud`.`configuration` set component='NetworkManager' where name='external.network.stats.interval'; UPDATE `cloud`.`configuration` set category='Advanced' where name='guest.domain.suffix'; UPDATE `cloud`.`configuration` set component='NetworkManager' where name='network.guest.cidr.limit'; UPDATE `cloud`.`configuration` set component='NetworkManager' where name='router.cpu.mhz'; UPDATE `cloud`.`configuration` set component='NetworkManager' where name='router.ram.size'; UPDATE `cloud`.`configuration` set component='NetworkManager' where name='router.stats.interval'; UPDATE `cloud`.`configuration` set component='NetworkManager' where name='router.template.id'; UPDATE `cloud`.`configuration` set category='Advanced' where name='capacity.skipcounting.hours'; UPDATE `cloud`.`configuration` set category='Advanced' where name='use.local.storage'; UPDATE `cloud`.`configuration` set description = 'Percentage (as a value between 0 and 1) of local storage utilization above which alerts will be sent about low local storage available.' where name = 'cluster.localStorage.capacity.notificationthreshold'; DELETE FROM `cloud`.`configuration` WHERE name='direct.agent.pool.size'; DELETE FROM `cloud`.`configuration` WHERE name='xen.max.product.version'; DELETE FROM `cloud`.`configuration` WHERE name='xen.max.version'; DELETE FROM `cloud`.`configuration` WHERE name='xen.max.xapi.version'; DELETE FROM `cloud`.`configuration` WHERE name='xen.min.product.version'; DELETE FROM `cloud`.`configuration` WHERE name='xen.min.version'; DELETE FROM `cloud`.`configuration` WHERE name='xen.min.xapi.version'; INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'enable.ec2.api', 'false', 'enable EC2 API on CloudStack'); INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'enable.s3.api', 'false', 'enable Amazon S3 API on CloudStack'); INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 'management-server', 'vmware.use.nexus.vswitch', 'false', 'Enable/Disable Cisco Nexus 1000v vSwitch in VMware environment'); ALTER TABLE `cloud`.`account` ADD COLUMN `default_zone_id` bigint unsigned; ALTER TABLE `cloud`.`account` ADD CONSTRAINT `fk_account__default_zone_id` FOREIGN KEY `fk_account__default_zone_id`(`default_zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE; ALTER TABLE `cloud_usage`.`account` ADD COLUMN `default_zone_id` bigint unsigned; DROP TABLE IF EXISTS `cloud`.`cluster_vsm_map`; DROP TABLE IF EXISTS `cloud`.`virtual_supervisor_module`; DROP TABLE IF EXISTS `cloud`.`port_profile`; CREATE TABLE `cloud`.`cluster_vsm_map` ( `cluster_id` bigint unsigned NOT NULL, `vsm_id` bigint unsigned NOT NULL, PRIMARY KEY (`cluster_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `cloud`.`virtual_supervisor_module` ( `id` bigint unsigned NOT NULL auto_increment COMMENT 'id', `uuid` varchar(40), `host_id` bigint NOT NULL, `vsm_name` varchar(255), `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `ipaddr` varchar(80) NOT NULL, `management_vlan` int(32), `control_vlan` int(32), `packet_vlan` int(32), `storage_vlan` int(32), `vsm_domain_id` bigint unsigned, `config_mode` varchar(20), `config_state` varchar(20), `vsm_device_state` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `cloud`.`port_profile` ( `id` bigint unsigned NOT NULL auto_increment COMMENT 'id', `uuid` varchar(40), `port_profile_name` varchar(255), `port_mode` varchar(10), `vsm_id` bigint unsigned NOT NULL, `trunk_low_vlan_id` int, `trunk_high_vlan_id` int, `access_vlan_id` int, `port_type` varchar(20) NOT NULL, `port_binding` varchar(20), PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DELETE FROM `cloud`.`storage_pool_host_ref` WHERE pool_id IN (SELECT id FROM storage_pool WHERE removed IS NOT NULL); ALTER TABLE `cloud`.`service_offering` MODIFY `nw_rate` smallint(5) unsigned DEFAULT '200' COMMENT 'network rate throttle mbits/s'; INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (141, 1, 'CentOS 5.6 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (142, 1, 'CentOS 5.6 (64-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (143, 1, 'CentOS 6.0 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (144, 1, 'CentOS 6.0 (64-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (145, 3, 'Oracle Enterprise Linux 5.6 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (146, 3, 'Oracle Enterprise Linux 5.6 (64-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (147, 3, 'Oracle Enterprise Linux 6.0 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (148, 3, 'Oracle Enterprise Linux 6.0 (64-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (149, 4, 'Red Hat Enterprise Linux 5.6 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (150, 4, 'Red Hat Enterprise Linux 5.6 (64-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (151, 5, 'SUSE Linux Enterprise Server 10 SP3 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (152, 5, 'SUSE Linux Enterprise Server 10 SP4 (64-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (153, 5, 'SUSE Linux Enterprise Server 10 SP4 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (154, 5, 'SUSE Linux Enterprise Server 11 SP1 (64-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (155, 5, 'SUSE Linux Enterprise Server 11 SP1 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (156, 10, 'Ubuntu 10.10 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (157, 10, 'Ubuntu 10.10 (64-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (161, 1, 'CentOS 5.7 (32-bit)'); INSERT IGNORE INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (162, 1, 'CentOS 5.7 (64-bit)');
the_stack
-- 2018-01-02T14:42:00.625 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IncludedTabHeight,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,558420,561306,0,540980,0,TO_TIMESTAMP('2018-01-02 14:42:00','YYYY-MM-DD HH24:MI:SS'),100,'Datum, an dem dieser Eintrag erstellt wurde',0,'de.metas.event','Das Feld Erstellt zeigt an, zu welchem Datum dieser Eintrag erstellt wurde.',0,'Y','Y','Y','N','N','N','N','N','Erstellt',10,10,0,1,1,TO_TIMESTAMP('2018-01-02 14:42:00','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-01-02T14:42:00.635 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=561306 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2018-01-02T14:43:02.952 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561295 ; -- 2018-01-02T14:43:02.957 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561293 ; -- 2018-01-02T14:43:02.960 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561294 ; -- 2018-01-02T14:43:02.963 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561297 ; -- 2018-01-02T14:43:02.966 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561302 ; -- 2018-01-02T14:43:02.969 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561298 ; -- 2018-01-02T14:43:02.971 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561299 ; -- 2018-01-02T14:43:02.974 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561300 ; -- 2018-01-02T14:43:02.976 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70,Updated=TO_TIMESTAMP('2018-01-02 14:43:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561301 ; -- 2018-01-02T14:43:17.413 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2018-01-02 14:43:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561297 ; -- 2018-01-02T14:43:18.173 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2018-01-02 14:43:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561298 ; -- 2018-01-02T14:43:27.320 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2018-01-02 14:43:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=561300 ; -- 2018-01-02T15:21:05.967 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=1568, ColumnName='PlannedQty', Description='geplante Menge', Help='geplante Menge', Name='Menge',Updated=TO_TIMESTAMP('2018-01-02 15:21:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=558381 ; -- 2018-01-02T15:21:05.970 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Menge', Description='geplante Menge', Help='geplante Menge' WHERE AD_Column_ID=558381 ; -- 2018-01-02T15:21:08.559 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('MD_Candidate_Prod_Detail','ALTER TABLE public.MD_Candidate_Prod_Detail ADD COLUMN PlannedQty NUMERIC') ; SELECT public.db_alter_table('MD_Candidate_Prod_Detail','ALTER TABLE public.MD_Candidate_Prod_Detail DROP COLUMN IF EXISTS AdvisedQty'); -- 2018-01-02T16:34:58.819 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='', Help='', Name='Geplante Menge', PrintName='Geplante Menge',Updated=TO_TIMESTAMP('2018-01-02 16:34:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1568 ; -- 2018-01-02T16:34:58.822 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='PlannedQty', Name='Geplante Menge', Description='', Help='' WHERE AD_Element_ID=1568 ; -- 2018-01-02T16:34:58.851 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='PlannedQty', Name='Geplante Menge', Description='', Help='', AD_Element_ID=1568 WHERE UPPER(ColumnName)='PLANNEDQTY' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2018-01-02T16:34:58.859 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='PlannedQty', Name='Geplante Menge', Description='', Help='' WHERE AD_Element_ID=1568 AND IsCentrallyMaintained='Y' ; -- 2018-01-02T16:34:58.863 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Geplante Menge', Description='', Help='' WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=1568) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 1568) ; -- 2018-01-02T16:34:58.887 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Geplante Menge', Name='Geplante Menge' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=1568) ; -- 2018-01-03T08:05:08.797 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,558437,1544,0,29,540821,'N','ActualQty',TO_TIMESTAMP('2018-01-03 08:05:08','YYYY-MM-DD HH24:MI:SS'),100,'N','','de.metas.material.dispo',10,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Istmenge',0,0,TO_TIMESTAMP('2018-01-03 08:05:08','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2018-01-03T08:05:08.799 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=558437 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-01-03T08:05:11.002 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('MD_Candidate_Dist_Detail','ALTER TABLE public.MD_Candidate_Dist_Detail ADD COLUMN ActualQty NUMERIC') ; -- 2018-01-03T08:05:54.972 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,DefaultValue,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,558438,543693,0,20,540821,'N','IsAdvised',TO_TIMESTAMP('2018-01-03 08:05:54','YYYY-MM-DD HH24:MI:SS'),100,'N','N','de.metas.material.dispo',1,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','N','N','Y','N','Geplant',0,0,TO_TIMESTAMP('2018-01-03 08:05:54','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2018-01-03T08:05:54.973 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=558438 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-01-03T08:05:58.597 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('MD_Candidate_Dist_Detail','ALTER TABLE public.MD_Candidate_Dist_Detail ADD COLUMN IsAdvised CHAR(1) DEFAULT ''N'' CHECK (IsAdvised IN (''Y'',''N'')) NOT NULL') ; -- 2018-01-03T08:08:21.339 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='geplant=Ja bedeutet, dass es zumindest urspänglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.',Updated=TO_TIMESTAMP('2018-01-03 08:08:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543693 ; -- 2018-01-03T08:08:21.341 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsAdvised', Name='Geplant', Description='geplant=Ja bedeutet, dass es zumindest urspänglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE AD_Element_ID=543693 ; -- 2018-01-03T08:08:21.352 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAdvised', Name='Geplant', Description='geplant=Ja bedeutet, dass es zumindest urspänglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL, AD_Element_ID=543693 WHERE UPPER(ColumnName)='ISADVISED' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2018-01-03T08:08:21.354 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAdvised', Name='Geplant', Description='geplant=Ja bedeutet, dass es zumindest urspänglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE AD_Element_ID=543693 AND IsCentrallyMaintained='Y' ; -- 2018-01-03T08:08:21.355 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Geplant', Description='geplant=Ja bedeutet, dass es zumindest urspänglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543693) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 543693) ; -- 2018-01-03T08:08:29.721 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.',Updated=TO_TIMESTAMP('2018-01-03 08:08:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543693 ; -- 2018-01-03T08:08:29.722 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsAdvised', Name='Geplant', Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE AD_Element_ID=543693 ; -- 2018-01-03T08:08:29.734 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAdvised', Name='Geplant', Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL, AD_Element_ID=543693 WHERE UPPER(ColumnName)='ISADVISED' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2018-01-03T08:08:29.736 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAdvised', Name='Geplant', Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE AD_Element_ID=543693 AND IsCentrallyMaintained='Y' ; -- 2018-01-03T08:08:29.737 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Geplant', Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543693) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 543693) ; -- 2018-01-03T08:09:02.078 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Name='Vom System vorgeschlagen', PrintName='Vom System vorgeschlagen',Updated=TO_TIMESTAMP('2018-01-03 08:09:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543693 ; -- 2018-01-03T08:09:02.079 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsAdvised', Name='Vom System vorgeschlagen', Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE AD_Element_ID=543693 ; -- 2018-01-03T08:09:02.090 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAdvised', Name='Vom System vorgeschlagen', Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL, AD_Element_ID=543693 WHERE UPPER(ColumnName)='ISADVISED' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2018-01-03T08:09:02.092 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAdvised', Name='Vom System vorgeschlagen', Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE AD_Element_ID=543693 AND IsCentrallyMaintained='Y' ; -- 2018-01-03T08:09:02.093 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Vom System vorgeschlagen', Description='geplant=Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543693) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 543693) ; -- 2018-01-03T08:09:02.113 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Vom System vorgeschlagen', Name='Vom System vorgeschlagen' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=543693) ; -- 2018-01-03T08:09:11.626 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.',Updated=TO_TIMESTAMP('2018-01-03 08:09:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543693 ; -- 2018-01-03T08:09:11.627 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsAdvised', Name='Vom System vorgeschlagen', Description='Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE AD_Element_ID=543693 ; -- 2018-01-03T08:09:11.639 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAdvised', Name='Vom System vorgeschlagen', Description='Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL, AD_Element_ID=543693 WHERE UPPER(ColumnName)='ISADVISED' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2018-01-03T08:09:11.641 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsAdvised', Name='Vom System vorgeschlagen', Description='Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE AD_Element_ID=543693 AND IsCentrallyMaintained='Y' ; -- 2018-01-03T08:09:11.642 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Vom System vorgeschlagen', Description='Ja bedeutet, dass es zumindest ursprünglich kein entsprechendes Dokument (z.B. Produktionsauftrag) gab, sondern dass das System einen Beleg vorgeschlagen hatte.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543693) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 543693) ; -- 2018-01-03T08:09:55.629 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength,Help,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,558439,1568,0,29,540821,'N','PlannedQty',TO_TIMESTAMP('2018-01-03 08:09:55','YYYY-MM-DD HH24:MI:SS'),100,'N','','de.metas.material.dispo',10,'','Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Geplante Menge',0,0,TO_TIMESTAMP('2018-01-03 08:09:55','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2018-01-03T08:09:55.630 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=558439 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2018-01-03T08:09:57.925 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('MD_Candidate_Dist_Detail','ALTER TABLE public.MD_Candidate_Dist_Detail ADD COLUMN PlannedQty NUMERIC') ; -- 2018-01-03T08:10:15.664 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO t_alter_column values('md_candidate_dist_detail','PlannedQty','NUMERIC',null,null) ;
the_stack
use test_master_0; DROP TABLE IF EXISTS data_type; CREATE TABLE data_type ( [id] [bigint] NOT NULL identity (1,1) primary key, name varchar(20) NOT NULL DEFAULT '', age tinyint NOT NULL DEFAULT '0', sex tinyint NOT NULL DEFAULT '1', subject varchar(20) NOT NULL DEFAULT '', created_at datetime NOT NULL, updated_at DATETIME NOT NULL, created_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, is_deleted tinyint NOT NULL, char_char char(255) NOT NULL, integer int NOT NULL, numeric decimal(10, 0) NOT NULL, bigint bigint NOT NULL, binary binary(1) NOT NULL, bit bit NOT NULL DEFAULT '0', -- blob blob NOT NULL, date date NOT NULL, decimal decimal(10, 0) NOT NULL, -- double_d double NOT NULL, -- point point NOT NULL, -- linestring linestring NOT NULL, -- geometry geometry NOT NULL , text text NOT NULL, ); set IDENTITY_INSERT data_type on; set IDENTITY_INSERT data_type OFF; DROP TABLE IF EXISTS test; CREATE TABLE test ( id varchar(12) NOT NULL DEFAULT 'no_id' , name varchar(20) NOT NULL DEFAULT '', age tinyint NOT NULL DEFAULT '0', sex tinyint NOT NULL DEFAULT '1', subject varchar(20) NOT NULL DEFAULT '', created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ); -- set IDENTITY_INSERT test on; INSERT INTO test (id, name, age, sex, subject, created_at, updated_at) VALUES ('po213jwqb-1', N'小明', '16', '2', N'数学', DEFAULT, DEFAULT); INSERT INTO test (id, name, age, sex, subject, created_at, updated_at) VALUES ('qwe-1', N'谭明佳', '44', '1', N'数学', DEFAULT, DEFAULT); INSERT INTO test (id, name, age, sex, subject, created_at, updated_at) VALUES ('1-22', N'小佳', '16', '2', N'数学', DEFAULT, DEFAULT); -- set IDENTITY_INSERT test OFF; DROP TABLE IF EXISTS relationship_student_teacher; CREATE TABLE relationship_student_teacher ( id int NOT NULL identity (30,1), student_id int NOT NULL DEFAULT '0', teacher_id int NOT NULL DEFAULT '0', note varchar(255) NOT NULL DEFAULT '', created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('1', '1', '1', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('2', '1', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('3', '2', '1', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('4', '2', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('5', '3', '1', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('6', '3', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('7', '4', '6', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('8', '4', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('9', '5', '6', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('10', '5', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('11', '6', '6', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('12', '6', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('13', '7', '6', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('14', '7', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('15', '8', '6', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('16', '8', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('17', '9', '6', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('18', '9', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('19', '10', '8', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher ON INSERT INTO relationship_student_teacher (id, student_id, teacher_id, note, created_at, updated_at) VALUES ('20', '10', '2', N'无备注', DEFAULT, DEFAULT); set IDENTITY_INSERT relationship_student_teacher OFF; DROP TABLE IF EXISTS teacher; CREATE TABLE teacher ( id int NOT NULL identity (18,1), name varchar(20) NOT NULL DEFAULT '', age tinyint NOT NULL DEFAULT '0', sex tinyint NOT NULL DEFAULT '1', subject varchar(20) NOT NULL DEFAULT '', created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ); set IDENTITY_INSERT teacher on INSERT INTO teacher (id, name, age, sex, subject, created_at, updated_at) VALUES ('1', N'张淑明', '22', '2', N'会计', DEFAULT, DEFAULT); set IDENTITY_INSERT teacher on INSERT INTO teacher (id, name, age, sex, subject, created_at, updated_at) VALUES ('2', N'腾腾', '26', '1', N'计算机', DEFAULT, DEFAULT); set IDENTITY_INSERT teacher on INSERT INTO teacher (id, name, age, sex, subject, created_at, updated_at) VALUES ('6', N'谭明佳', '22', '2', N'会计', DEFAULT, DEFAULT); set IDENTITY_INSERT teacher on INSERT INTO teacher (id, name, age, sex, subject, created_at, updated_at) VALUES ('8', N'文松', '22', '2', N'会计', DEFAULT, DEFAULT); set IDENTITY_INSERT teacher OFF; DROP TABLE IF EXISTS student; CREATE TABLE student ( id int NOT NULL identity (20,1), name varchar(20) NOT NULL DEFAULT '', age tinyint NOT NULL DEFAULT '0', sex tinyint NOT NULL DEFAULT '1', teacher_id int NOT NULL DEFAULT '0', is_deleted tinyint NOT NULL default 0, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('1', N'小明', '6', '2', '6', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('2', N'小张', '11', '2', '6', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('3', N'小腾', '16', '1', '6', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('4', N'小云', '11', '2', '6', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('5', N'小卡卡', '11', '2', '1', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('6', N'非卡', '16', '1', '1', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('7', N'狄龙', '17', '1', '2', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('8', N'金庸', '17', '1', '2', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('9', N'莫西卡', '17', '1', '8', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student on INSERT INTO student (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('10', N'象帕', '15', '1', '0', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT student OFF; DROP TABLE IF EXISTS people; CREATE TABLE people ( id bigint NOT NULL identity (20,1), name varchar(20) NOT NULL DEFAULT '', age tinyint NOT NULL DEFAULT '0', sex tinyint NOT NULL DEFAULT '1', teacher_id int NOT NULL DEFAULT '0', is_deleted tinyint NOT NULL default 0, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('1', N'小明', '6', '2', '6', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('2', N'小张', '11', '2', '6', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('3', N'小腾', '16', '1', '6', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('4', N'小云', '11', '2', '6', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('5', N'小卡卡', '11', '2', '1', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('6', N'非卡', '16', '1', '1', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('7', N'狄龙', '17', '1', '2', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('8', N'金庸', '17', '1', '2', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('9', N'莫西卡', '17', '1', '8', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people ON INSERT INTO people (id, name, age, sex, teacher_id, is_deleted, created_at, updated_at) VALUES ('10', N'象帕', '15', '1', '0', 0, DEFAULT, DEFAULT); set IDENTITY_INSERT people OFF;
the_stack
set enable_opfusion = on; SELECT DISTINCT typtype, typinput FROM pg_type AS p1 WHERE p1.typtype not in ('b', 'p') ORDER BY 1; create table slot_getattr_normal_view_column_t(id1 int,id2 int); create or replace view slot_getattr_normal_view_column_v as select * from slot_getattr_normal_view_column_t; create temp table slot_getattr_comment_view_column_t(id1 int,id2 int); create or replace temp view slot_getattr_comment_view_column_v as select * from slot_getattr_comment_view_column_t; comment on column slot_getattr_normal_view_column_t.id1 is 'this is normal table'; comment on column slot_getattr_normal_view_column_v.id1 is 'this is normal view'; comment on column slot_getattr_comment_view_column_t.id1 is 'this is temp table'; comment on column slot_getattr_comment_view_column_v.id1 is 'this is temp view'; \d+ slot_getattr_normal_view_column_t \d+ slot_getattr_normal_view_column_v drop view slot_getattr_normal_view_column_v cascade; drop table slot_getattr_normal_view_column_t cascade; drop view slot_getattr_comment_view_column_v cascade; drop table slot_getattr_comment_view_column_t cascade; CREATE TABLE slot_getattr_s (rf_a SERIAL PRIMARY KEY, b INT); CREATE TABLE slot_getattr (a SERIAL PRIMARY KEY, b INT, c TEXT, d TEXT ); CREATE INDEX slot_getattr_b ON slot_getattr (b); CREATE INDEX slot_getattr_c ON slot_getattr (c); CREATE INDEX slot_getattr_c_b ON slot_getattr (c,b); CREATE INDEX slot_getattr_b_c ON slot_getattr (b,c); INSERT INTO slot_getattr_s (b) VALUES (0); INSERT INTO slot_getattr_s (b) SELECT b FROM slot_getattr_s; INSERT INTO slot_getattr_s (b) SELECT b FROM slot_getattr_s; INSERT INTO slot_getattr_s (b) SELECT b FROM slot_getattr_s; INSERT INTO slot_getattr_s (b) SELECT b FROM slot_getattr_s; INSERT INTO slot_getattr_s (b) SELECT b FROM slot_getattr_s; drop table slot_getattr_s cascade; INSERT INTO slot_getattr (b, c) VALUES (11, 'once'); INSERT INTO slot_getattr (b, c) VALUES (10, 'diez'); INSERT INTO slot_getattr (b, c) VALUES (31, 'treinta y uno'); INSERT INTO slot_getattr (b, c) VALUES (22, 'veintidos'); INSERT INTO slot_getattr (b, c) VALUES (3, 'tres'); INSERT INTO slot_getattr (b, c) VALUES (20, 'veinte'); INSERT INTO slot_getattr (b, c) VALUES (23, 'veintitres'); INSERT INTO slot_getattr (b, c) VALUES (21, 'veintiuno'); INSERT INTO slot_getattr (b, c) VALUES (4, 'cuatro'); INSERT INTO slot_getattr (b, c) VALUES (14, 'catorce'); INSERT INTO slot_getattr (b, c) VALUES (2, 'dos'); INSERT INTO slot_getattr (b, c) VALUES (18, 'dieciocho'); INSERT INTO slot_getattr (b, c) VALUES (27, 'veintisiete'); INSERT INTO slot_getattr (b, c) VALUES (25, 'veinticinco'); INSERT INTO slot_getattr (b, c) VALUES (13, 'trece'); INSERT INTO slot_getattr (b, c) VALUES (28, 'veintiocho'); INSERT INTO slot_getattr (b, c) VALUES (32, 'treinta y dos'); INSERT INTO slot_getattr (b, c) VALUES (5, 'cinco'); INSERT INTO slot_getattr (b, c) VALUES (29, 'veintinueve'); INSERT INTO slot_getattr (b, c) VALUES (1, 'uno'); INSERT INTO slot_getattr (b, c) VALUES (24, 'veinticuatro'); INSERT INTO slot_getattr (b, c) VALUES (30, 'treinta'); INSERT INTO slot_getattr (b, c) VALUES (12, 'doce'); INSERT INTO slot_getattr (b, c) VALUES (17, 'diecisiete'); INSERT INTO slot_getattr (b, c) VALUES (9, 'nueve'); INSERT INTO slot_getattr (b, c) VALUES (19, 'diecinueve'); INSERT INTO slot_getattr (b, c) VALUES (26, 'veintiseis'); INSERT INTO slot_getattr (b, c) VALUES (15, 'quince'); INSERT INTO slot_getattr (b, c) VALUES (7, 'siete'); INSERT INTO slot_getattr (b, c) VALUES (16, 'dieciseis'); INSERT INTO slot_getattr (b, c) VALUES (8, 'ocho'); -- This entry is needed to test that TOASTED values are copied correctly. INSERT INTO slot_getattr (b, c, d) VALUES (6, 'seis', repeat('xyzzy', 100000)); CLUSTER slot_getattr_c ON slot_getattr; INSERT INTO slot_getattr (b, c) VALUES (1111, 'this should fail'); ALTER TABLE slot_getattr CLUSTER ON slot_getattr_b_c; -- Try turning off all clustering ALTER TABLE slot_getattr SET WITHOUT CLUSTER; drop table slot_getattr cascade; CREATE USER clstr_user PASSWORD 'gauss@123'; CREATE TABLE slot_getattr_1 (a INT PRIMARY KEY); CREATE TABLE slot_getattr_2 (a INT PRIMARY KEY); CREATE TABLE slot_getattr_3 (a INT PRIMARY KEY); ALTER TABLE slot_getattr_1 OWNER TO clstr_user; ALTER TABLE slot_getattr_3 OWNER TO clstr_user; GRANT SELECT ON slot_getattr_2 TO clstr_user; INSERT INTO slot_getattr_1 VALUES (2); INSERT INTO slot_getattr_1 VALUES (1); INSERT INTO slot_getattr_2 VALUES (2); INSERT INTO slot_getattr_2 VALUES (1); INSERT INTO slot_getattr_3 VALUES (2); INSERT INTO slot_getattr_3 VALUES (1); -- "CLUSTER <tablename>" on a table that hasn't been clustered CLUSTER slot_getattr_1_pkey ON slot_getattr_1; CLUSTER slot_getattr_2 USING slot_getattr_2_pkey; SELECT * FROM slot_getattr_1 UNION ALL SELECT * FROM slot_getattr_2 UNION ALL SELECT * FROM slot_getattr_3 ORDER BY 1; drop table slot_getattr_1; drop table slot_getattr_2; drop table slot_getattr_3; drop user clstr_user cascade; create schema slot_getattr_5; set current_schema = slot_getattr_5; set time zone 'PRC'; set codegen_cost_threshold=0; CREATE TABLE slot_getattr_5.LLVM_VECEXPR_TABLE_01( col_int int, col_bigint bigint, col_float float4, col_float8 float8, col_char char(10), col_bpchar bpchar, col_varchar varchar, col_text1 text, col_text2 text, col_num1 numeric(10,2), col_num2 numeric, col_date date, col_time timestamp )with(orientation=column) partition by range (col_int) ( partition llvm_vecexpr_table_01_01 values less than (0), partition llvm_vecexpr_table_01_02 values less than (100), partition llvm_vecexpr_table_01_03 values less than (500), partition llvm_vecexpr_table_01_04 values less than (maxvalue) ); COPY LLVM_VECEXPR_TABLE_01(col_int, col_bigint, col_float, col_float8, col_char, col_bpchar, col_varchar, col_text1, col_text2, col_num1, col_num2, col_date, col_time) FROM stdin; 1 256 3.1 3.25 beijing AaaA newcode myword myword1 3.25 3.6547 \N 2017-09-09 19:45:37 0 26 3.0 10.25 beijing AaaA newcode myword myword2 -3.2 -0.6547 \N 2017-09-09 19:45:37 3 12400 2.6 3.64755 hebei BaaB knife sea car 1.62 3.64 2017-10-09 19:45:37 2017-10-09 21:45:37 5 25685 1.0 25 anhui CccC computer game game2 7 3.65 2012-11-02 00:00:00 2018-04-09 19:45:37 -16 1345971420 3.2 2.15 hubei AaaA phone pen computer -4.24 -6.36 2012-11-04 00:00:00 2012-11-02 00:03:10 -10 1345971420 3.2 2.15 hubei AaaA phone pen computer 4.24 0.00 2012-11-04 00:00:00 2012-11-02 00:03:10 64 -2566 1.25 2.7 jilin DddD girl flower window 65 -69.36 2012-11-03 00:00:00 2011-12-09 19:45:37 64 0 1.25 2.7 jilin DddD boy flower window 65 69.36 2012-11-03 00:00:00 2011-12-09 19:45:37 \N 256 3.1 4.25 anhui BbbB knife phone light 78.12 2.35684156 2017-10-09 19:45:37 1984-2-6 01:00:30 81 \N 4.8 3.65 luxi EeeE girl sea crow 145 56 2018-01-09 19:45:37 2018-01-09 19:45:37 8 \N 5.8 30.65 luxing EffE girls sea crown \N 506 \N \N 25 0 \N 3.12 lufei EeeE call you them 7.12 6.36848 2018-05-09 19:45:37 2018-05-09 19:45:37 36 5879 10.15 \N lefei GggG say you them 2.5 -2.5648 2015-02-26 02:15:01 1984-2-6 02:15:01 36 59 10.15 \N lefei GggG call you them 2.5 \N 2015-02-26 02:15:01 1984-2-6 02:15:01 0 0 10.15 \N hefei GggG call your them -2.5 2.5648 \N 1984-2-6 02:15:01 27 256 4.25 63.27 \N FffF code throw away 2.1 25.65 2018-03-09 19:45:37 \N 9 -128 -2.4 56.123 jiangsu \N greate book boy 7 -1.23 2017-12-09 19:45:37 2012-11-02 14:20:25 1001 78956 1.25 2.568 hangzhou CccC \N away they 6.36 58.254 2017-10-09 19:45:37 1984-2-6 01:00:30 2005 12400 12.24 2.7 hangzhou AaaA flower \N car 12546 3.2546 2017-09-09 19:45:37 2012-11-02 00:03:10 8 5879 \N 1.36 luxi DeeD walet wall \N 2.58 3.54789 2000-01-01 2000-01-01 01:01:01 652 25489 8.88 1.365 hebei god piece sugar pow \N 2.1 2012-11-02 00:00:00 2012-11-02 00:00:00 417 2 9.19 0.256 jiangxi xizang walet bottle water 11.50 -1.01256 \N 1984-2-6 01:00:30 18 65 -0.125 78.96 henan PooP line black redline 24 3.1415926 2000-01-01 \N \N \N \N \N \N \N \N \N \N \N \N \N \N -700 58964785 3.25 1.458 \N qingdao \N 2897 dog 9.36 \N \N 2017-10-09 20:45:37 -505 1 3.24 \N \N BbbB \N myword pen 147 875 2000-01-01 01:01:01 2000-01-01 01:01:01 \. CREATE TABLE slot_getattr_5.LLVM_VECEXPR_TABLE_02( col_bool bool, col_sint int2, col_int int, col_bigint bigint, col_char char(10), col_bpchar bpchar, col_varchar varchar, col_text text, col_date date, col_time timestamp )with(orientation=column); create index llvm_index_01 on llvm_vecexpr_table_02(col_int); create index llvm_index_02 on llvm_vecexpr_table_02(col_char); create index llvm_index_03 on llvm_vecexpr_table_02(col_varchar); create index llvm_index_04 on llvm_vecexpr_table_02(col_text); create index llvm_index_05 on llvm_vecexpr_table_02(col_date); COPY LLVM_VECEXPR_TABLE_02(col_bool, col_sint, col_int, col_bigint, col_char, col_bpchar, col_varchar, col_text, col_date, col_time) FROM stdin; f 1 0 256 11 111 1111 123456 2000-01-01 01:01:01 2000-01-01 01:01:01 1 1 1 0 101 11 11011 3456 \N 2000-01-01 01:01:01 0 2 2 128 24 75698 56789 12345 2017-09-09 19:45:37 \N 1 3 30 2899 11111 1111 12345 123456 2015-02-26 2012-12-02 02:15:01 0 4 417 0 245 111 1111 123456 2018-05-09 19:45:37 1984-2-6 01:00:30 f 5 \N 365487 111 1111 12345 123456 \N 1984-2-6 01:00:30 0 6 0 6987 11 111 24568 123456 \N 2018-03-07 19:45:37 t 7 18 1348971452 24 2563 2222 56789 2000-01-01 2000-01-01 01:01:01 0 8 \N 258 \N 1258 25879 25689 2014-05-12 2004-2-6 07:30:30 1 \N 569 254879963 11 \N 547 36589 2016-01-20 2012-11-02 00:00:00 \N 8 4 \N 11 111 \N 56897 2013-05-08 2012-11-02 00:03:10 \N 8 \N \N 11 111 \N 56897 2013-05-08 2012-11-02 00:03:10 1 \N 56 58964 25 365487 5879 \N 2018-03-07 1999-2-6 01:00:30 t \N 694 2 364 56897 \N \N 2018-11-05 2011-2-6 01:00:30 f -1 -30 -3658 5879 11 25879 \N 2018-03-07 \N 1 -2 -15 -24 3698 58967 698745 5879 2012-11-02 2012-11-02 00:00:00 \N -3 2147483645 258 3698 36587 125478 111 2015-02-2 2000-01-01 01:01:01 0 12 -48 -9223372036854775802 258 36987 12587 2547 2014-03-12 2012-11-02 01:00:00 1 -3 -2 9223372036854775801 3689 256987 36547 14587 2016-01-20 2012-11-02 07:00:00 \N -6 -2147483640 -1587452 1112 1115 12548 36589 \N 1999-2-6 01:00:30 t -6 \N -1587452 1112 1115 12548 36589 2014-03-12 \N \. analyze llvm_vecexpr_table_01; analyze llvm_vecexpr_table_02; select A.col_int, A.col_bigint, A.col_num1, a.col_float8, A.col_num1, a.col_date, (A.col_num1 - A.col_int)/A.col_float8 <= A.col_bigint and ( substr(A.col_date, 1, 4) in (select substr(B.col_date, 1, 4) from llvm_vecexpr_table_02 as B )) from llvm_vecexpr_table_01 as A order by 1, 2, 3, 4, 5, 6, 7; drop schema slot_getattr_5 cascade; reset search_path; create type type_array as ( id int, name varchar(50), score decimal(5,2), create_time timestamp ); create table slot_getattr_7(a serial, b type_array[]) partition by range (a) (partition p1 values less than(100),partition p2 values less than(maxvalue)); create table slot_getattr_8(a serial, b type_array[]); insert into slot_getattr_7(b) values('{}'); insert into slot_getattr_7(b) values(array[cast((1,'test',12,'2018-01-01') as type_array),cast((2,'test2',212,'2018-02-01') as type_array)]); analyze slot_getattr_7; insert into slot_getattr_8(b) values(''); insert into slot_getattr_8(b) values(array[cast((1,'test',12,'2018-01-01') as type_array),cast((2,'test2',212,'2018-02-01') as type_array)]); select * from slot_getattr_8 where b>array[cast((0,'test',12,'') as type_array),cast((1,'test2',212,'') as type_array)] order by 1,2; update slot_getattr_7 set b=array[cast((1,'test',12,'2018-01-01') as type_array),cast((2,'test2',212,'2018-02-01') as type_array)] where b='{}'; create index i_array on slot_getattr_7(b) local; select * from slot_getattr_7 where b>array[cast((0,'test',12,'') as type_array),cast((1,'test2',212,'') as type_array)] order by 1,2; alter type type_array add attribute attr bool; SELECT b, LISTAGG(a, ',') WITHIN GROUP(ORDER BY b DESC) FROM slot_getattr_7 group by 1; drop type type_array cascade; drop table slot_getattr_7 cascade; drop table slot_getattr_8 cascade; create schema sche1_slot_getallattrs; set current_schema = sche1_slot_getallattrs; create table function_table_01(f1 int, f2 float, f3 text); insert into function_table_01 values(1,2.0,'abcde'),(2,4.0,'abcde'),(3,5.0,'affde'); insert into function_table_01 values(4,7.0,'aeede'),(5,1.0,'facde'),(6,3.0,'affde'); analyze function_table_01; CREATE OR REPLACE FUNCTION test_function_immutable RETURNS BIGINT AS $body$ BEGIN RETURN 3; END; $body$ LANGUAGE 'plpgsql' IMMUTABLE CALLED ON NULL INPUT SECURITY INVOKER COST 100; select f1,f3 from function_table_01 order by left(f3,test_function_immutable()::INT), f1 limit 3; -- test the table with the same name with a pg_catalog table create schema sche2_slot_getallattrs; create table sche2_slot_getallattrs.pg_class(id int); set search_path=sche2_slot_getallattrs; insert into pg_class values(1); select * from sche2_slot_getallattrs.pg_class; insert into sche2_slot_getallattrs.pg_class values(1); select * from sche2_slot_getallattrs.pg_class; delete from sche2_slot_getallattrs.pg_class; drop schema sche1_slot_getallattrs cascade; drop schema sche2_slot_getallattrs cascade; reset search_path; CREATE TEMP TABLE y ( col1 text, col2 text ); INSERT INTO y VALUES ('Jackson, Sam', E'\\h'); INSERT INTO y VALUES ('It is "perfect".',E'\t'); INSERT INTO y VALUES ('', NULL); COPY y TO stdout WITH CSV; COPY y TO stdout WITH CSV QUOTE '''' DELIMITER '|'; COPY y TO stdout WITH CSV FORCE QUOTE col2 ESCAPE E'\\' ENCODING 'sql_ascii'; COPY y TO stdout WITH CSV FORCE QUOTE *; -- Repeat above tests with new 9.0 option syntax COPY y TO stdout (FORMAT CSV); COPY y TO stdout (FORMAT CSV, QUOTE '''', DELIMITER '|'); COPY y TO stdout (FORMAT CSV, FORCE_QUOTE (col2), ESCAPE E'\\'); COPY y TO stdout (FORMAT CSV, FORCE_QUOTE *); \copy y TO stdout (FORMAT CSV) \copy y TO stdout (FORMAT CSV, QUOTE '''', DELIMITER '|') \copy y TO stdout (FORMAT CSV, FORCE_QUOTE (col2), ESCAPE E'\\') \copy y TO stdout (FORMAT CSV, FORCE_QUOTE *) CREATE TEMP TABLE testnl (a int, b text, c int); COPY testnl FROM stdin CSV; 1,"a field with two LFs inside",2 \. -- test end of copy marker CREATE TABLE testeoc (a text); COPY testeoc FROM stdin CSV; a\. \.b c\.d "\." \. drop table testnl cascade; drop table testeoc cascade; drop table y cascade; CREATE SCHEMA sche1; CREATE SCHEMA sche2; CREATE TABLE sche1.t1(a int) /*distribute BY replication*/; SET search_path = sche2; CREATE OR REPLACE FUNCTION sche1.fun_001() RETURNS setof sche1.t1 AS $$ DECLARE row_data t1%ROWTYPE; row_name RECORD; query_str text; BEGIN query_str := 'WITH t AS ( INSERT INTO t1 VALUES (11),(12),(13) RETURNING * ) SELECT * FROM t ORDER BY 1;'; FOR row_data IN EXECUTE(query_str) LOOP RETURN NEXT row_data; END LOOP; RETURN; END; $$ LANGUAGE 'plpgsql' NOT FENCED; SELECT sche1.fun_001(); DROP SCHEMA sche1 CASCADE; DROP SCHEMA sche2 CASCADE; reset search_path; CREATE TYPE type_array AS ( id int, name varchar(50), score decimal(5,2), create_time timestamp ); CREATE TABLE ExecClearTuple_5(a serial, b type_array[]) PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN(100),PARTITION p2 VALUES LESS THAN(maxvalue)); INSERT INTO ExecClearTuple_5(b) VALUES('{}'); INSERT INTO ExecClearTuple_5(b) VALUES(ARRAY[CAST((1,'test',12,'2018-01-01') AS type_array),CAST((2,'test2',212,'2018-02-01') AS type_array)]); analyze ExecClearTuple_5; UPDATE ExecClearTuple_5 SET b=ARRAY[CAST((1,'test',12,'2018-01-01') AS type_array),CAST((2,'test2',212,'2018-02-01') AS type_array)] WHERE b='{}'; CREATE INDEX i_array ON ExecClearTuple_5(b) local; SELECT * FROM ExecClearTuple_5 WHERE b>ARRAY[CAST((0,'test',12,'') AS type_array),CAST((1,'test2',212,'') AS type_array)] ORDER BY 1,2; alter TYPE type_array add attribute attr bool; SELECT b, LISTAGG(a, ',') WITHIN GROUP(ORDER BY b DESC) FROM ExecClearTuple_5 GROUP BY 1; DROP TYPE type_array CASCADE; DROP TABLE ExecClearTuple_5 CASCADE; CREATE TABLE ExecClearTuple_6(col1 int, col2 int, col3 text); CREATE INDEX iExecClearTuple_6 ON ExecClearTuple_6(col1,col2); INSERT INTO ExecClearTuple_6 VALUES (0,0,'test_insert'); INSERT INTO ExecClearTuple_6 VALUES (0,1,'test_insert'); INSERT INTO ExecClearTuple_6 VALUES (1,1,'test_insert'); INSERT INTO ExecClearTuple_6 VALUES (1,2,'test_insert'); INSERT INTO ExecClearTuple_6 VALUES (0,0,'test_insert2'); INSERT INTO ExecClearTuple_6 VALUES (2,2,'test_insert2'); INSERT INTO ExecClearTuple_6 VALUES (0,0,'test_insert3'); INSERT INTO ExecClearTuple_6 VALUES (3,3,'test_insert3'); INSERT INTO ExecClearTuple_6(col1,col2) VALUES (1,1); INSERT INTO ExecClearTuple_6(col1,col2) VALUES (2,2); INSERT INTO ExecClearTuple_6(col1,col2) VALUES (3,3); INSERT INTO ExecClearTuple_6 VALUES (null,null,null); SELECT col1,col2 FROM ExecClearTuple_6 WHERE col1=0 AND col2=0 ORDER BY col1,col2 for UPDATE LIMIT 1; -- DROP TABLE ExecClearTuple_6 CASCADE; DROP TABLE ExecClearTuple_6 CASCADE; SET current_schema=information_schema; CREATE TABLE ExecClearTuple_8(a int, b int); INSERT INTO ExecClearTuple_8 VALUES(1,2),(2,3),(3,4),(4,5); \d+ ExecClearTuple_8 \d+ sql_features explain (verbose ON, costs OFF, nodes OFF) SELECT COUNT(*) FROM sql_features; SELECT COUNT(*) FROM sql_features; explain (verbose ON, costs OFF, nodes OFF) SELECT * FROM ExecClearTuple_8; SELECT COUNT(*) FROM ExecClearTuple_8; DROP TABLE ExecClearTuple_8; reset current_schema; CREATE USER clstr_user PASSWORD 'gauss@123'; CREATE TABLE clstr_1 (a INT PRIMARY KEY); CREATE TABLE clstr_2 (a INT PRIMARY KEY); CREATE TABLE clstr_3 (a INT PRIMARY KEY); ALTER TABLE clstr_1 OWNER TO clstr_user; ALTER TABLE clstr_3 OWNER TO clstr_user; GRANT SELECT ON clstr_2 TO clstr_user; INSERT INTO clstr_1 VALUES (2); INSERT INTO clstr_1 VALUES (1); INSERT INTO clstr_2 VALUES (2); INSERT INTO clstr_2 VALUES (1); INSERT INTO clstr_3 VALUES (2); INSERT INTO clstr_3 VALUES (1); CLUSTER clstr_2; CLUSTER clstr_1_pkey ON clstr_1; CLUSTER clstr_2 USING clstr_2_pkey; SELECT * FROM clstr_1 UNION ALL SELECT * FROM clstr_2 UNION ALL SELECT * FROM clstr_3 ORDER BY 1; DROP TABLE clstr_1 CASCADE; DROP TABLE clstr_2 CASCADE; DROP TABLE clstr_3 CASCADE; DROP user clstr_user CASCADE; CREATE TABLE clustertest (KEY int PRIMARY KEY); INSERT INTO clustertest VALUES (10); INSERT INTO clustertest VALUES (20); INSERT INTO clustertest VALUES (30); INSERT INTO clustertest VALUES (40); INSERT INTO clustertest VALUES (50); -- Test UPDATE WHERE the old row version is found first in the scan UPDATE clustertest SET KEY = 100 WHERE KEY = 10; -- Test UPDATE WHERE the new row version is found first in the scan UPDATE clustertest SET KEY = 35 WHERE KEY = 40; -- Test longer UPDATE chain UPDATE clustertest SET KEY = 60 WHERE KEY = 50; UPDATE clustertest SET KEY = 70 WHERE KEY = 60; UPDATE clustertest SET KEY = 80 WHERE KEY = 70; DROP TABLE clustertest CASCADE; CREATE TABLE ExecClearTuple_11 (col1 int PRIMARY KEY, col2 INT, col3 smallserial) ; PREPARE p1 AS INSERT INTO ExecClearTuple_11 VALUES($1, $2) ON DUPLICATE KEY UPDATE col2 = $1*100; EXECUTE p1(5, 50); SELECT * FROM ExecClearTuple_11 WHERE col1 = 5; EXECUTE p1(5, 50); SELECT * FROM ExecClearTuple_11 WHERE col1 = 5; DELETE ExecClearTuple_11 WHERE col1 = 5; DEALLOCATE p1; DROP TABLE ExecClearTuple_11 CASCADE; create table tGin122 ( name varchar(50) not null, age int, birth date, ID varchar(50) , phone varchar(15), carNum varchar(50), email varchar(50), info text, config varchar(50) default 'english', tv tsvector, i varchar(50)[], ts tsquery); insert into tGin122 values('Linda', 20, '1996-06-01', '140110199606012076', '13454333333', '京A QL666', 'linda20@sohu.com', 'When he was busy with teaching men the art of living, Prometheus had left a bigcask in the care of Epimetheus. He had warned his brother not to open the lid. Pandora was a curious woman. She had been feeling very disappointed that her husband did not allow her to take a look at the contents of the cask. One day, when Epimetheus was out, she lifted the lid and out it came unrest and war, Plague and sickness, theft and violence, grief, sorrow, and all the other evils. The human world was hence to experience these evils. Only hope stayed within the mouth of the jar and never flew out. So men always have hope within their hearts. 偷窃天火之后,宙斯对人类的敌意与日俱增。一天,他令儿子赫菲斯托斯用泥塑一美女像,并请众神赠予她不同的礼物。世上的第一个女人是位迷人女郎,因为她从每位神灵那里得到了一样对男人有害的礼物,因此宙斯称她为潘多拉。 ', 'ngram', '', '{''brother'',''与日俱增'',''赫菲斯托斯''}',NULL); insert into tGin122 values('张三', 20, '1996-07-01', '140110199607012076', '13514333333', '鲁K QL662', 'zhangsan@163.com', '希腊北部国王阿塔玛斯有两个孩子,法瑞克斯和赫勒。当国王离 开第一个妻子和一个名叫伊诺的坏女人结婚后,两个孩子受到后母残忍虐待,整个王国也受到毁灭性瘟疫的侵袭。伊诺在爱轻信的丈夫耳边进谗言,终于使国王相信:他的儿子法瑞克斯是这次灾害的罪魁祸首,并要将他献给宙斯以结束 瘟疫。可怜的孩子被推上了祭坛,将要被处死。正在此时,上帝派了一只浑身上下长着金色羊毛的公羊来将两个孩子驮在背上带走了。当他们飞过隔开欧洲和亚洲的海峡时,赫勒由于看到浩瀚的海洋而头晕目眩,最终掉进大海淹死了。 这片海洋古时候的名称叫赫勒之海,赫勒拉旁海峡便由此而来。金色公羊驮着法瑞克斯继续向前飞去,来到了黑海东岸的科尔契斯。在那里,法瑞克斯将公羊献给了宙斯;而将金羊毛送给了埃厄忒斯国王。国王将羊毛钉在一棵圣树上, 并派了一条不睡觉的龙负责看护。', 'ngram', '', '{''法瑞克斯和赫勒'',''王国'',''埃厄忒斯国王''}',NULL); insert into tGin122 values('Sara', 20, '1996-07-02', '140110199607022076', '13754333333', '冀A QL661', 'sara20@sohu.com', '英语语言结构重形合(hypotaxis),汉语重义合(parataxis)>,也就是说,英语的句子组织通常通过连接词(connectives)和词尾的曲折变化(inflection)来实现,汉语则较少使用连接词和受语法规则约束。英语句子通过表示各种关系如因果、条件、逻辑、预设等形合手段组织,环环相扣,>可以形成像树枝一样包孕许多修饰成分和分句的长句和复杂句,而汉语则多用短句和简单句。此外,英语注重使用各种短语作为句子的构成单位,在修饰位置上可前可后、十分灵活,常习惯于后置语序。这些差异就形成了王力先生所谓 的英语“化零为整”而汉语则“化整为零”特点。此外,英语多用被动语态,这在科技英语中尤为如此。了解英语和汉语这些造句差异,就可在英语长句和复杂句的理解和翻译中有意识地将英语句子按照汉语造句特点进行转化处理,短从句结构变单独句子或相反,后置变前置,被动变主动。以下结合本人在教学中遇到的例子,说说如何对生物类专业英语长句和复杂句翻译进行翻译处理。', 'english', '', '{''parataxis'',''后置变前置'',''差异''}',NULL); insert into tGin122 values('Mira', 20, '1996-08-01', '140110199608012076', '13654333333', '津A QL660', 'mm20@sohu.com', '[解析]第一个分句宜将被动语态译为主动语态,第二个分句如将定>语分句处理为汉语前置,“利用能在培养组织中迅速降解而无需提供第二种生根培养基的IAA则是克服这个问题的一种有用方法。”则会因修饰语太长,不易理解,也不符合汉语习惯,宜作为分句处理。[翻译]根发端所需的生长素水平抑制根的伸长,而利用IAA则是克服这个问题的一种有用方法,因为IAA能在培养组织中迅速降解而无需提供第二种生根培养基。', 'english', '', '{''汉语前置'',''分句处理'',''生长素水平''}',NULL); insert into tGin122 values('Amy', 20, ' 1996-09-01', '140110199609012076', '13854333333', '吉A QL663', 'amy2008@163.com', '[解析]该句的理解的关键是要抓住主句的结构“Current concern focus on ……, and on……”,同时不要将第二个“on”的搭配(intrusionon)与主句中第一个和第三个“on”的搭配(focuson)混淆。翻译时,为了避免宾语的修补词过长,可用“目前公众对转基因植物的关注集中在这两点”来用“一方面……;另一方面……”来分述,这样处理更符合汉语习惯。', 'ngram', '', '{''intrusionon'',''13854333333'',''140110199609012076''}',NULL); insert into tGin122 values('汪玲沁 ', 20, ' 1996-09-01', '44088319921103106X', '13854333333', '沈YWZJW0', 'si2008@163.com', '晨的美好就如青草般芳香,如河溪般清澈,如玻璃般透明,如>甘露般香甜。[解析]该句的主句结构为“This led to a whole new field of academic research”,后面有一个现在分词结构“including the milestone paper by Paterson and co-workers in 1988”之后为“the milestone pape长定语从句。在翻译时,宜将该定语从句分译成句,但要将表示方法手段的现在分词结构“using an approach that could be applied to dissect the genetic make-up of any physiological, morphological and behavioural trat in plants and animals”前置译出,这样更符合汉语的表达习惯。', 'ngram', '', '{''44088319921103106X'',''分词结构'',''透明''}',NULL); create index tgin122_idx1 on tgin122 (substr(email,2,5)); create index tgin122_idx2 on tgin122 (upper(info)); set default_statistics_target=-2; analyze tGin122 ((tv, ts)); select * from pg_ext_stats where schemaname='distribute_stat_2' and tablename='tgin122' order by attname; alter table tGin122 delete statistics ((tv, ts)); update tGin122 set tv=to_tsvector(config::regconfig, coalesce(name,'') || ' ' || coalesce(ID,'') || ' ' || coalesce(carNum,'') || ' ' || coalesce(phone,'') || ' ' || coalesce(email,'') || ' ' || coalesce(info,'')); update tGin122 set ts=to_tsquery('ngram', coalesce(phone,'')); analyze tGin122 ((tv, ts)); select * from pg_ext_stats where schemaname='distribute_stat_2' and tablename='tgin122' order by attname; alter table tGin122 delete statistics ((tv, ts)); select * from pg_ext_stats where schemaname='distribute_stat_2' and tablename='tgin122' order by attname; alter table tGin122 add statistics ((tv, ts)); analyze tGin122; select * from pg_ext_stats where schemaname='distribute_stat_2' and tablename='tgin122' order by attname; select * from pg_stats where tablename='tgin122' and attname = 'tv'; select attname,avg_width,n_distinct,histogram_bounds from pg_stats where tablename='tgin122_idx1'; drop table tgin122 cascade; select count(*)>=0 from gs_os_run_info; select count(*)>=0 from gs_session_memory_detail; select count(*)>=0 from gs_shared_memory_detail; select count(*) from (select * from gs_session_time limit 1); select count(*)>=0 from gs_file_stat; select * from gs_session_stat where statid = -1; select count(*)>=0 from gs_session_memory; select count(*) from (select * from gs_total_memory_detail limit 1); create table anothertab (atcol1 serial8, atcol2 boolean, constraint anothertab_chk check (atcol1 <= 3));; insert into anothertab (atcol1, atcol2) values (default, true); insert into anothertab (atcol1, atcol2) values (default, false); select * from anothertab order by atcol1, atcol2; alter table anothertab alter column atcol1 type boolean; drop table anothertab; create type lockmodes as enum ( 'AccessShareLock' ,'RowShareLock' ,'RowExclusiveLock' ,'ShareUpdateExclusiveLock' ,'ShareLock' ,'ShareRowExclusiveLock' ,'ExclusiveLock' ,'AccessExclusiveLock' ); create or replace view my_locks as select case when c.relname like 'pg_toast%' then 'pg_toast' else c.relname end, max(mode::lockmodes) as max_lockmode from pg_locks l join pg_class c on l.relation = c.oid where virtualtransaction = ( select virtualtransaction from pg_locks where transactionid = txid_current()::integer) and locktype = 'relation' and relnamespace != (select oid from pg_namespace where nspname = 'pg_catalog') and c.relname != 'my_locks' group by c.relname; create table alterlock (f1 int primary key, f2 text); start transaction; alter table alterlock cluster on alterlock_pkey; select * from my_locks order by 1; commit; drop view my_locks cascade; drop type lockmodes cascade; drop table alterlock cascade; CREATE TYPE test_type3 AS (a int); CREATE TABLE test_tbl3 (c) AS SELECT '(1)'::test_type3; drop type test_type3 cascade; drop table test_tbl3 cascade; CREATE TABLE test_exists (a int, b text); CREATE TEXT SEARCH DICTIONARY test_tsdict_exists ( Template=ispell, DictFile=ispell_sample, AffFile=ispell_sample ); DROP TEXT SEARCH DICTIONARY test_tsdict_exists; CREATE TEXT SEARCH CONFIGURATION test_tsconfig_exists (COPY=english); DROP TEXT SEARCH CONFIGURATION test_tsconfig_exists; CREATE TRIGGER test_trigger_exists BEFORE UPDATE ON test_exists FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger(); DROP TRIGGER test_trigger_exists ON test_exists; drop table test_exists cascade; select count(*) from pg_node_env; select count(*) from pg_os_threads; create table running_xacts_tbl(handle int4); insert into running_xacts_tbl(select handle from pg_get_running_xacts()); drop table running_xacts_tbl; create table pg_stat_get_redo_stat_tbl(a int8); insert into pg_stat_get_redo_stat_tbl select phywrts from pg_stat_get_redo_stat(); drop table pg_stat_get_redo_stat_tbl; create schema pgaudit_audit_object; alter schema pgaudit_audit_object rename to pgaudit_audit_object_1; drop schema pgaudit_audit_object_1; create role davide WITH PASSWORD 'jw8s0F411_1'; ALTER ROLE davide SET maintenance_work_mem = 100000; alter role davide rename to davide1; drop role davide1; create table pgaudit_audit_object (a int, b int); CREATE VIEW vista AS SELECT * from pgaudit_audit_object; alter view vista rename to vista1; drop view vista1; drop table pgaudit_audit_object; CREATE DATABASE lusiadas; alter database lusiadas rename to lusiadas1; drop database lusiadas1; create table base_table(a int,b int,c int); insert into base_table values(1,1,1); insert into base_table values(2,1,1); insert into base_table values(2,1,2); insert into base_table values(2,2,12); insert into base_table values(3,5,7); insert into base_table values(3,5,7); insert into base_table values(1,1,10); insert into base_table values(2,2,10); insert into base_table values(3,3,5); insert into base_table values(3,3,5); insert into base_table values(4,6,8); insert into base_table values(4,6,8); create table col_rep_tb1(a int,b int,c int) with(orientation=column) ; insert into col_rep_tb1 select * from base_table; delete from col_rep_tb1 where col_rep_tb1.a>1 and col_rep_tb1.c<10; drop table col_rep_tb1 cascade; drop table base_table cascade; create table trans_base_table ( a_tinyint tinyint , a_smallint smallint not null, a_numeric numeric(18,2) , a_decimal decimal null, a_real real null, a_double_precision double precision null, a_dec dec , a_integer integer default 100, a_char char(5) not null, a_varchar varchar(15) null, a_nvarchar2 nvarchar2(10) null, a_text text null, a_date date default '2015-07-07', a_time time without time zone, a_timetz time with time zone default '2013-01-25 23:41:38.8', a_smalldatetime smalldatetime, a_money money not null, a_interval interval ); insert into trans_base_table (a_smallint,a_char,a_text,a_money) values(generate_series(1,500),'fkdll','65sdcbas',20); insert into trans_base_table (a_smallint,a_char,a_text,a_money) values(100,'fkdll','65sdcbas',generate_series(1,400)); create table create_columnar_repl_trans_002 ( a_tinyint tinyint , a_smallint smallint not null, a_numeric numeric(18,2) , a_decimal decimal null, a_real real null, a_double_precision double precision null, a_dec dec , a_integer integer default 100, a_char char(5) not null, a_varchar varchar(15) null, a_nvarchar2 nvarchar2(10) null, a_text text null, a_date date default '2015-07-07', a_time time without time zone, a_timetz time with time zone default '2013-01-25 23:41:38.8', a_smalldatetime smalldatetime, a_money money not null, a_interval interval, partial cluster key(a_smallint)) with (orientation=column, compression = high) ; create index create_index_repl_trans_002 on create_columnar_repl_trans_002(a_smallint,a_date,a_integer); insert into create_columnar_repl_trans_002 select * from trans_base_table; start transaction; alter table create_columnar_repl_trans_002 add column a_char_01 char(20) default '中国制造'; insert into create_columnar_repl_trans_002 (a_smallint,a_char,a_money,a_char_01) values(generate_series(1,10),'li',21.1,'高斯部'); delete from create_columnar_repl_trans_002 where a_smallint>5 and a_char_01='高斯部'; rollback; drop table create_columnar_repl_trans_002 cascade; drop table trans_base_table cascade; \c -
the_stack
-- 2019-01-11T12:52:27.238 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsAllowFiltering,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,IsMultiLine,MultiLine_LinesCount,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,551106,0,540456,540810,554500,'F',TO_TIMESTAMP('2019-01-11 12:52:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','N','N',0,'Erstellt',20,0,0,TO_TIMESTAMP('2019-01-11 12:52:27','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-01-11T12:52:40.394 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsAllowFiltering,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,IsMultiLine,MultiLine_LinesCount,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,551107,0,540456,540810,554501,'F',TO_TIMESTAMP('2019-01-11 12:52:40','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','N','N',0,'Erstellt durch',30,0,0,TO_TIMESTAMP('2019-01-11 12:52:40','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-01-11T12:53:08.553 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsAllowFiltering,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,IsMultiLine,MultiLine_LinesCount,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,551103,0,540456,540801,554502,'F',TO_TIMESTAMP('2019-01-11 12:53:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','N','N',0,'Aktualisiert',260,0,0,TO_TIMESTAMP('2019-01-11 12:53:08','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-01-11T12:53:22.417 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsAllowFiltering,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,IsMultiLine,MultiLine_LinesCount,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,551104,0,540456,540801,554503,'F',TO_TIMESTAMP('2019-01-11 12:53:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','N','N',0,'Aktualisiert durch',270,0,0,TO_TIMESTAMP('2019-01-11 12:53:22','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2019-01-11T12:54:04.743 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546463 ; -- 2019-01-11T12:54:04.745 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=554500 ; -- 2019-01-11T12:54:04.747 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=554501 ; -- 2019-01-11T12:54:04.748 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546465 ; -- 2019-01-11T12:54:04.749 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546469 ; -- 2019-01-11T12:54:04.750 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546470 ; -- 2019-01-11T12:54:04.752 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546471 ; -- 2019-01-11T12:54:04.753 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546472 ; -- 2019-01-11T12:54:04.754 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=100,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546473 ; -- 2019-01-11T12:54:04.756 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546466 ; -- 2019-01-11T12:54:04.758 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=120,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546467 ; -- 2019-01-11T12:54:04.760 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=130,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546468 ; -- 2019-01-11T12:54:04.761 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=140,Updated=TO_TIMESTAMP('2019-01-11 12:54:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546474 ; -- 2019-01-11T12:54:30.445 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='M',Updated=TO_TIMESTAMP('2019-01-11 12:54:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546464 ; -- 2019-01-11T12:54:35.660 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='M',Updated=TO_TIMESTAMP('2019-01-11 12:54:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546463 ; -- 2019-01-11T12:57:03.556 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2019-01-11 12:57:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=554502 ; -- 2019-01-11T12:57:05.092 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2019-01-11 12:57:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=554503 ; -- 2019-01-11T13:13:51.704 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=10,Updated=TO_TIMESTAMP('2019-01-11 13:13:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=547846 ; -- 2019-01-11T13:13:51.716 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=20,Updated=TO_TIMESTAMP('2019-01-11 13:13:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=547845 ; -- 2019-01-11T13:13:51.722 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=30,Updated=TO_TIMESTAMP('2019-01-11 13:13:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=550199 ; -- 2019-01-11T13:13:51.735 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=40,Updated=TO_TIMESTAMP('2019-01-11 13:13:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=547855 ; -- 2019-01-11T13:13:51.751 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=50,Updated=TO_TIMESTAMP('2019-01-11 13:13:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=547873 ; -- 2019-01-11T13:13:51.761 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=60,Updated=TO_TIMESTAMP('2019-01-11 13:13:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=547857 ; -- 2019-01-11T13:16:20.432 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=-1.000000000000,Updated=TO_TIMESTAMP('2019-01-11 13:16:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551106 ; -- 2019-01-11T13:16:24.360 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=0,Updated=TO_TIMESTAMP('2019-01-11 13:16:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551115 ; -- 2019-01-11T13:17:08.983 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551115 ; -- 2019-01-11T13:17:10.028 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551509 ; -- 2019-01-11T13:17:10.801 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551892 ; -- 2019-01-11T13:17:11.609 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551891 ; -- 2019-01-11T13:17:12.288 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551890 ; -- 2019-01-11T13:17:13.792 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=553927 ; -- 2019-01-11T13:17:14.717 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556202 ; -- 2019-01-11T13:17:15.396 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=555027 ; -- 2019-01-11T13:17:16.327 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556697 ; -- 2019-01-11T13:17:17.458 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551893 ; -- 2019-01-11T13:17:20.826 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2019-01-11 13:17:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556526 ;
the_stack
DROP DATABASE IF EXISTS test; CREATE DATABASE test; grant all privileges on test.* to 'test'@'%' identified by 'test'; grant all privileges on test.* to 'test'@'localhost' identified by 'test'; CREATE TABLE test.vuln (id INT, name text); INSERT INTO test.vuln values (0, "openrasp"); INSERT INTO test.vuln values (1, "rocks"); -- MySQL dump 10.16 Distrib 10.1.41-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: dvwa -- ------------------------------------------------------ -- Server version 10.1.41-MariaDB-0+deb9u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Current Database: `dvwa` -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ `dvwa` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; grant all on dvwa.* to dvwa@localhost identified by 'SuperSecretPassword99'; flush privileges; USE `dvwa`; -- -- Table structure for table `guestbook` -- DROP TABLE IF EXISTS `guestbook`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `guestbook` ( `comment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `comment` varchar(300) DEFAULT NULL, `name` varchar(100) DEFAULT NULL, PRIMARY KEY (`comment_id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `guestbook` -- LOCK TABLES `guestbook` WRITE; /*!40000 ALTER TABLE `guestbook` DISABLE KEYS */; INSERT INTO `guestbook` VALUES (1,'This is a test comment.','test'); /*!40000 ALTER TABLE `guestbook` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `users` -- DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `users` ( `user_id` int(6) NOT NULL, `first_name` varchar(15) DEFAULT NULL, `last_name` varchar(15) DEFAULT NULL, `user` varchar(15) DEFAULT NULL, `password` varchar(32) DEFAULT NULL, `avatar` varchar(70) DEFAULT NULL, `last_login` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `failed_login` int(3) DEFAULT NULL, PRIMARY KEY (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `users` -- LOCK TABLES `users` WRITE; /*!40000 ALTER TABLE `users` DISABLE KEYS */; INSERT INTO `users` VALUES (1,'admin','admin','admin','5f4dcc3b5aa765d61d8327deb882cf99','http://127.0.0.1/DVWA-1.9/hackable/users/admin.jpg','2019-10-18 04:08:47',0),(2,'Gordon','Brown','gordonb','e99a18c428cb38d5f260853678922e03','http://127.0.0.1/DVWA-1.9/hackable/users/gordonb.jpg','2019-10-18 04:08:47',0),(3,'Hack','Me','1337','8d3533d75ae2c3966d7e0d4fcc69216b','http://127.0.0.1/DVWA-1.9/hackable/users/1337.jpg','2019-10-18 04:08:47',0),(4,'Pablo','Picasso','pablo','0d107d09f5bbe40cade3de5c71e9e9b7','http://127.0.0.1/DVWA-1.9/hackable/users/pablo.jpg','2019-10-18 04:08:47',0),(5,'Bob','Smith','smithy','5f4dcc3b5aa765d61d8327deb882cf99','http://127.0.0.1/DVWA-1.9/hackable/users/smithy.jpg','2019-10-18 04:08:47',0); /*!40000 ALTER TABLE `users` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2019-10-18 4:09:44 -- ======================================================================= -- MySQL dump 10.16 Distrib 10.1.41-MariaDB, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: mutillidae -- ------------------------------------------------------ -- Server version 10.1.41-MariaDB-0+deb9u1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `accounts` -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mutillidae` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; grant all on mutillidae.* to mutillidae@localhost identified by 'mutillidae'; flush privileges; DROP TABLE IF EXISTS `accounts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `accounts` ( `cid` int(11) NOT NULL AUTO_INCREMENT, `username` text, `password` text, `mysignature` text, `is_admin` varchar(5) DEFAULT NULL, `firstname` text, `lastname` text, PRIMARY KEY (`cid`) ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `balloon_tips` -- DROP TABLE IF EXISTS `balloon_tips`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `balloon_tips` ( `tip_key` varchar(64) NOT NULL, `hint_level` int(11) NOT NULL, `tip` text, PRIMARY KEY (`tip_key`,`hint_level`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `blogs_table` -- DROP TABLE IF EXISTS `blogs_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `blogs_table` ( `cid` int(11) NOT NULL AUTO_INCREMENT, `blogger_name` text, `comment` text, `date` datetime DEFAULT NULL, PRIMARY KEY (`cid`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `captured_data` -- DROP TABLE IF EXISTS `captured_data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `captured_data` ( `data_id` int(11) NOT NULL AUTO_INCREMENT, `ip_address` text, `hostname` text, `port` text, `user_agent_string` text, `referrer` text, `data` text, `capture_date` datetime DEFAULT NULL, PRIMARY KEY (`data_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `credit_cards` -- DROP TABLE IF EXISTS `credit_cards`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `credit_cards` ( `ccid` int(11) NOT NULL AUTO_INCREMENT, `ccnumber` text, `ccv` text, `expiration` date DEFAULT NULL, PRIMARY KEY (`ccid`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `help_texts` -- DROP TABLE IF EXISTS `help_texts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `help_texts` ( `help_text_key` int(11) NOT NULL, `help_text` text, PRIMARY KEY (`help_text_key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `hitlog` -- DROP TABLE IF EXISTS `hitlog`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hitlog` ( `cid` int(11) NOT NULL AUTO_INCREMENT, `hostname` text, `ip` text, `browser` text, `referer` text, `date` datetime DEFAULT NULL, PRIMARY KEY (`cid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `level_1_help_include_files` -- DROP TABLE IF EXISTS `level_1_help_include_files`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `level_1_help_include_files` ( `level_1_help_include_file_key` int(11) NOT NULL, `level_1_help_include_file_description` text, `level_1_help_include_file` text, PRIMARY KEY (`level_1_help_include_file_key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `page_help` -- DROP TABLE IF EXISTS `page_help`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `page_help` ( `page_name` varchar(64) NOT NULL, `help_text_key` int(11) NOT NULL, `order_preference` int(11) DEFAULT NULL, PRIMARY KEY (`page_name`,`help_text_key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `page_hints` -- DROP TABLE IF EXISTS `page_hints`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `page_hints` ( `page_name` varchar(64) NOT NULL, `hint_key` int(11) NOT NULL, `hint` text, PRIMARY KEY (`page_name`,`hint_key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `pen_test_tools` -- DROP TABLE IF EXISTS `pen_test_tools`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pen_test_tools` ( `tool_id` int(11) NOT NULL AUTO_INCREMENT, `tool_name` text, `phase_to_use` text, `tool_type` text, `comment` text, PRIMARY KEY (`tool_id`) ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `user_poll_results` -- DROP TABLE IF EXISTS `user_poll_results`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_poll_results` ( `cid` int(11) NOT NULL AUTO_INCREMENT, `tool_name` text, `username` text, `date` datetime DEFAULT NULL, PRIMARY KEY (`cid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `youTubeVideos` -- DROP TABLE IF EXISTS `youTubeVideos`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `youTubeVideos` ( `recordIndetifier` int(11) NOT NULL, `identificationToken` varchar(32) DEFAULT NULL, `title` varchar(128) DEFAULT NULL, PRIMARY KEY (`recordIndetifier`), UNIQUE KEY `identificationToken` (`identificationToken`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2019-10-29 4:34:19
the_stack
CREATE PROCEDURE [dbo].[sp_GenerateTableDDLScript] ( @TableName NVARCHAR(500), @NewTableName SYSNAME = NULL, @Result NVARCHAR(MAX) OUTPUT, @IncludeDefaults BIT = 1, @IncludeCheckConstraints BIT = 1, @IncludeForeignKeys BIT = 1, @IncludeIndexes BIT = 1, @IncludePrimaryKey BIT = 1, @IncludeIdentity BIT = 1, @IncludeUniqueIndexes BIT = 1, @IncludeComputedColumns BIT = 1, @UseSystemDataTypes BIT = 0, @ConstraintsNameAppend SYSNAME = '', @Verbose BIT = 0 ) AS BEGIN SET NOCOUNT ON; DECLARE @MainDefinition TABLE ( FieldValue NVARCHAR(4000) ) DECLARE @TableObjId INT DECLARE @ClusteredPK BIT DECLARE @TableSchema NVARCHAR(255) DECLARE @RCount INT SELECT @TableName = name, @TableObjId = id, @TableSchema = OBJECT_SCHEMA_NAME(id) FROM sysobjects WHERE id = OBJECT_ID(@TableName); IF OBJECT_ID(@TableName) IS NULL OR @TableObjId IS NULL BEGIN RAISERROR(N'Table %s not found within current database!', 16, 1, @TableName); RETURN -1; END SET @NewTableName = ISNULL(@NewTableName, QUOTENAME(DB_NAME(DB_ID())) + '.' + QUOTENAME(@TableSchema) + '.' + @TableName); DECLARE @ShowFields TABLE ( FieldID INT IDENTITY(1,1), DatabaseName SYSNAME, TableOwner SYSNAME, TableName SYSNAME, FieldName SYSNAME, ColumnPosition INT, ColumnDefaultValue NVARCHAR(1000), ColumnDefaultName SYSNAME NULL, IsNullable BIT, DataType SYSNAME, MaxLength INT, NumericPrecision INT, NumericScale INT, DomainName SYSNAME NULL, FieldListingName NVARCHAR(300), FieldDefinition NVARCHAR(4000), IdentityColumn BIT, IdentitySeed INT, IdentityIncrement INT, IsCharColumn BIT ) DECLARE @HoldingArea TABLE ( FldID SMALLINT IDENTITY(1,1), Flds VARCHAR(4000), FldValue CHAR(1) DEFAULT(0) ) DECLARE @PKObjectID TABLE ( ObjectID INT ) DECLARE @Uniques TABLE ( ObjectID INT ) DECLARE @HoldingAreaValues TABLE ( FldID SMALLINT IDENTITY(1,1), Flds VARCHAR(4000), FldValue CHAR(1) DEFAULT(0) ) DECLARE @Definition TABLE ( DefinitionID SMALLINT IDENTITY(1,1), FieldValue NVARCHAR(4000) ) INSERT INTO @ShowFields ( DatabaseName, TableOwner, TableName, FieldName, ColumnPosition, ColumnDefaultValue, ColumnDefaultName, IsNullable, DataType, MaxLength, NumericPrecision, NumericScale, DomainName, FieldListingName, FieldDefinition, IdentityColumn, IdentitySeed, IdentityIncrement, IsCharColumn ) SELECT DB_NAME(), TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, CAST(ORDINAL_POSITION AS INT), COLUMN_DEFAULT, dobj.name AS ColumnDefaultName, CASE WHEN c.IS_NULLABLE = 'YES' THEN 1 ELSE 0 END, DATA_TYPE, CAST(CHARACTER_MAXIMUM_LENGTH AS INT), CAST(NUMERIC_PRECISION AS INT), CAST(NUMERIC_SCALE AS INT), DOMAIN_NAME, QUOTENAME(COLUMN_NAME) + ',', comp.definition + CASE WHEN comp.is_persisted = 1 THEN ' PERSISTED' ELSE '' END AS FieldDefinition, CASE WHEN ic.object_id IS NULL THEN 0 ELSE 1 END AS IdentityColumn, CAST(ISNULL(ic.seed_value,0) AS INT) AS IdentitySeed, CAST(ISNULL(ic.increment_value,0) AS INT) AS IdentityIncrement, CASE WHEN st.collation_name IS NOT NULL THEN 1 ELSE 0 END AS IsCharColumn FROM INFORMATION_SCHEMA.COLUMNS c JOIN sys.columns sc ON c.TABLE_NAME = OBJECT_NAME(sc.object_id) AND c.COLUMN_NAME = sc.Name LEFT JOIN sys.identity_columns ic ON c.TABLE_NAME = OBJECT_NAME(ic.object_id) AND c.COLUMN_NAME = ic.Name JOIN sys.types st ON COALESCE(c.DOMAIN_NAME,c.DATA_TYPE) = st.name LEFT OUTER JOIN sys.objects dobj ON dobj.object_id = sc.default_object_id AND dobj.type = 'D' LEFT OUTER JOIN [sys].[computed_columns] comp ON comp.object_id = sc.object_id AND sc.column_id = comp.column_id WHERE sc.object_id = @TableObjId AND (comp.definition IS NULL OR @IncludeComputedColumns = 1) ORDER BY c.TABLE_NAME, c.ORDINAL_POSITION SET @RCount = @@ROWCOUNT IF @Verbose = 1 RAISERROR(N'Found %d fields',0,1,@RCount) WITH NOWAIT; IF @Verbose = 1 SELECT * FROM @ShowFields; INSERT INTO @HoldingArea (Flds) VALUES('(') INSERT INTO @Definition(FieldValue) VALUES('CREATE TABLE ' + @NewTableName) INSERT INTO @Definition(FieldValue) VALUES('(') INSERT INTO @Definition(FieldValue) SELECT CHAR(10) + QUOTENAME(FieldName) + ' ' + CASE WHEN FieldDefinition IS NOT NULL THEN 'AS ' + FieldDefinition WHEN DomainName IS NOT NULL AND @UseSystemDataTypes = 0 THEN QUOTENAME(DomainName) + CASE WHEN IsNullable = 1 THEN ' NULL ' ELSE ' NOT NULL ' END ELSE QUOTENAME(UPPER(DataType)) + CASE WHEN IsCharColumn = 1 THEN '(' + ISNULL(NULLIF(CAST(MaxLength AS VARCHAR(10)),'-1'),'MAX') + ')' ELSE '' END + CASE WHEN @IncludeIdentity = 1 AND IdentityColumn = 1 THEN ' IDENTITY(' + CAST(IdentitySeed AS VARCHAR(5))+ ',' + CAST(IdentityIncrement AS VARCHAR(5)) + ')' ELSE '' END + CASE WHEN IsNullable = 1 THEN ' NULL ' ELSE ' NOT NULL ' END + CASE WHEN ColumnDefaultName IS NOT NULL AND @IncludeDefaults = 1 THEN ' CONSTRAINT ' + QUOTENAME(ColumnDefaultName + @ConstraintsNameAppend) + ' DEFAULT' + UPPER(ColumnDefaultValue) ELSE '' END END + CASE WHEN FieldID = (SELECT MAX(FieldID) FROM @ShowFields) THEN '' ELSE ',' END FROM @ShowFields INSERT INTO @Definition(FieldValue) SELECT ', CONSTRAINT ' + QUOTENAME(name + @ConstraintsNameAppend) + ' FOREIGN KEY (' + ParentColumns + ') REFERENCES ' + ReferencedObject + '(' + ReferencedColumns + ')' FROM ( SELECT ReferencedObject = QUOTENAME(OBJECT_SCHEMA_NAME(fk.referenced_object_id)) + '.' + QUOTENAME(OBJECT_NAME(fk.referenced_object_id)), ParentObject = QUOTENAME(OBJECT_SCHEMA_NAME(parent_object_id)) + '.' + QUOTENAME(OBJECT_NAME(parent_object_id)), fk.name, REVERSE(SUBSTRING(REVERSE(( SELECT QUOTENAME(cp.name) + ',' FROM sys.foreign_key_columns fkc JOIN sys.columns cp ON fkc.parent_object_id = cp.object_id AND fkc.parent_column_id = cp.column_id WHERE fkc.constraint_object_id = fk.object_id AND cp.name IN (SELECT FieldName FROM @ShowFields) FOR XML PATH('') )), 2, 8000)) ParentColumns, REVERSE(SUBSTRING(REVERSE(( SELECT cr.name + ',' FROM sys.foreign_key_columns fkc JOIN sys.columns cr ON fkc.referenced_object_id = cr.object_id AND fkc.referenced_column_id = cr.column_id WHERE fkc.constraint_object_id = fk.object_id AND cr.name IN (SELECT FieldName FROM @ShowFields) FOR XML PATH('') )), 2, 8000)) ReferencedColumns FROM sys.foreign_keys fk WHERE fk.parent_object_id = @TableObjId AND @IncludeForeignKeys = 1 ) a SET @RCount = @@ROWCOUNT IF @Verbose = 1 RAISERROR(N'Found %d foreign keys',0,1,@RCount) WITH NOWAIT; INSERT INTO @Definition(FieldValue) SELECT CHAR(10) + ', CONSTRAINT ' + QUOTENAME(name + @ConstraintsNameAppend) + ' CHECK ' + definition FROM sys.check_constraints WHERE parent_object_id = @TableObjId AND @IncludeCheckConstraints = 1 SET @RCount = @@ROWCOUNT IF @Verbose = 1 RAISERROR(N'Found %d check constraints',0,1,@RCount) WITH NOWAIT; INSERT INTO @PKObjectID(ObjectID) SELECT DISTINCT PKObject = cco.object_id FROM sys.key_constraints cco JOIN sys.index_columns cc ON cco.parent_object_id = cc.object_id AND cco.unique_index_id = cc.index_id JOIN sys.indexes i ON cc.object_id = i.object_id AND cc.index_id = i.index_id WHERE parent_object_id = @TableObjId AND i.type = 1 AND is_primary_key = 1 AND @IncludePrimaryKey = 1 SET @RCount = @@ROWCOUNT IF @Verbose = 1 RAISERROR(N'Found %d primary key',0,1,@RCount) WITH NOWAIT; INSERT INTO @Uniques(ObjectID) SELECT DISTINCT PKObject = cco.object_id FROM sys.key_constraints cco JOIN sys.index_columns cc ON cco.parent_object_id = cc.object_id AND cco.unique_index_id = cc.index_id JOIN sys.indexes i ON cc.object_id = i.object_id AND cc.index_id = i.index_id WHERE parent_object_id = @TableObjId AND i.type = 2 AND is_primary_key = 0 AND is_unique_constraint = 1 AND @IncludeUniqueIndexes = 1 SET @RCount = @@ROWCOUNT IF @Verbose = 1 RAISERROR(N'Found %d unique indexes',0,1,@RCount) WITH NOWAIT; SET @ClusteredPK = CASE WHEN @RCount > 0 THEN 1 ELSE 0 END INSERT INTO @Definition(FieldValue) SELECT CHAR(10) + ', CONSTRAINT ' + QUOTENAME(name + @ConstraintsNameAppend) + CASE type WHEN 'PK' THEN ' PRIMARY KEY ' + CASE WHEN pk.ObjectID IS NULL THEN ' NONCLUSTERED ' ELSE ' CLUSTERED ' END WHEN 'UQ' THEN ' UNIQUE ' END + CASE WHEN u.ObjectID IS NOT NULL THEN ' NONCLUSTERED ' ELSE '' END + '(' + REVERSE(SUBSTRING(REVERSE(( SELECT QUOTENAME(c.name) + CASE WHEN cc.is_descending_key = 1 THEN ' DESC' ELSE ' ASC' END + ',' FROM sys.key_constraints ccok INNER JOIN sys.index_columns cc ON ccok.parent_object_id = cc.object_id AND cco.unique_index_id = cc.index_id INNER JOIN sys.columns c ON cc.object_id = c.object_id AND cc.column_id = c.column_id AND c.name IN (SELECT FieldName FROM @ShowFields) INNER JOIN sys.indexes i ON cc.object_id = i.object_id AND cc.index_id = i.index_id WHERE i.object_id = ccok.parent_object_id AND ccok.object_id = cco.object_id FOR XML PATH('') )), 2, 8000)) + ')' FROM sys.key_constraints cco LEFT JOIN @PKObjectID pk ON cco.object_id = pk.ObjectID LEFT JOIN @Uniques u ON cco.object_id = u.objectID WHERE cco.parent_object_id = @TableObjId AND (@IncludePrimaryKey = 1 OR @IncludeUniqueIndexes = 1) IF @IncludeIndexes = 1 BEGIN INSERT INTO @Definition(FieldValue) SELECT CHAR(10) + ', INDEX ' + QUOTENAME([name]) COLLATE SQL_Latin1_General_CP1_CI_AS + ' ' + type_desc + ' (' + REVERSE(SUBSTRING(REVERSE(( SELECT QUOTENAME(name) + CASE WHEN sc.is_descending_key = 1 THEN ' DESC' ELSE ' ASC' END + ',' FROM sys.index_columns sc JOIN sys.columns c ON sc.object_id = c.object_id AND sc.column_id = c.column_id WHERE sc.object_id = @TableObjId AND sc.object_id = i.object_id AND sc.index_id = i.index_id AND c.name IN (SELECT FieldName FROM @ShowFields) ORDER BY index_column_id ASC FOR XML PATH('') )), 2, 8000)) + ')' FROM sys.indexes i WHERE object_id = @TableObjId AND CASE WHEN @ClusteredPK = 1 AND is_primary_key = 1 AND type = 1 THEN 0 ELSE 1 END = 1 AND is_unique_constraint = 0 AND is_primary_key = 0 SET @RCount = @@ROWCOUNT IF @Verbose = 1 RAISERROR(N'Found %d indexes',0,1,@RCount) WITH NOWAIT; END INSERT INTO @Definition(FieldValue) VALUES(CHAR(10) + ')') INSERT INTO @MainDefinition(FieldValue) SELECT FieldValue FROM @Definition ORDER BY DefinitionID ASC SET @RCount = @@ROWCOUNT IF @Verbose = 1 RAISERROR(N'Collected %d rows for main definition',0,1,@RCount) WITH NOWAIT; SET @Result = N''; SELECT @Result = @Result + CHAR(13) + FieldValue FROM @MainDefinition WHERE FieldValue IS NOT NULL; END GO
the_stack
-- 2018-10-03T11:03:18.344 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,AllowProcessReRun,Classname,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsApplySecuritySettings,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsReport,IsServerProcess,IsUseBPartnerLanguage,LockWaitTimeout,Name,RefreshAllAfterExecution,ShowHelp,Type,Updated,UpdatedBy,Value) VALUES ('3',0,0,541011,'N','de.metas.ui.web.globalaction.process.GlobalActionReadProcess','N',TO_TIMESTAMP('2018-10-03 11:03:17','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.ui.web','Y','N','N','N','N','N','N','Y',0,'Run QR Code Action','N','Y','Java',TO_TIMESTAMP('2018-10-03 11:03:17','YYYY-MM-DD HH24:MI:SS'),100,'GlobalActionReadProcess') ; -- 2018-10-03T11:03:18.426 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=541011 AND NOT EXISTS (SELECT 1 FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) ; -- 2018-10-03T11:05:00.181 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Created,CreatedBy,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('P',0,541142,0,541011,TO_TIMESTAMP('2018-10-03 11:05:00','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.ui.web','GlobalActionReadProcess','Y','N','N','N','N','Run QR Code Action',TO_TIMESTAMP('2018-10-03 11:05:00','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-10-03T11:05:00.214 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=541142 AND NOT EXISTS (SELECT 1 FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) ; -- 2018-10-03T11:05:00.278 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', now(), 100, now(), 100,t.AD_Tree_ID, 541142, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.AD_Table_ID=116 AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=541142) ; -- 2018-10-03T11:05:01.145 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=334 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.157 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=498 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.161 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=224 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.164 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=514 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.166 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=336 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.169 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=341 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.171 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=170 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.174 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=465 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.177 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=101 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.181 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=294 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.183 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=395 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.186 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=296 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.188 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=221 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.191 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=541069 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.194 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=233 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.196 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=290 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.200 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=109 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.203 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=540375 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.206 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=50008 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:01.209 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=541142 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.340 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=541142 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.344 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=541134 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.347 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=541111 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.349 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=540969 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.352 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=540892 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.354 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=540914 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.357 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=540915 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.360 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=150 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.363 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=147 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.366 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=145 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.368 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=144 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.370 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=540743 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.373 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=540784 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.375 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=540826 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.378 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=540898 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.381 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=540895 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.384 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=540827 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.386 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=540828 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.390 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=540849 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.393 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=540911 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.395 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=20, Updated=now(), UpdatedBy=100 WHERE Node_ID=540912 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.398 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=21, Updated=now(), UpdatedBy=100 WHERE Node_ID=540913 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.400 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=22, Updated=now(), UpdatedBy=100 WHERE Node_ID=540894 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.403 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=23, Updated=now(), UpdatedBy=100 WHERE Node_ID=540917 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.406 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=24, Updated=now(), UpdatedBy=100 WHERE Node_ID=540982 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.409 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=25, Updated=now(), UpdatedBy=100 WHERE Node_ID=540919 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.411 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=26, Updated=now(), UpdatedBy=100 WHERE Node_ID=540983 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.414 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=27, Updated=now(), UpdatedBy=100 WHERE Node_ID=541080 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.416 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=28, Updated=now(), UpdatedBy=100 WHERE Node_ID=363 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.419 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=29, Updated=now(), UpdatedBy=100 WHERE Node_ID=541079 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.422 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=30, Updated=now(), UpdatedBy=100 WHERE Node_ID=541108 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.424 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=31, Updated=now(), UpdatedBy=100 WHERE Node_ID=541053 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.427 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=32, Updated=now(), UpdatedBy=100 WHERE Node_ID=541052 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.429 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=33, Updated=now(), UpdatedBy=100 WHERE Node_ID=541041 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.432 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=34, Updated=now(), UpdatedBy=100 WHERE Node_ID=541104 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.434 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=35, Updated=now(), UpdatedBy=100 WHERE Node_ID=541109 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.436 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=36, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000099 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.439 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=37, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000100 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.442 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=38, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000101 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:17.444 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=39, Updated=now(), UpdatedBy=100 WHERE Node_ID=540901 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.304 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=541134 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.306 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=541111 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.307 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=540969 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.309 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=541142 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.310 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=540892 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.310 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=540914 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.311 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=540915 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.312 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=150 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.313 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=147 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.314 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=145 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.315 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=144 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.316 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=540743 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.317 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=540784 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.319 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=540826 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.320 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=540898 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.321 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=540895 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.322 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=540827 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.324 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=540828 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.325 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=540849 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.327 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=540911 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.327 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=20, Updated=now(), UpdatedBy=100 WHERE Node_ID=540912 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.328 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=21, Updated=now(), UpdatedBy=100 WHERE Node_ID=540913 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.329 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=22, Updated=now(), UpdatedBy=100 WHERE Node_ID=540894 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.331 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=23, Updated=now(), UpdatedBy=100 WHERE Node_ID=540917 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.332 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=24, Updated=now(), UpdatedBy=100 WHERE Node_ID=540982 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.333 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=25, Updated=now(), UpdatedBy=100 WHERE Node_ID=540919 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.334 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=26, Updated=now(), UpdatedBy=100 WHERE Node_ID=540983 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.335 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=27, Updated=now(), UpdatedBy=100 WHERE Node_ID=541080 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.336 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=28, Updated=now(), UpdatedBy=100 WHERE Node_ID=363 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.337 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=29, Updated=now(), UpdatedBy=100 WHERE Node_ID=541079 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.338 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=30, Updated=now(), UpdatedBy=100 WHERE Node_ID=541108 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.339 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=31, Updated=now(), UpdatedBy=100 WHERE Node_ID=541053 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.340 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=32, Updated=now(), UpdatedBy=100 WHERE Node_ID=541052 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.341 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=33, Updated=now(), UpdatedBy=100 WHERE Node_ID=541041 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.342 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=34, Updated=now(), UpdatedBy=100 WHERE Node_ID=541104 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.344 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=35, Updated=now(), UpdatedBy=100 WHERE Node_ID=541109 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.345 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=36, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000099 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.346 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=37, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000100 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.347 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=38, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000101 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:22.348 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=39, Updated=now(), UpdatedBy=100 WHERE Node_ID=540901 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.412 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=541134 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.415 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=541111 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.418 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=541142 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.422 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=540892 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.425 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=540969 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.442 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=540914 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.446 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=540915 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.451 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=150 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.455 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=147 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.458 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=145 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.460 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=144 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.463 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=540743 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.466 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=540784 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.469 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=540826 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.472 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=540898 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.475 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=540895 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.478 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=540827 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.481 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=540828 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.484 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=540849 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.488 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=540911 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.491 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=20, Updated=now(), UpdatedBy=100 WHERE Node_ID=540912 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.495 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=21, Updated=now(), UpdatedBy=100 WHERE Node_ID=540913 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.498 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=22, Updated=now(), UpdatedBy=100 WHERE Node_ID=540894 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.501 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=23, Updated=now(), UpdatedBy=100 WHERE Node_ID=540917 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.503 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=24, Updated=now(), UpdatedBy=100 WHERE Node_ID=540982 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.505 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=25, Updated=now(), UpdatedBy=100 WHERE Node_ID=540919 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.507 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=26, Updated=now(), UpdatedBy=100 WHERE Node_ID=540983 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.509 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=27, Updated=now(), UpdatedBy=100 WHERE Node_ID=541080 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.510 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=28, Updated=now(), UpdatedBy=100 WHERE Node_ID=363 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.512 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=29, Updated=now(), UpdatedBy=100 WHERE Node_ID=541079 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.513 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=30, Updated=now(), UpdatedBy=100 WHERE Node_ID=541108 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.515 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=31, Updated=now(), UpdatedBy=100 WHERE Node_ID=541053 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.516 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=32, Updated=now(), UpdatedBy=100 WHERE Node_ID=541052 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.517 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=33, Updated=now(), UpdatedBy=100 WHERE Node_ID=541041 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.518 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=34, Updated=now(), UpdatedBy=100 WHERE Node_ID=541104 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.519 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=35, Updated=now(), UpdatedBy=100 WHERE Node_ID=541109 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.520 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=36, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000099 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.522 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=37, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000100 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.522 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=38, Updated=now(), UpdatedBy=100 WHERE Node_ID=1000101 AND AD_Tree_ID=10 ; -- 2018-10-03T11:05:26.523 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=1000098, SeqNo=39, Updated=now(), UpdatedBy=100 WHERE Node_ID=540901 AND AD_Tree_ID=10 ;
the_stack
-- 2020-11-16T12:33:07.423Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO EXP_FormatLine (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,EntityType,EXP_Format_ID,EXP_FormatLine_ID,IsActive,IsMandatory,Name,Position,Type,Updated,UpdatedBy,Value) VALUES (0,572164,0,TO_TIMESTAMP('2020-11-16 13:33:07','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.esb.edi',540417,550317,'N','N','LU Gebinde-GTIN',270,'E',TO_TIMESTAMP('2020-11-16 13:33:07','YYYY-MM-DD HH24:MI:SS'),100,'GTIN_LU_PackingMaterial') ; -- 2020-11-16T12:33:07.517Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO EXP_FormatLine (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,EntityType,EXP_Format_ID,EXP_FormatLine_ID,IsActive,IsMandatory,Name,Position,Type,Updated,UpdatedBy,Value) VALUES (0,572165,0,TO_TIMESTAMP('2020-11-16 13:33:07','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.esb.edi',540417,550318,'N','N','TU Gebinde-GTIN',280,'E',TO_TIMESTAMP('2020-11-16 13:33:07','YYYY-MM-DD HH24:MI:SS'),100,'GTIN_TU_PackingMaterial') ; -- 2020-11-16T12:33:22.443Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE EXP_FormatLine SET IsActive='Y',Updated=TO_TIMESTAMP('2020-11-16 13:33:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE EXP_FormatLine_ID=550318 ; -- 2020-11-16T12:33:26.287Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE EXP_FormatLine SET IsActive='Y',Updated=TO_TIMESTAMP('2020-11-16 13:33:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE EXP_FormatLine_ID=550317 ; -- 2020-11-16T13:18:00.193Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FacetFilterSeqNo,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutoApplyValidationRule,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsFacetFilter,IsForceIncludeInGeneratedModel,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsRangeFilter,IsSelectionColumn,IsShowFilterIncrementButtons,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,MaxFacetsToFetch,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,572166,577135,0,10,632,'GTIN',TO_TIMESTAMP('2020-11-16 14:18:00','YYYY-MM-DD HH24:MI:SS'),100,'N','D',0,50,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N',0,'GTIN',0,0,TO_TIMESTAMP('2020-11-16 14:18:00','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-11-16T13:18:00.196Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Column_ID=572166 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-11-16T13:18:00.199Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(577135) ; -- 2020-11-16T13:18:10.806Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('C_BPartner_Product','ALTER TABLE public.C_BPartner_Product ADD COLUMN GTIN VARCHAR(50)') ; -- 2020-11-16T13:18:50.279Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,572166,625825,0,562,0,TO_TIMESTAMP('2020-11-16 14:18:50','YYYY-MM-DD HH24:MI:SS'),100,0,'D',0,'Y','Y','Y','N','N','N','N','N','GTIN',280,240,0,1,1,TO_TIMESTAMP('2020-11-16 14:18:50','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-11-16T13:18:50.280Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y') AND t.AD_Field_ID=625825 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2020-11-16T13:18:50.283Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_FieldTranslation_From_AD_Name_Element(577135) ; -- 2020-11-16T13:18:50.289Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Element_Link WHERE AD_Field_ID=625825 ; -- 2020-11-16T13:18:50.291Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select AD_Element_Link_Create_Missing_Field(625825) ; -- 2020-11-16T13:19:46.868Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsAllowFiltering,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,IsMultiLine,MultiLine_LinesCount,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,625825,0,562,1000021,575093,'F',TO_TIMESTAMP('2020-11-16 14:19:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','N','N',0,'GTIN',53,0,0,TO_TIMESTAMP('2020-11-16 14:19:46','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-11-16T13:20:05.394Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2020-11-16 14:20:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=1000150 ; -- 2020-11-16T13:20:05.398Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2020-11-16 14:20:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=575093 ; -- 2020-11-16T14:01:22.086Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', IsTranslated='Y',Updated=TO_TIMESTAMP('2020-11-16 15:01:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578548 AND AD_Language='de_CH' ; -- 2020-11-16T14:01:22.091Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578548,'de_CH') ; -- 2020-11-16T14:01:38.840Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', IsTranslated='Y',Updated=TO_TIMESTAMP('2020-11-16 15:01:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578548 AND AD_Language='de_DE' ; -- 2020-11-16T14:01:38.841Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578548,'de_DE') ; -- 2020-11-16T14:01:38.849Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(578548,'de_DE') ; -- 2020-11-16T14:01:38.851Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='GTIN_LU_PackingMaterial', Name='LU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL WHERE AD_Element_ID=578548 ; -- 2020-11-16T14:01:38.853Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='GTIN_LU_PackingMaterial', Name='LU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL, AD_Element_ID=578548 WHERE UPPER(ColumnName)='GTIN_LU_PACKINGMATERIAL' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-11-16T14:01:38.859Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='GTIN_LU_PackingMaterial', Name='LU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL WHERE AD_Element_ID=578548 AND IsCentrallyMaintained='Y' ; -- 2020-11-16T14:01:38.861Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='LU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=578548) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 578548) ; -- 2020-11-16T14:01:38.938Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='LU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 578548 ; -- 2020-11-16T14:01:38.941Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='LU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL WHERE AD_Element_ID = 578548 ; -- 2020-11-16T14:01:38.943Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'LU Gebinde-GTIN', Description = 'GTIN des verwendeten Gebindes, z.B. Palette. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 578548 ; -- 2020-11-16T14:01:56.179Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='LU Packaging-GTIN', PrintName='LU Packaging-GTIN',Updated=TO_TIMESTAMP('2020-11-16 15:01:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578548 AND AD_Language='en_US' ; -- 2020-11-16T14:01:56.180Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578548,'en_US') ; -- 2020-11-16T14:02:23.532Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', IsTranslated='Y',Updated=TO_TIMESTAMP('2020-11-16 15:02:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578547 AND AD_Language='de_CH' ; -- 2020-11-16T14:02:23.533Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578547,'de_CH') ; -- 2020-11-16T14:02:30.444Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET Description='GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', IsTranslated='Y',Updated=TO_TIMESTAMP('2020-11-16 15:02:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578547 AND AD_Language='de_DE' ; -- 2020-11-16T14:02:30.446Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578547,'de_DE') ; -- 2020-11-16T14:02:30.456Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_ad_element_on_ad_element_trl_update(578547,'de_DE') ; -- 2020-11-16T14:02:30.458Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='GTIN_TU_PackingMaterial', Name='TU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL WHERE AD_Element_ID=578547 ; -- 2020-11-16T14:02:30.459Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='GTIN_TU_PackingMaterial', Name='TU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL, AD_Element_ID=578547 WHERE UPPER(ColumnName)='GTIN_TU_PACKINGMATERIAL' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2020-11-16T14:02:30.460Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='GTIN_TU_PackingMaterial', Name='TU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL WHERE AD_Element_ID=578547 AND IsCentrallyMaintained='Y' ; -- 2020-11-16T14:02:30.461Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='TU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL WHERE (AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=578547) AND AD_Name_ID IS NULL ) OR (AD_Name_ID = 578547) ; -- 2020-11-16T14:02:30.471Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab SET Name='TU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL, CommitWarning = NULL WHERE AD_Element_ID = 578547 ; -- 2020-11-16T14:02:30.474Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_WINDOW SET Name='TU Gebinde-GTIN', Description='GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', Help=NULL WHERE AD_Element_ID = 578547 ; -- 2020-11-16T14:02:30.475Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Name = 'TU Gebinde-GTIN', Description = 'GTIN des verwendeten Gebindes, z.B. Karton. Wird automatisch über die Packvorschrift aus den Produkt-Stammdaten zum jeweiligen Lieferempfänger ermittelt.', WEBUI_NameBrowse = NULL, WEBUI_NameNew = NULL, WEBUI_NameNewBreadcrumb = NULL WHERE AD_Element_ID = 578547 ; -- 2020-11-16T14:02:44.577Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='Y', Name='TU packaging-GTIN', PrintName='TU packaging-GTIN',Updated=TO_TIMESTAMP('2020-11-16 15:02:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=578547 AND AD_Language='en_US' ; -- 2020-11-16T14:02:44.579Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(578547,'en_US') ; -- 2020-11-16T14:04:00.470Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO t_alter_column values('c_bpartner_product','GTIN','VARCHAR(50)',null,null) ;
the_stack
-- start query 1 in stream 0 using template query96.tpl select count(*) from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.household_demographics ,tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 8 and time_dim.t_minute >= 30 and household_demographics.hd_dep_count = 5 and store.s_store_name = 'ese' order by count(*) limit 100; -- end query 1 in stream 0 using template query96.tpl -- start query 2 in stream 0 using template query7.tpl select i_item_id, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.customer_demographics, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.item, tpcds_2t_baseline.promotion where ss_sold_date_sk = d_date_sk and ss_item_sk = i_item_sk and ss_cdemo_sk = cd_demo_sk and ss_promo_sk = p_promo_sk and cd_gender = 'M' and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 2001 group by i_item_id order by i_item_id limit 100; -- end query 2 in stream 0 using template query7.tpl -- start query 3 in stream 0 using template query75.tpl WITH all_sales AS ( SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,SUM(sales_cnt) AS sales_cnt ,SUM(sales_amt) AS sales_amt FROM (SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,cs_quantity - COALESCE(cr_return_quantity,0) AS sales_cnt ,cs_ext_sales_price - COALESCE(cr_return_amount,0.0) AS sales_amt FROM tpcds_2t_baseline.catalog_sales JOIN tpcds_2t_baseline.item ON i_item_sk=cs_item_sk JOIN tpcds_2t_baseline.date_dim ON d_date_sk=cs_sold_date_sk LEFT JOIN tpcds_2t_baseline.catalog_returns ON (cs_order_number=cr_order_number AND cs_item_sk=cr_item_sk) WHERE i_category='Shoes' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ss_quantity - COALESCE(sr_return_quantity,0) AS sales_cnt ,ss_ext_sales_price - COALESCE(sr_return_amt,0.0) AS sales_amt FROM tpcds_2t_baseline.store_sales JOIN tpcds_2t_baseline.item ON i_item_sk=ss_item_sk JOIN tpcds_2t_baseline.date_dim ON d_date_sk=ss_sold_date_sk LEFT JOIN tpcds_2t_baseline.store_returns ON (ss_ticket_number=sr_ticket_number AND ss_item_sk=sr_item_sk) WHERE i_category='Shoes' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ws_quantity - COALESCE(wr_return_quantity,0) AS sales_cnt ,ws_ext_sales_price - COALESCE(wr_return_amt,0.0) AS sales_amt FROM tpcds_2t_baseline.web_sales JOIN tpcds_2t_baseline.item ON i_item_sk=ws_item_sk JOIN tpcds_2t_baseline.date_dim ON d_date_sk=ws_sold_date_sk LEFT JOIN tpcds_2t_baseline.web_returns ON (ws_order_number=wr_order_number AND ws_item_sk=wr_item_sk) WHERE i_category='Shoes') sales_detail GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id) SELECT prev_yr.d_year AS prev_year ,curr_yr.d_year AS year ,curr_yr.i_brand_id ,curr_yr.i_class_id ,curr_yr.i_category_id ,curr_yr.i_manufact_id ,prev_yr.sales_cnt AS prev_yr_cnt ,curr_yr.sales_cnt AS curr_yr_cnt ,curr_yr.sales_cnt-prev_yr.sales_cnt AS sales_cnt_diff ,curr_yr.sales_amt-prev_yr.sales_amt AS sales_amt_diff FROM all_sales curr_yr, all_sales prev_yr WHERE curr_yr.i_brand_id=prev_yr.i_brand_id AND curr_yr.i_class_id=prev_yr.i_class_id AND curr_yr.i_category_id=prev_yr.i_category_id AND curr_yr.i_manufact_id=prev_yr.i_manufact_id AND curr_yr.d_year=2000 AND prev_yr.d_year=2000-1 AND CAST(curr_yr.sales_cnt AS NUMERIC)/CAST(prev_yr.sales_cnt AS NUMERIC)<0.9 ORDER BY sales_cnt_diff,sales_amt_diff limit 100; -- end query 3 in stream 0 using template query75.tpl -- start query 4 in stream 0 using template query44.tpl select asceding.rnk, i1.i_product_name best_performing, i2.i_product_name worst_performing from(select * from (select item_sk,rank() over (order by rank_col asc) rnk from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col from tpcds_2t_baseline.store_sales ss1 where ss_store_sk = 20 group by ss_item_sk having avg(ss_net_profit) > 0.9*(select avg(ss_net_profit) rank_col from tpcds_2t_baseline.store_sales where ss_store_sk = 20 and ss_hdemo_sk is null group by ss_store_sk))V1)V11 where rnk < 11) asceding, (select * from (select item_sk,rank() over (order by rank_col desc) rnk from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col from tpcds_2t_baseline.store_sales ss1 where ss_store_sk = 20 group by ss_item_sk having avg(ss_net_profit) > 0.9*(select avg(ss_net_profit) rank_col from tpcds_2t_baseline.store_sales where ss_store_sk = 20 and ss_hdemo_sk is null group by ss_store_sk))V2)V21 where rnk < 11) descending, tpcds_2t_baseline.item i1, tpcds_2t_baseline.item i2 where asceding.rnk = descending.rnk and i1.i_item_sk=asceding.item_sk and i2.i_item_sk=descending.item_sk order by asceding.rnk limit 100; -- end query 4 in stream 0 using template query44.tpl -- start query 5 in stream 0 using template query39.tpl with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from tpcds_2t_baseline.inventory ,tpcds_2t_baseline.item ,tpcds_2t_baseline.warehouse ,tpcds_2t_baseline.date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =2001 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk as inv1_w_warehouse_sk,inv1.i_item_sk as inv1_i_item_sk, inv1.d_moy as inv1_d_moy, inv1.mean as inv1_mean, inv1.cov as inv1_cov ,inv2.w_warehouse_sk as inv2_w_warehouse_sk,inv2.i_item_sk as inv2_i_item_sk, inv2.d_moy as inv2_d_moy,inv2.mean as inv2_mean, inv2.cov as inv2_cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=1 and inv2.d_moy=1+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov ; -- end query 5 in stream 0 using template query39.tpl -- start query 6 in stream 0 using template query80.tpl with ssr as (select s_store_id as store_id, sum(ss_ext_sales_price) as sales, sum(coalesce(sr_return_amt, 0)) as returns, sum(ss_net_profit - coalesce(sr_net_loss, 0)) as profit from tpcds_2t_baseline.store_sales left outer join tpcds_2t_baseline.store_returns on (ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number), tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store, tpcds_2t_baseline.item, tpcds_2t_baseline.promotion where ss_sold_date_sk = d_date_sk and d_date between date(2002, 08, 04) and date_add(date '2002-08-04', interval 30 day) and ss_store_sk = s_store_sk and ss_item_sk = i_item_sk and i_current_price > 50 and ss_promo_sk = p_promo_sk and p_channel_tv = 'N' group by s_store_id) , csr as (select cp_catalog_page_id as catalog_page_id, sum(cs_ext_sales_price) as sales, sum(coalesce(cr_return_amount, 0)) as returns, sum(cs_net_profit - coalesce(cr_net_loss, 0)) as profit from tpcds_2t_baseline.catalog_sales left outer join tpcds_2t_baseline.catalog_returns on (cs_item_sk = cr_item_sk and cs_order_number = cr_order_number), tpcds_2t_baseline.date_dim, tpcds_2t_baseline.catalog_page, tpcds_2t_baseline.item, tpcds_2t_baseline.promotion where cs_sold_date_sk = d_date_sk and d_date between date(2002, 08, 04) and date_add(date '2002-08-04', interval 30 day) and cs_catalog_page_sk = cp_catalog_page_sk and cs_item_sk = i_item_sk and i_current_price > 50 and cs_promo_sk = p_promo_sk and p_channel_tv = 'N' group by cp_catalog_page_id) , wsr as (select web_site_id, sum(ws_ext_sales_price) as sales, sum(coalesce(wr_return_amt, 0)) as returns, sum(ws_net_profit - coalesce(wr_net_loss, 0)) as profit from tpcds_2t_baseline.web_sales left outer join tpcds_2t_baseline.web_returns on (ws_item_sk = wr_item_sk and ws_order_number = wr_order_number), tpcds_2t_baseline.date_dim, tpcds_2t_baseline.web_site, tpcds_2t_baseline.item, tpcds_2t_baseline.promotion where ws_sold_date_sk = d_date_sk and d_date between date(2002, 08, 04) and date_add(date '2002-08-04', interval 30 day) and ws_web_site_sk = web_site_sk and ws_item_sk = i_item_sk and i_current_price > 50 and ws_promo_sk = p_promo_sk and p_channel_tv = 'N' group by web_site_id) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , concat('store', store_id) as id , sales , returns , profit from ssr union all select 'catalog channel' as channel , concat('catalog_page', catalog_page_id) as id , sales , returns , profit from csr union all select 'web channel' as channel , concat('web_site', web_site_id) as id , sales , returns , profit from wsr ) x group by rollup (channel, id) order by channel ,id limit 100; -- end query 6 in stream 0 using template query80.tpl -- start query 7 in stream 0 using template query32.tpl select sum(cs_ext_discount_amt) as excess_discount_amount from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where i_manufact_id = 283 and i_item_sk = cs_item_sk and d_date between date(1999, 02, 22) and date_add(DATE '1999-02-22', interval 90 day) and d_date_sk = cs_sold_date_sk and cs_ext_discount_amt > ( select 1.3 * avg(cs_ext_discount_amt) from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.date_dim where cs_item_sk = i_item_sk and d_date between date(1999, 02, 22) and date_add(DATE '1999-02-22', interval 90 day) and d_date_sk = cs_sold_date_sk ) limit 100; -- end query 7 in stream 0 using template query32.tpl -- start query 8 in stream 0 using template query19.tpl select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, sum(ss_ext_sales_price) ext_price from tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store_sales, tpcds_2t_baseline.item,tpcds_2t_baseline.customer,tpcds_2t_baseline.customer_address,tpcds_2t_baseline.store where d_date_sk = ss_sold_date_sk and ss_item_sk = i_item_sk and i_manager_id=8 and d_moy=11 and d_year=1999 and ss_customer_sk = c_customer_sk and c_current_addr_sk = ca_address_sk and substr(ca_zip,1,5) <> substr(s_zip,1,5) and ss_store_sk = s_store_sk group by i_brand ,i_brand_id ,i_manufact_id ,i_manufact order by ext_price desc ,i_brand ,i_brand_id ,i_manufact_id ,i_manufact limit 100 ; -- end query 8 in stream 0 using template query19.tpl -- start query 9 in stream 0 using template query25.tpl select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,min(ss_net_profit) as store_sales_profit ,min(sr_net_loss) as store_returns_loss ,min(cs_net_profit) as catalog_sales_profit from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store_returns ,tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.date_dim d1 ,tpcds_2t_baseline.date_dim d2 ,tpcds_2t_baseline.date_dim d3 ,tpcds_2t_baseline.store ,tpcds_2t_baseline.item where d1.d_moy = 4 and d1.d_year = 2002 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 10 and d2.d_year = 2002 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_moy between 4 and 10 and d3.d_year = 2002 group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100; -- end query 9 in stream 0 using template query25.tpl -- start query 10 in stream 0 using template query78.tpl with ws as (select d_year AS ws_sold_year, ws_item_sk, ws_bill_customer_sk ws_customer_sk, sum(ws_quantity) ws_qty, sum(ws_wholesale_cost) ws_wc, sum(ws_sales_price) ws_sp from tpcds_2t_baseline.web_sales left join tpcds_2t_baseline.web_returns on wr_order_number=ws_order_number and ws_item_sk=wr_item_sk join tpcds_2t_baseline.date_dim on ws_sold_date_sk = d_date_sk where wr_order_number is null group by d_year, ws_item_sk, ws_bill_customer_sk ), cs as (select d_year AS cs_sold_year, cs_item_sk, cs_bill_customer_sk cs_customer_sk, sum(cs_quantity) cs_qty, sum(cs_wholesale_cost) cs_wc, sum(cs_sales_price) cs_sp from tpcds_2t_baseline.catalog_sales left join tpcds_2t_baseline.catalog_returns on cr_order_number=cs_order_number and cs_item_sk=cr_item_sk join tpcds_2t_baseline.date_dim on cs_sold_date_sk = d_date_sk where cr_order_number is null group by d_year, cs_item_sk, cs_bill_customer_sk ), ss as (select d_year AS ss_sold_year, ss_item_sk, ss_customer_sk, sum(ss_quantity) ss_qty, sum(ss_wholesale_cost) ss_wc, sum(ss_sales_price) ss_sp from tpcds_2t_baseline.store_sales left join tpcds_2t_baseline.store_returns on sr_ticket_number=ss_ticket_number and ss_item_sk=sr_item_sk join tpcds_2t_baseline.date_dim on ss_sold_date_sk = d_date_sk where sr_ticket_number is null group by d_year, ss_item_sk, ss_customer_sk ) select ss_customer_sk, round(ss_qty/(coalesce(ws_qty,0)+coalesce(cs_qty,0)),2) ratio, ss_qty store_qty, ss_wc store_wholesale_cost, ss_sp store_sales_price, coalesce(ws_qty,0)+coalesce(cs_qty,0) other_chan_qty, coalesce(ws_wc,0)+coalesce(cs_wc,0) other_chan_wholesale_cost, coalesce(ws_sp,0)+coalesce(cs_sp,0) other_chan_sales_price from ss left join ws on (ws_sold_year=ss_sold_year and ws_item_sk=ss_item_sk and ws_customer_sk=ss_customer_sk) left join cs on (cs_sold_year=ss_sold_year and cs_item_sk=ss_item_sk and cs_customer_sk=ss_customer_sk) where (coalesce(ws_qty,0)>0 or coalesce(cs_qty, 0)>0) and ss_sold_year=2001 order by ss_customer_sk, ss_qty desc, ss_wc desc, ss_sp desc, other_chan_qty, other_chan_wholesale_cost, other_chan_sales_price, ratio limit 100; -- end query 10 in stream 0 using template query78.tpl -- start query 11 in stream 0 using template query86.tpl select sum(ws_net_paid) as total_sum ,i_category ,i_class ,concat(i_category, i_class) as lochierarchy ,rank() over ( partition by concat(i_category, i_class), case when i_class = '0' then i_category end order by sum(ws_net_paid) desc) as rank_within_parent from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.date_dim d1 ,tpcds_2t_baseline.item where d1.d_month_seq between 1205 and 1205+11 and d1.d_date_sk = ws_sold_date_sk and i_item_sk = ws_item_sk group by rollup(i_category,i_class) order by lochierarchy desc, case when lochierarchy = '0' then i_category end, rank_within_parent limit 100; -- end query 11 in stream 0 using template query86.tpl -- start query 12 in stream 0 using template query1.tpl with customer_total_return as (select sr_customer_sk as ctr_customer_sk ,sr_store_sk as ctr_store_sk ,sum(SR_RETURN_AMT_INC_TAX) as ctr_total_return from tpcds_2t_baseline.store_returns ,tpcds_2t_baseline.date_dim where sr_returned_date_sk = d_date_sk and d_year =1999 group by sr_customer_sk ,sr_store_sk) select c_customer_id from customer_total_return ctr1 ,tpcds_2t_baseline.store ,tpcds_2t_baseline.customer where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2 from customer_total_return ctr2 where ctr1.ctr_store_sk = ctr2.ctr_store_sk) and s_store_sk = ctr1.ctr_store_sk and s_state = 'SD' and ctr1.ctr_customer_sk = c_customer_sk order by c_customer_id limit 100; -- end query 12 in stream 0 using template query1.tpl -- start query 13 in stream 0 using template query91.tpl select cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, sum(cr_net_loss) Returns_Loss from tpcds_2t_baseline.call_center, tpcds_2t_baseline.catalog_returns, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.customer_demographics, tpcds_2t_baseline.household_demographics where cr_call_center_sk = cc_call_center_sk and cr_returned_date_sk = d_date_sk and cr_returning_customer_sk= c_customer_sk and cd_demo_sk = c_current_cdemo_sk and hd_demo_sk = c_current_hdemo_sk and ca_address_sk = c_current_addr_sk and d_year = 2002 and d_moy = 11 and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) and hd_buy_potential like 'Unknown%' and ca_gmt_offset = -6 group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status order by sum(cr_net_loss) desc; -- end query 13 in stream 0 using template query91.tpl -- start query 14 in stream 0 using template query21.tpl select * from(select w_warehouse_name ,i_item_id ,sum(case when (cast(d_date as date) < cast ('2000-05-19' as date)) then inv_quantity_on_hand else 0 end) as inv_before ,sum(case when (cast(d_date as date) >= cast ('2000-05-19' as date)) then inv_quantity_on_hand else 0 end) as inv_after from tpcds_2t_baseline.inventory ,tpcds_2t_baseline.warehouse ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where i_current_price between 0.99 and 1.49 and i_item_sk = inv_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_date between date_sub(date '2000-05-19', interval 30 day) and date_add(date '2000-05-19', interval 30 day) group by w_warehouse_name, i_item_id) x where (case when inv_before > 0 then inv_after / inv_before else null end) between 2.0/3.0 and 3.0/2.0 order by w_warehouse_name ,i_item_id limit 100; -- end query 14 in stream 0 using template query21.tpl -- start query 15 in stream 0 using template query43.tpl select s_store_name, s_store_id, sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then ss_sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales from tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store_sales, tpcds_2t_baseline.store where d_date_sk = ss_sold_date_sk and s_store_sk = ss_store_sk and s_gmt_offset = -5 and d_year = 2000 group by s_store_name, s_store_id order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales limit 100; -- end query 15 in stream 0 using template query43.tpl -- start query 16 in stream 0 using template query27.tpl select i_item_id, s_state, s_state as g_state, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.customer_demographics, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store, tpcds_2t_baseline.item where ss_sold_date_sk = d_date_sk and ss_item_sk = i_item_sk and ss_store_sk = s_store_sk and ss_cdemo_sk = cd_demo_sk and cd_gender = 'F' and cd_marital_status = 'D' and cd_education_status = 'College' and d_year = 2002 and s_state in ('SD','AL', 'TN', 'SD', 'SD', 'SD') group by rollup (i_item_id, s_state) order by i_item_id ,s_state limit 100; -- end query 16 in stream 0 using template query27.tpl -- start query 17 in stream 0 using template query94.tpl select count(distinct ws_order_number) as order_count ,sum(ws_ext_ship_cost) as total_shipping_cost ,sum(ws_net_profit) as total_net_profit from tpcds_2t_baseline.web_sales ws1 ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.web_site where d_date between '2001-5-01' and date_add(date '2001-5-01', interval 60 day) and ws1.ws_ship_date_sk = d_date_sk and ws1.ws_ship_addr_sk = ca_address_sk and ca_state = 'AR' and ws1.ws_web_site_sk = web_site_sk and web_company_name = 'pri' and exists (select * from tpcds_2t_baseline.web_sales ws2 where ws1.ws_order_number = ws2.ws_order_number and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk) and not exists(select * from tpcds_2t_baseline.web_returns wr1 where ws1.ws_order_number = wr1.wr_order_number) order by count(distinct ws_order_number) limit 100; -- end query 17 in stream 0 using template query94.tpl -- start query 18 in stream 0 using template query45.tpl select ca_zip, ca_county, sum(ws_sales_price) from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.customer, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.item where ws_bill_customer_sk = c_customer_sk and c_current_addr_sk = ca_address_sk and ws_item_sk = i_item_sk and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') or i_item_id in (select i_item_id from tpcds_2t_baseline.item where i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) ) ) and ws_sold_date_sk = d_date_sk and d_qoy = 2 and d_year = 2000 group by ca_zip, ca_county order by ca_zip, ca_county limit 100; -- end query 18 in stream 0 using template query45.tpl -- start query 19 in stream 0 using template query58.tpl with ss_items as (select i_item_id item_id ,sum(ss_ext_sales_price) ss_item_rev from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where ss_item_sk = i_item_sk and d_date in (select d_date from tpcds_2t_baseline.date_dim where d_week_seq = (select d_week_seq from tpcds_2t_baseline.date_dim where d_date = '1998-02-19')) and ss_sold_date_sk = d_date_sk group by i_item_id), cs_items as (select i_item_id item_id ,sum(cs_ext_sales_price) cs_item_rev from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where cs_item_sk = i_item_sk and d_date in (select d_date from tpcds_2t_baseline.date_dim where d_week_seq = (select d_week_seq from tpcds_2t_baseline.date_dim where d_date = '1998-02-19')) and cs_sold_date_sk = d_date_sk group by i_item_id), ws_items as (select i_item_id item_id ,sum(ws_ext_sales_price) ws_item_rev from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where ws_item_sk = i_item_sk and d_date in (select d_date from tpcds_2t_baseline.date_dim where d_week_seq =(select d_week_seq from tpcds_2t_baseline.date_dim where d_date = '1998-02-19')) and ws_sold_date_sk = d_date_sk group by i_item_id) select ss_items.item_id ,ss_item_rev ,ss_item_rev/((ss_item_rev+cs_item_rev+ws_item_rev)/3) * 100 ss_dev ,cs_item_rev ,cs_item_rev/((ss_item_rev+cs_item_rev+ws_item_rev)/3) * 100 cs_dev ,ws_item_rev ,ws_item_rev/((ss_item_rev+cs_item_rev+ws_item_rev)/3) * 100 ws_dev ,(ss_item_rev+cs_item_rev+ws_item_rev)/3 average from ss_items,cs_items,ws_items where ss_items.item_id=cs_items.item_id and ss_items.item_id=ws_items.item_id and ss_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev and ss_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev and cs_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev and cs_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev and ws_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev and ws_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev order by item_id ,ss_item_rev limit 100; -- end query 19 in stream 0 using template query58.tpl -- start query 20 in stream 0 using template query64.tpl with cs_ui as (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.catalog_returns where cs_item_sk = cr_item_sk and cs_order_number = cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)), cross_sales as (select i_product_name product_name ,i_item_sk item_sk ,s_store_name store_name ,s_zip store_zip ,ad1.ca_street_number b_street_number ,ad1.ca_street_name b_street_name ,ad1.ca_city b_city ,ad1.ca_zip b_zip ,ad2.ca_street_number c_street_number ,ad2.ca_street_name c_street_name ,ad2.ca_city c_city ,ad2.ca_zip c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year s2year ,count(*) cnt ,sum(ss_wholesale_cost) s1 ,sum(ss_list_price) s2 ,sum(ss_coupon_amt) s3 FROM tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store_returns ,cs_ui ,tpcds_2t_baseline.date_dim d1 ,tpcds_2t_baseline.date_dim d2 ,tpcds_2t_baseline.date_dim d3 ,tpcds_2t_baseline.store ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.customer_demographics cd1 ,tpcds_2t_baseline.customer_demographics cd2 ,tpcds_2t_baseline.promotion ,tpcds_2t_baseline.household_demographics hd1 ,tpcds_2t_baseline.household_demographics hd2 ,tpcds_2t_baseline.customer_address ad1 ,tpcds_2t_baseline.customer_address ad2 ,tpcds_2t_baseline.income_band ib1 ,tpcds_2t_baseline.income_band ib2 ,tpcds_2t_baseline.item WHERE ss_store_sk = s_store_sk AND ss_sold_date_sk = d1.d_date_sk AND ss_customer_sk = c_customer_sk AND ss_cdemo_sk= cd1.cd_demo_sk AND ss_hdemo_sk = hd1.hd_demo_sk AND ss_addr_sk = ad1.ca_address_sk and ss_item_sk = i_item_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and ss_item_sk = cs_ui.cs_item_sk and c_current_cdemo_sk = cd2.cd_demo_sk AND c_current_hdemo_sk = hd2.hd_demo_sk AND c_current_addr_sk = ad2.ca_address_sk and c_first_sales_date_sk = d2.d_date_sk and c_first_shipto_date_sk = d3.d_date_sk and ss_promo_sk = p_promo_sk and hd1.hd_income_band_sk = ib1.ib_income_band_sk and hd2.hd_income_band_sk = ib2.ib_income_band_sk and cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('lawn','blush','smoke','ghost','floral','chartreuse') and i_current_price between 51 and 51 + 10 and i_current_price between 51 + 1 and 51 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) select cs1.product_name ,cs1.store_name ,cs1.store_zip ,cs1.b_street_number ,cs1.b_street_name ,cs1.b_city ,cs1.b_zip ,cs1.c_street_number ,cs1.c_street_name ,cs1.c_city ,cs1.c_zip ,cs1.syear as syear1 ,cs1.cnt as cnt1 ,cs1.s1 as s11 ,cs1.s2 as s21 ,cs1.s3 as s31 ,cs2.s1 as s12 ,cs2.s2 as s22 ,cs2.s3 as s32 ,cs2.syear as syear2 ,cs2.cnt as cnt2 from cross_sales cs1,cross_sales cs2 where cs1.item_sk=cs2.item_sk and cs1.syear = 2001 and cs2.syear = 2001 + 1 and cs2.cnt <= cs1.cnt and cs1.store_name = cs2.store_name and cs1.store_zip = cs2.store_zip order by cs1.product_name ,cs1.store_name ,cs2.cnt ,cs1.s1 ,cs2.s1; -- end query 20 in stream 0 using template query64.tpl -- start query 21 in stream 0 using template query36.tpl select sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin ,i_category ,i_class ,concat(i_category, i_class) as lochierarchy ,rank() over ( partition by concat(i_category, i_class), case when i_class = '0' then i_category end order by sum(ss_net_profit)/sum(ss_ext_sales_price) asc) as rank_within_parent from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim d1 ,tpcds_2t_baseline.item ,tpcds_2t_baseline.store where d1.d_year = 1999 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and s_state in ('AL','TN','SD','SD', 'SD','SD','SD','SD') group by rollup(i_category,i_class) order by lochierarchy desc ,case when lochierarchy = '0' then i_category end ,rank_within_parent limit 100; -- end query 21 in stream 0 using template query36.tpl -- start query 22 in stream 0 using template query33.tpl with ss as ( select i_manufact_id,sum(ss_ext_sales_price) total_sales from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_manufact_id in (select i_manufact_id from tpcds_2t_baseline.item where i_category in ('Electronics')) and ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and d_year = 2002 and d_moy = 1 and ss_addr_sk = ca_address_sk and ca_gmt_offset = -6 group by i_manufact_id), cs as ( select i_manufact_id,sum(cs_ext_sales_price) total_sales from tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_manufact_id in (select i_manufact_id from tpcds_2t_baseline.item where i_category in ('Electronics')) and cs_item_sk = i_item_sk and cs_sold_date_sk = d_date_sk and d_year = 2002 and d_moy = 1 and cs_bill_addr_sk = ca_address_sk and ca_gmt_offset = -6 group by i_manufact_id), ws as ( select i_manufact_id,sum(ws_ext_sales_price) total_sales from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_manufact_id in (select i_manufact_id from tpcds_2t_baseline.item where i_category in ('Electronics')) and ws_item_sk = i_item_sk and ws_sold_date_sk = d_date_sk and d_year = 2002 and d_moy = 1 and ws_bill_addr_sk = ca_address_sk and ca_gmt_offset = -6 group by i_manufact_id) select i_manufact_id ,sum(total_sales) total_sales from (select * from ss union all select * from cs union all select * from ws) tmp1 group by i_manufact_id order by total_sales limit 100; -- end query 22 in stream 0 using template query33.tpl -- start query 23 in stream 0 using template query46.tpl select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,amt,profit from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim,tpcds_2t_baseline.store,tpcds_2t_baseline.household_demographics,tpcds_2t_baseline.customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and (household_demographics.hd_dep_count = 3 or household_demographics.hd_vehicle_count= 4) and date_dim.d_dow in (6,0) and date_dim.d_year in (2000,2000+1,2000+2) and store.s_city in ('Oak Grove','Fairview','Five Points','Riverside','Pleasant Hill') group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn,tpcds_2t_baseline.customer,tpcds_2t_baseline.customer_address current_addr where ss_customer_sk = c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number limit 100; -- end query 23 in stream 0 using template query46.tpl -- start query 24 in stream 0 using template query62.tpl select substr(w_warehouse_name,1,20) as warehouse_name ,sm_type ,web_name ,sum(case when (ws_ship_date_sk - ws_sold_date_sk <= 30 ) then 1 else 0 end) as _30_days ,sum(case when (ws_ship_date_sk - ws_sold_date_sk > 30) and (ws_ship_date_sk - ws_sold_date_sk <= 60) then 1 else 0 end ) as _31_to_60_days ,sum(case when (ws_ship_date_sk - ws_sold_date_sk > 60) and (ws_ship_date_sk - ws_sold_date_sk <= 90) then 1 else 0 end) as _61_to_90_days ,sum(case when (ws_ship_date_sk - ws_sold_date_sk > 90) and (ws_ship_date_sk - ws_sold_date_sk <= 120) then 1 else 0 end) as _91_to_120_days ,sum(case when (ws_ship_date_sk - ws_sold_date_sk > 120) then 1 else 0 end) as above_120_days from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.warehouse ,tpcds_2t_baseline.ship_mode ,tpcds_2t_baseline.web_site ,tpcds_2t_baseline.date_dim where d_month_seq between 1211 and 1211 + 11 and ws_ship_date_sk = d_date_sk and ws_warehouse_sk = w_warehouse_sk and ws_ship_mode_sk = sm_ship_mode_sk and ws_web_site_sk = web_site_sk group by warehouse_name ,sm_type ,web_name order by warehouse_name ,sm_type ,web_name limit 100; -- end query 24 in stream 0 using template query62.tpl -- start query 25 in stream 0 using template query16.tpl select count(distinct cs_order_number) as order_count ,sum(cs_ext_ship_cost) as total_shipping_cost ,sum(cs_net_profit) as total_net_profit from tpcds_2t_baseline.catalog_sales cs1 ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.call_center where d_date between '1999-4-01' and date_add(date '1999-4-01', interval 60 day) and cs1.cs_ship_date_sk = d_date_sk and cs1.cs_ship_addr_sk = ca_address_sk and ca_state = 'MD' and cs1.cs_call_center_sk = cc_call_center_sk and cc_county in ('Ziebach County','Williamson County','Walker County','Ziebach County', 'Ziebach County' ) and exists (select * from tpcds_2t_baseline.catalog_sales cs2 where cs1.cs_order_number = cs2.cs_order_number and cs1.cs_warehouse_sk <> cs2.cs_warehouse_sk) and not exists(select * from tpcds_2t_baseline.catalog_returns cr1 where cs1.cs_order_number = cr1.cr_order_number) order by count(distinct cs_order_number) limit 100; -- end query 25 in stream 0 using template query16.tpl -- start query 26 in stream 0 using template query10.tpl select cd_gender, cd_marital_status, cd_education_status, count(*) cnt1, cd_purchase_estimate, count(*) cnt2, cd_credit_rating, count(*) cnt3, cd_dep_count, count(*) cnt4, cd_dep_employed_count, count(*) cnt5, cd_dep_college_count, count(*) cnt6 from tpcds_2t_baseline.customer c,tpcds_2t_baseline.customer_address ca,tpcds_2t_baseline.customer_demographics where c.c_current_addr_sk = ca.ca_address_sk and ca_county in ('Bottineau County','Marion County','Randolph County','Providence County','Sagadahoc County') and cd_demo_sk = c.c_current_cdemo_sk and exists (select * from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = ss_customer_sk and ss_sold_date_sk = d_date_sk and d_year = 2000 and d_moy between 1 and 1+3) and (exists (select * from tpcds_2t_baseline.web_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = ws_bill_customer_sk and ws_sold_date_sk = d_date_sk and d_year = 2000 and d_moy between 1 ANd 1+3) or exists (select * from tpcds_2t_baseline.catalog_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = cs_ship_customer_sk and cs_sold_date_sk = d_date_sk and d_year = 2000 and d_moy between 1 and 1+3)) group by cd_gender, cd_marital_status, cd_education_status, cd_purchase_estimate, cd_credit_rating, cd_dep_count, cd_dep_employed_count, cd_dep_college_count order by cd_gender, cd_marital_status, cd_education_status, cd_purchase_estimate, cd_credit_rating, cd_dep_count, cd_dep_employed_count, cd_dep_college_count limit 100; -- end query 26 in stream 0 using template query10.tpl -- start query 27 in stream 0 using template query63.tpl select * from (select i_manager_id ,sum(ss_sales_price) sum_sales ,avg(sum(ss_sales_price)) over (partition by i_manager_id) avg_monthly_sales from tpcds_2t_baseline.item ,tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.store where ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and ss_store_sk = s_store_sk and d_month_seq in (1179,1179+1,1179+2,1179+3,1179+4,1179+5,1179+6,1179+7,1179+8,1179+9,1179+10,1179+11) and (( i_category in ('Books','Children','Electronics') and i_class in ('personal','portable','reference','self-help') and i_brand in ('scholaramalgamalg #14','scholaramalgamalg #7', 'exportiunivamalg #9','scholaramalgamalg #9')) or( i_category in ('Women','Music','Men') and i_class in ('accessories','classical','fragrances','pants') and i_brand in ('amalgimporto #1','edu packscholar #1','exportiimporto #1', 'importoamalg #1'))) group by i_manager_id, d_moy) tmp1 where case when avg_monthly_sales > 0 then abs (sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 order by i_manager_id ,avg_monthly_sales ,sum_sales limit 100; -- end query 27 in stream 0 using template query63.tpl -- start query 28 in stream 0 using template query69.tpl select cd_gender, cd_marital_status, cd_education_status, count(*) cnt1, cd_purchase_estimate, count(*) cnt2, cd_credit_rating, count(*) cnt3 from tpcds_2t_baseline.customer c,tpcds_2t_baseline.customer_address ca,tpcds_2t_baseline.customer_demographics where c.c_current_addr_sk = ca.ca_address_sk and ca_state in ('IN','ND','PA') and cd_demo_sk = c.c_current_cdemo_sk and exists (select * from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = ss_customer_sk and ss_sold_date_sk = d_date_sk and d_year = 1999 and d_moy between 2 and 2+2) and (not exists (select * from tpcds_2t_baseline.web_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = ws_bill_customer_sk and ws_sold_date_sk = d_date_sk and d_year = 1999 and d_moy between 2 and 2+2) and not exists (select * from tpcds_2t_baseline.catalog_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = cs_ship_customer_sk and cs_sold_date_sk = d_date_sk and d_year = 1999 and d_moy between 2 and 2+2)) group by cd_gender, cd_marital_status, cd_education_status, cd_purchase_estimate, cd_credit_rating order by cd_gender, cd_marital_status, cd_education_status, cd_purchase_estimate, cd_credit_rating limit 100; -- end query 28 in stream 0 using template query69.tpl -- start query 29 in stream 0 using template query60.tpl with ss as ( select i_item_id,sum(ss_ext_sales_price) total_sales from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_item_id in (select i_item_id from tpcds_2t_baseline.item where i_category in ('Music')) and ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and d_year = 1998 and d_moy = 10 and ss_addr_sk = ca_address_sk and ca_gmt_offset = -5 group by i_item_id), cs as ( select i_item_id,sum(cs_ext_sales_price) total_sales from tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_item_id in (select i_item_id from tpcds_2t_baseline.item where i_category in ('Music')) and cs_item_sk = i_item_sk and cs_sold_date_sk = d_date_sk and d_year = 1998 and d_moy = 10 and cs_bill_addr_sk = ca_address_sk and ca_gmt_offset = -5 group by i_item_id), ws as ( select i_item_id,sum(ws_ext_sales_price) total_sales from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_item_id in (select i_item_id from tpcds_2t_baseline.item where i_category in ('Music')) and ws_item_sk = i_item_sk and ws_sold_date_sk = d_date_sk and d_year = 1998 and d_moy = 10 and ws_bill_addr_sk = ca_address_sk and ca_gmt_offset = -5 group by i_item_id) select i_item_id ,sum(total_sales) total_sales from (select * from ss union all select * from cs union all select * from ws) tmp1 group by i_item_id order by i_item_id ,total_sales limit 100; -- end query 29 in stream 0 using template query60.tpl -- start query 30 in stream 0 using template query59.tpl with wss as (select d_week_seq, ss_store_sk, sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then ss_sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim where d_date_sk = ss_sold_date_sk group by d_week_seq,ss_store_sk ) select s_store_name1,s_store_id1,d_week_seq1 ,sun_sales1/sun_sales2,mon_sales1/mon_sales2 ,tue_sales1/tue_sales2,wed_sales1/wed_sales2,thu_sales1/thu_sales2 ,fri_sales1/fri_sales2,sat_sales1/sat_sales2 from (select s_store_name s_store_name1,wss.d_week_seq d_week_seq1 ,s_store_id s_store_id1,sun_sales sun_sales1 ,mon_sales mon_sales1,tue_sales tue_sales1 ,wed_sales wed_sales1,thu_sales thu_sales1 ,fri_sales fri_sales1,sat_sales sat_sales1 from wss,tpcds_2t_baseline.store,tpcds_2t_baseline.date_dim d where d.d_week_seq = wss.d_week_seq and ss_store_sk = s_store_sk and d_month_seq between 1202 and 1202 + 11) y, (select s_store_name s_store_name2,wss.d_week_seq d_week_seq2 ,s_store_id s_store_id2,sun_sales sun_sales2 ,mon_sales mon_sales2,tue_sales tue_sales2 ,wed_sales wed_sales2,thu_sales thu_sales2 ,fri_sales fri_sales2,sat_sales sat_sales2 from wss,tpcds_2t_baseline.store,tpcds_2t_baseline.date_dim d where d.d_week_seq = wss.d_week_seq and ss_store_sk = s_store_sk and d_month_seq between 1202+ 12 and 1202 + 23) x where s_store_id1=s_store_id2 and d_week_seq1=d_week_seq2-52 order by s_store_name1,s_store_id1,d_week_seq1 limit 100; -- end query 30 in stream 0 using template query59.tpl -- start query 31 in stream 0 using template query37.tpl select i_item_id ,i_item_desc ,i_current_price from tpcds_2t_baseline.item, tpcds_2t_baseline.inventory, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.catalog_sales where i_current_price between 16 and 16 + 30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between date(1999, 03, 27) and date_add(date '1999-03-27', interval 60 day) and i_manufact_id in (821,673,849,745) and inv_quantity_on_hand between 100 and 500 and cs_item_sk = i_item_sk group by i_item_id,i_item_desc,i_current_price order by i_item_id limit 100; -- end query 31 in stream 0 using template query37.tpl -- start query 32 in stream 0 using template query98.tpl select i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price ,sum(ss_ext_sales_price) as itemrevenue ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where ss_item_sk = i_item_sk and i_category in ('Children', 'Women', 'Shoes') and ss_sold_date_sk = d_date_sk and d_date between date(2001, 03, 09) and date_add(date '2001-03-09', interval 30 day) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio; -- end query 32 in stream 0 using template query98.tpl -- start query 33 in stream 0 using template query85.tpl select substr(r_reason_desc,1,20) ,avg(ws_quantity) ,avg(wr_refunded_cash) ,avg(wr_fee) from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.web_returns, tpcds_2t_baseline.web_page, tpcds_2t_baseline.customer_demographics cd1, tpcds_2t_baseline.customer_demographics cd2, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.reason where ws_web_page_sk = wp_web_page_sk and ws_item_sk = wr_item_sk and ws_order_number = wr_order_number and ws_sold_date_sk = d_date_sk and d_year = 2001 and cd1.cd_demo_sk = wr_refunded_cdemo_sk and cd2.cd_demo_sk = wr_returning_cdemo_sk and ca_address_sk = wr_refunded_addr_sk and r_reason_sk = wr_reason_sk and ( ( cd1.cd_marital_status = 'W' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Primary' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 100.00 and 150.00 ) or ( cd1.cd_marital_status = 'D' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'College' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 50.00 and 100.00 ) or ( cd1.cd_marital_status = 'S' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = '2 yr Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 150.00 and 200.00 ) ) and ( ( ca_country = 'United States' and ca_state in ('PA', 'IN', 'VA') and ws_net_profit between 100 and 200 ) or ( ca_country = 'United States' and ca_state in ('TX', 'MO', 'MS') and ws_net_profit between 150 and 300 ) or ( ca_country = 'United States' and ca_state in ('MT', 'OR', 'MN') and ws_net_profit between 50 and 250 ) ) group by r_reason_desc order by substr(r_reason_desc,1,20) ,avg(ws_quantity) ,avg(wr_refunded_cash) ,avg(wr_fee) limit 100; -- end query 33 in stream 0 using template query85.tpl -- start query 34 in stream 0 using template query70.tpl select sum(ss_net_profit) as total_sum ,s_state ,s_county ,concat(s_state, s_county) as lochierarchy ,rank() over ( partition by concat(s_state, s_county), case when s_county = '0' then s_state end order by sum(ss_net_profit) desc) as rank_within_parent from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim d1 ,tpcds_2t_baseline.store where d1.d_month_seq between 1191 and 1191+11 and d1.d_date_sk = ss_sold_date_sk and s_store_sk = ss_store_sk and s_state in ( select s_state from (select s_state as s_state, rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.store, tpcds_2t_baseline.date_dim where d_month_seq between 1191 and 1191+11 and d_date_sk = ss_sold_date_sk and s_store_sk = ss_store_sk group by s_state ) tmp1 where ranking <= 5 ) group by rollup(s_state,s_county) order by lochierarchy desc ,case when lochierarchy = '0' then s_state end ,rank_within_parent limit 100; -- end query 34 in stream 0 using template query70.tpl -- start query 35 in stream 0 using template query67.tpl select * from (select i_category ,i_class ,i_brand ,i_product_name ,d_year ,d_qoy ,d_moy ,s_store_id ,sumsales ,rank() over (partition by i_category order by sumsales desc) rk from (select i_category ,i_class ,i_brand ,i_product_name ,d_year ,d_qoy ,d_moy ,s_store_id ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.store ,tpcds_2t_baseline.item where ss_sold_date_sk=d_date_sk and ss_item_sk=i_item_sk and ss_store_sk = s_store_sk and d_month_seq between 1192 and 1192+11 group by rollup(i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id))dw1) dw2 where rk <= 100 order by i_category ,i_class ,i_brand ,i_product_name ,d_year ,d_qoy ,d_moy ,s_store_id ,sumsales ,rk limit 100; -- end query 35 in stream 0 using template query67.tpl -- start query 36 in stream 0 using template query28.tpl select * from (select avg(ss_list_price) B1_LP ,count(ss_list_price) B1_CNT ,count(distinct ss_list_price) B1_CNTD from tpcds_2t_baseline.store_sales where ss_quantity between 0 and 5 and (ss_list_price between 49 and 49+10 or ss_coupon_amt between 5040 and 5040+1000 or ss_wholesale_cost between 4 and 4+20)) B1, (select avg(ss_list_price) B2_LP ,count(ss_list_price) B2_CNT ,count(distinct ss_list_price) B2_CNTD from tpcds_2t_baseline.store_sales where ss_quantity between 6 and 10 and (ss_list_price between 5 and 5+10 or ss_coupon_amt between 441 and 441+1000 or ss_wholesale_cost between 80 and 80+20)) B2, (select avg(ss_list_price) B3_LP ,count(ss_list_price) B3_CNT ,count(distinct ss_list_price) B3_CNTD from tpcds_2t_baseline.store_sales where ss_quantity between 11 and 15 and (ss_list_price between 153 and 153+10 or ss_coupon_amt between 10459 and 10459+1000 or ss_wholesale_cost between 3 and 3+20)) B3, (select avg(ss_list_price) B4_LP ,count(ss_list_price) B4_CNT ,count(distinct ss_list_price) B4_CNTD from tpcds_2t_baseline.store_sales where ss_quantity between 16 and 20 and (ss_list_price between 14 and 14+10 or ss_coupon_amt between 13311 and 13311+1000 or ss_wholesale_cost between 1 and 1+20)) B4, (select avg(ss_list_price) B5_LP ,count(ss_list_price) B5_CNT ,count(distinct ss_list_price) B5_CNTD from tpcds_2t_baseline.store_sales where ss_quantity between 21 and 25 and (ss_list_price between 29 and 29+10 or ss_coupon_amt between 6047 and 6047+1000 or ss_wholesale_cost between 27 and 27+20)) B5, (select avg(ss_list_price) B6_LP ,count(ss_list_price) B6_CNT ,count(distinct ss_list_price) B6_CNTD from tpcds_2t_baseline.store_sales where ss_quantity between 26 and 30 and (ss_list_price between 159 and 159+10 or ss_coupon_amt between 2432 and 2432+1000 or ss_wholesale_cost between 48 and 48+20)) B6 limit 100; -- end query 36 in stream 0 using template query28.tpl -- start query 37 in stream 0 using template query81.tpl with customer_total_return as (select cr_returning_customer_sk as ctr_customer_sk ,ca_state as ctr_state, sum(cr_return_amt_inc_tax) as ctr_total_return from tpcds_2t_baseline.catalog_returns ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.customer_address where cr_returned_date_sk = d_date_sk and d_year =2002 and cr_returning_addr_sk = ca_address_sk group by cr_returning_customer_sk ,ca_state ) select c_customer_id,c_salutation,c_first_name,c_last_name,ca_street_number,ca_street_name ,ca_street_type,ca_suite_number,ca_city,ca_county,ca_state,ca_zip,ca_country,ca_gmt_offset ,ca_location_type,ctr_total_return from customer_total_return ctr1 ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.customer where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2 from customer_total_return ctr2 where ctr1.ctr_state = ctr2.ctr_state) and ca_address_sk = c_current_addr_sk and ca_state = 'IL' and ctr1.ctr_customer_sk = c_customer_sk order by c_customer_id,c_salutation,c_first_name,c_last_name,ca_street_number,ca_street_name ,ca_street_type,ca_suite_number,ca_city,ca_county,ca_state,ca_zip,ca_country,ca_gmt_offset ,ca_location_type,ctr_total_return limit 100; -- end query 37 in stream 0 using template query81.tpl -- start query 38 in stream 0 using template query97.tpl with ssci as ( select ss_customer_sk customer_sk ,ss_item_sk item_sk from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim where ss_sold_date_sk = d_date_sk and d_month_seq between 1176 and 1176 + 11 group by ss_customer_sk ,ss_item_sk), csci as( select cs_bill_customer_sk customer_sk ,cs_item_sk item_sk from tpcds_2t_baseline.catalog_sales,tpcds_2t_baseline.date_dim where cs_sold_date_sk = d_date_sk and d_month_seq between 1176 and 1176 + 11 group by cs_bill_customer_sk ,cs_item_sk) select sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) store_and_catalog from ssci full outer join csci on (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) limit 100; -- end query 38 in stream 0 using template query97.tpl -- start query 39 in stream 0 using template query66.tpl select w_warehouse_name ,w_warehouse_sq_ft ,w_city ,w_county ,w_state ,w_country ,ship_carriers ,year ,sum(jan_sales) as jan_sales ,sum(feb_sales) as feb_sales ,sum(mar_sales) as mar_sales ,sum(apr_sales) as apr_sales ,sum(may_sales) as may_sales ,sum(jun_sales) as jun_sales ,sum(jul_sales) as jul_sales ,sum(aug_sales) as aug_sales ,sum(sep_sales) as sep_sales ,sum(oct_sales) as oct_sales ,sum(nov_sales) as nov_sales ,sum(dec_sales) as dec_sales ,sum(jan_sales/w_warehouse_sq_ft) as jan_sales_per_sq_foot ,sum(feb_sales/w_warehouse_sq_ft) as feb_sales_per_sq_foot ,sum(mar_sales/w_warehouse_sq_ft) as mar_sales_per_sq_foot ,sum(apr_sales/w_warehouse_sq_ft) as apr_sales_per_sq_foot ,sum(may_sales/w_warehouse_sq_ft) as may_sales_per_sq_foot ,sum(jun_sales/w_warehouse_sq_ft) as jun_sales_per_sq_foot ,sum(jul_sales/w_warehouse_sq_ft) as jul_sales_per_sq_foot ,sum(aug_sales/w_warehouse_sq_ft) as aug_sales_per_sq_foot ,sum(sep_sales/w_warehouse_sq_ft) as sep_sales_per_sq_foot ,sum(oct_sales/w_warehouse_sq_ft) as oct_sales_per_sq_foot ,sum(nov_sales/w_warehouse_sq_ft) as nov_sales_per_sq_foot ,sum(dec_sales/w_warehouse_sq_ft) as dec_sales_per_sq_foot ,sum(jan_net) as jan_net ,sum(feb_net) as feb_net ,sum(mar_net) as mar_net ,sum(apr_net) as apr_net ,sum(may_net) as may_net ,sum(jun_net) as jun_net ,sum(jul_net) as jul_net ,sum(aug_net) as aug_net ,sum(sep_net) as sep_net ,sum(oct_net) as oct_net ,sum(nov_net) as nov_net ,sum(dec_net) as dec_net from ( select w_warehouse_name ,w_warehouse_sq_ft ,w_city ,w_county ,w_state ,w_country , concat('ZOUROS', ',', 'ZHOU') as ship_carriers ,d_year as year ,sum(case when d_moy = 1 then ws_sales_price* ws_quantity else 0 end) as jan_sales ,sum(case when d_moy = 2 then ws_sales_price* ws_quantity else 0 end) as feb_sales ,sum(case when d_moy = 3 then ws_sales_price* ws_quantity else 0 end) as mar_sales ,sum(case when d_moy = 4 then ws_sales_price* ws_quantity else 0 end) as apr_sales ,sum(case when d_moy = 5 then ws_sales_price* ws_quantity else 0 end) as may_sales ,sum(case when d_moy = 6 then ws_sales_price* ws_quantity else 0 end) as jun_sales ,sum(case when d_moy = 7 then ws_sales_price* ws_quantity else 0 end) as jul_sales ,sum(case when d_moy = 8 then ws_sales_price* ws_quantity else 0 end) as aug_sales ,sum(case when d_moy = 9 then ws_sales_price* ws_quantity else 0 end) as sep_sales ,sum(case when d_moy = 10 then ws_sales_price* ws_quantity else 0 end) as oct_sales ,sum(case when d_moy = 11 then ws_sales_price* ws_quantity else 0 end) as nov_sales ,sum(case when d_moy = 12 then ws_sales_price* ws_quantity else 0 end) as dec_sales ,sum(case when d_moy = 1 then ws_net_paid * ws_quantity else 0 end) as jan_net ,sum(case when d_moy = 2 then ws_net_paid * ws_quantity else 0 end) as feb_net ,sum(case when d_moy = 3 then ws_net_paid * ws_quantity else 0 end) as mar_net ,sum(case when d_moy = 4 then ws_net_paid * ws_quantity else 0 end) as apr_net ,sum(case when d_moy = 5 then ws_net_paid * ws_quantity else 0 end) as may_net ,sum(case when d_moy = 6 then ws_net_paid * ws_quantity else 0 end) as jun_net ,sum(case when d_moy = 7 then ws_net_paid * ws_quantity else 0 end) as jul_net ,sum(case when d_moy = 8 then ws_net_paid * ws_quantity else 0 end) as aug_net ,sum(case when d_moy = 9 then ws_net_paid * ws_quantity else 0 end) as sep_net ,sum(case when d_moy = 10 then ws_net_paid * ws_quantity else 0 end) as oct_net ,sum(case when d_moy = 11 then ws_net_paid * ws_quantity else 0 end) as nov_net ,sum(case when d_moy = 12 then ws_net_paid * ws_quantity else 0 end) as dec_net from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.warehouse ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.time_dim ,tpcds_2t_baseline.ship_mode where ws_warehouse_sk = w_warehouse_sk and ws_sold_date_sk = d_date_sk and ws_sold_time_sk = t_time_sk and ws_ship_mode_sk = sm_ship_mode_sk and d_year = 2000 and t_time between 18479 and 18479+28800 and sm_carrier in ('ZOUROS','ZHOU') group by w_warehouse_name ,w_warehouse_sq_ft ,w_city ,w_county ,w_state ,w_country ,d_year union all select w_warehouse_name ,w_warehouse_sq_ft ,w_city ,w_county ,w_state ,w_country , concat('ZOUROS', ',', 'ZHOU') as ship_carriers ,d_year as year ,sum(case when d_moy = 1 then cs_ext_sales_price* cs_quantity else 0 end) as jan_sales ,sum(case when d_moy = 2 then cs_ext_sales_price* cs_quantity else 0 end) as feb_sales ,sum(case when d_moy = 3 then cs_ext_sales_price* cs_quantity else 0 end) as mar_sales ,sum(case when d_moy = 4 then cs_ext_sales_price* cs_quantity else 0 end) as apr_sales ,sum(case when d_moy = 5 then cs_ext_sales_price* cs_quantity else 0 end) as may_sales ,sum(case when d_moy = 6 then cs_ext_sales_price* cs_quantity else 0 end) as jun_sales ,sum(case when d_moy = 7 then cs_ext_sales_price* cs_quantity else 0 end) as jul_sales ,sum(case when d_moy = 8 then cs_ext_sales_price* cs_quantity else 0 end) as aug_sales ,sum(case when d_moy = 9 then cs_ext_sales_price* cs_quantity else 0 end) as sep_sales ,sum(case when d_moy = 10 then cs_ext_sales_price* cs_quantity else 0 end) as oct_sales ,sum(case when d_moy = 11 then cs_ext_sales_price* cs_quantity else 0 end) as nov_sales ,sum(case when d_moy = 12 then cs_ext_sales_price* cs_quantity else 0 end) as dec_sales ,sum(case when d_moy = 1 then cs_net_paid_inc_ship * cs_quantity else 0 end) as jan_net ,sum(case when d_moy = 2 then cs_net_paid_inc_ship * cs_quantity else 0 end) as feb_net ,sum(case when d_moy = 3 then cs_net_paid_inc_ship * cs_quantity else 0 end) as mar_net ,sum(case when d_moy = 4 then cs_net_paid_inc_ship * cs_quantity else 0 end) as apr_net ,sum(case when d_moy = 5 then cs_net_paid_inc_ship * cs_quantity else 0 end) as may_net ,sum(case when d_moy = 6 then cs_net_paid_inc_ship * cs_quantity else 0 end) as jun_net ,sum(case when d_moy = 7 then cs_net_paid_inc_ship * cs_quantity else 0 end) as jul_net ,sum(case when d_moy = 8 then cs_net_paid_inc_ship * cs_quantity else 0 end) as aug_net ,sum(case when d_moy = 9 then cs_net_paid_inc_ship * cs_quantity else 0 end) as sep_net ,sum(case when d_moy = 10 then cs_net_paid_inc_ship * cs_quantity else 0 end) as oct_net ,sum(case when d_moy = 11 then cs_net_paid_inc_ship * cs_quantity else 0 end) as nov_net ,sum(case when d_moy = 12 then cs_net_paid_inc_ship * cs_quantity else 0 end) as dec_net from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.warehouse ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.time_dim ,tpcds_2t_baseline.ship_mode where cs_warehouse_sk = w_warehouse_sk and cs_sold_date_sk = d_date_sk and cs_sold_time_sk = t_time_sk and cs_ship_mode_sk = sm_ship_mode_sk and d_year = 2000 and t_time between 18479 AND 18479+28800 and sm_carrier in ('ZOUROS','ZHOU') group by w_warehouse_name ,w_warehouse_sq_ft ,w_city ,w_county ,w_state ,w_country ,d_year ) x group by w_warehouse_name ,w_warehouse_sq_ft ,w_city ,w_county ,w_state ,w_country ,ship_carriers ,year order by w_warehouse_name limit 100; -- end query 39 in stream 0 using template query66.tpl -- start query 40 in stream 0 using template query90.tpl select cast(amc as numeric) / cast(pmc as numeric) am_pm_ratio from ( select count(*) amc from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 12 and 12+1 and household_demographics.hd_dep_count = 0 and web_page.wp_char_count between 5000 and 5200), ( select count(*) pmc from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 15 and 15+1 and household_demographics.hd_dep_count = 0 and web_page.wp_char_count between 5000 and 5200) order by am_pm_ratio limit 100; -- end query 40 in stream 0 using template query90.tpl -- start query 41 in stream 0 using template query17.tpl select i_item_id ,i_item_desc ,s_state ,count(ss_quantity) as store_sales_quantitycount ,avg(ss_quantity) as store_sales_quantityave ,stddev_samp(ss_quantity) as store_sales_quantitystdev ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov ,count(sr_return_quantity) as store_returns_quantitycount ,avg(sr_return_quantity) as store_returns_quantityave ,stddev_samp(sr_return_quantity) as store_returns_quantitystdev ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave ,stddev_samp(cs_quantity) as catalog_sales_quantitystdev ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitycov from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store_returns ,tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.date_dim d1 ,tpcds_2t_baseline.date_dim d2 ,tpcds_2t_baseline.date_dim d3 ,tpcds_2t_baseline.store ,tpcds_2t_baseline.item where d1.d_quarter_name = '2001Q1' and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_quarter_name in ('2001Q1','2001Q2','2001Q3') and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_quarter_name in ('2001Q1','2001Q2','2001Q3') group by i_item_id ,i_item_desc ,s_state order by i_item_id ,i_item_desc ,s_state limit 100; -- end query 41 in stream 0 using template query17.tpl -- start query 42 in stream 0 using template query47.tpl with v1 as( select i_category, i_brand, s_store_name, s_company_name, d_year, d_moy, sum(ss_sales_price) sum_sales, avg(sum(ss_sales_price)) over (partition by i_category, i_brand, s_store_name, s_company_name, d_year) avg_monthly_sales, rank() over (partition by i_category, i_brand, s_store_name, s_company_name order by d_year, d_moy) rn from tpcds_2t_baseline.item, tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store where ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and ss_store_sk = s_store_sk and ( d_year = 2001 or ( d_year = 2001-1 and d_moy =12) or ( d_year = 2001+1 and d_moy =1) ) group by i_category, i_brand, s_store_name, s_company_name, d_year, d_moy), v2 as( select v1.s_company_name ,v1.d_year, v1.d_moy ,v1.avg_monthly_sales ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum from v1, v1 v1_lag, v1 v1_lead where v1.i_category = v1_lag.i_category and v1.i_category = v1_lead.i_category and v1.i_brand = v1_lag.i_brand and v1.i_brand = v1_lead.i_brand and v1.s_store_name = v1_lag.s_store_name and v1.s_store_name = v1_lead.s_store_name and v1.s_company_name = v1_lag.s_company_name and v1.s_company_name = v1_lead.s_company_name and v1.rn = v1_lag.rn + 1 and v1.rn = v1_lead.rn - 1) select * from v2 where d_year = 2001 and avg_monthly_sales > 0 and case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 order by sum_sales - avg_monthly_sales, avg_monthly_sales limit 100; -- end query 42 in stream 0 using template query47.tpl -- start query 43 in stream 0 using template query95.tpl with ws_wh as (select ws1.ws_order_number,ws1.ws_warehouse_sk wh1,ws2.ws_warehouse_sk wh2 from tpcds_2t_baseline.web_sales ws1,tpcds_2t_baseline.web_sales ws2 where ws1.ws_order_number = ws2.ws_order_number and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk) select count(distinct ws_order_number) as order_count ,sum(ws_ext_ship_cost) as total_shipping_cost ,sum(ws_net_profit) as total_net_profit from tpcds_2t_baseline.web_sales ws1 ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.web_site where d_date between date(1999, 03, 01) and date_add(date '1999-3-01', interval 60 day) and ws1.ws_ship_date_sk = d_date_sk and ws1.ws_ship_addr_sk = ca_address_sk and ca_state = 'OR' and ws1.ws_web_site_sk = web_site_sk and web_company_name = 'pri' and ws1.ws_order_number in (select ws_order_number from ws_wh) and ws1.ws_order_number in (select wr_order_number from tpcds_2t_baseline.web_returns,ws_wh where wr_order_number = ws_wh.ws_order_number) order by count(distinct ws_order_number) limit 100; -- end query 43 in stream 0 using template query95.tpl -- start query 44 in stream 0 using template query92.tpl select sum(ws_ext_discount_amt) as excess_discount_amount from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where i_manufact_id = 783 and i_item_sk = ws_item_sk and d_date between date(1999, 03, 21) and date_add(date '1999-03-21', interval 90 day) and d_date_sk = ws_sold_date_sk and ws_ext_discount_amt > ( SELECT 1.3 * avg(ws_ext_discount_amt) FROM tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.date_dim WHERE ws_item_sk = i_item_sk and d_date between date(1999, 03, 21) and date_add(date '1999-03-21', interval 90 day) and d_date_sk = ws_sold_date_sk ) order by sum(ws_ext_discount_amt) limit 100; -- end query 44 in stream 0 using template query92.tpl -- start query 45 in stream 0 using template query3.tpl select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_sales_price) sum_agg from tpcds_2t_baseline.date_dim dt ,tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manufact_id = 211 and dt.d_moy=11 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,sum_agg desc ,brand_id limit 100; -- end query 45 in stream 0 using template query3.tpl -- start query 46 in stream 0 using template query51.tpl with web_v1 as ( select ws_item_sk item_sk, d_date, sum(sum(ws_sales_price)) over (partition by ws_item_sk order by d_date rows between unbounded preceding and current row) cume_sales from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.date_dim where ws_sold_date_sk=d_date_sk and d_month_seq between 1195 and 1195+11 and ws_item_sk is not NULL group by ws_item_sk, d_date), store_v1 as ( select ss_item_sk item_sk, d_date, sum(sum(ss_sales_price)) over (partition by ss_item_sk order by d_date rows between unbounded preceding and current row) cume_sales from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim where ss_sold_date_sk=d_date_sk and d_month_seq between 1195 and 1195+11 and ss_item_sk is not NULL group by ss_item_sk, d_date) select * from (select item_sk ,d_date ,web_sales ,store_sales ,max(web_sales) over (partition by item_sk order by d_date rows between unbounded preceding and current row) web_cumulative ,max(store_sales) over (partition by item_sk order by d_date rows between unbounded preceding and current row) store_cumulative from (select case when web.item_sk is not null then web.item_sk else store.item_sk end item_sk ,case when web.d_date is not null then web.d_date else store.d_date end d_date ,web.cume_sales web_sales ,store.cume_sales store_sales from web_v1 web full outer join store_v1 store on (web.item_sk = store.item_sk and web.d_date = store.d_date) )x )y where web_cumulative > store_cumulative order by item_sk ,d_date limit 100; -- end query 46 in stream 0 using template query51.tpl -- start query 47 in stream 0 using template query35.tpl select ca_state, cd_gender, cd_marital_status, cd_dep_count, count(*) cnt1, stddev_samp(cd_dep_count), sum(cd_dep_count), min(cd_dep_count), cd_dep_employed_count, count(*) cnt2, stddev_samp(cd_dep_employed_count), sum(cd_dep_employed_count), min(cd_dep_employed_count), cd_dep_college_count, count(*) cnt3, stddev_samp(cd_dep_college_count), sum(cd_dep_college_count), min(cd_dep_college_count) from tpcds_2t_baseline.customer c,tpcds_2t_baseline.customer_address ca,tpcds_2t_baseline.customer_demographics where c.c_current_addr_sk = ca.ca_address_sk and cd_demo_sk = c.c_current_cdemo_sk and exists (select * from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = ss_customer_sk and ss_sold_date_sk = d_date_sk and d_year = 2001 and d_qoy < 4) and (exists (select * from tpcds_2t_baseline.web_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = ws_bill_customer_sk and ws_sold_date_sk = d_date_sk and d_year = 2001 and d_qoy < 4) or exists (select * from tpcds_2t_baseline.catalog_sales,tpcds_2t_baseline.date_dim where c.c_customer_sk = cs_ship_customer_sk and cs_sold_date_sk = d_date_sk and d_year = 2001 and d_qoy < 4)) group by ca_state, cd_gender, cd_marital_status, cd_dep_count, cd_dep_employed_count, cd_dep_college_count order by ca_state, cd_gender, cd_marital_status, cd_dep_count, cd_dep_employed_count, cd_dep_college_count limit 100; -- end query 47 in stream 0 using template query35.tpl -- start query 48 in stream 0 using template query49.tpl select channel, item, return_ratio, return_rank, currency_rank from (select 'web' as channel ,web.item ,web.return_ratio ,web.return_rank ,web.currency_rank from ( select item ,return_ratio ,currency_ratio ,rank() over (order by return_ratio) as return_rank ,rank() over (order by currency_ratio) as currency_rank from ( select ws.ws_item_sk as item ,(cast(sum(coalesce(wr.wr_return_quantity,0)) as numeric)/ cast(sum(coalesce(ws.ws_quantity,0)) as numeric )) as return_ratio ,(cast(sum(coalesce(wr.wr_return_amt,0)) as numeric)/ cast(sum(coalesce(ws.ws_net_paid,0)) as numeric)) as currency_ratio from tpcds_2t_baseline.web_sales ws left outer join tpcds_2t_baseline.web_returns wr on (ws.ws_order_number = wr.wr_order_number and ws.ws_item_sk = wr.wr_item_sk) ,tpcds_2t_baseline.date_dim where wr.wr_return_amt > 10000 and ws.ws_net_profit > 1 and ws.ws_net_paid > 0 and ws.ws_quantity > 0 and ws_sold_date_sk = d_date_sk and d_year = 2000 and d_moy = 12 group by ws.ws_item_sk ) in_web ) web where ( web.return_rank <= 10 or web.currency_rank <= 10 ) union all select 'catalog' as channel ,catalog.item ,catalog.return_ratio ,catalog.return_rank ,catalog.currency_rank from ( select item ,return_ratio ,currency_ratio ,rank() over (order by return_ratio) as return_rank ,rank() over (order by currency_ratio) as currency_rank from ( select cs.cs_item_sk as item ,(cast(sum(coalesce(cr.cr_return_quantity,0)) as numeric)/ cast(sum(coalesce(cs.cs_quantity,0)) as numeric)) as return_ratio ,(cast(sum(coalesce(cr.cr_return_amount,0)) as numeric)/ cast(sum(coalesce(cs.cs_net_paid,0)) as numeric)) as currency_ratio from tpcds_2t_baseline.catalog_sales cs left outer join tpcds_2t_baseline.catalog_returns cr on (cs.cs_order_number = cr.cr_order_number and cs.cs_item_sk = cr.cr_item_sk) ,tpcds_2t_baseline.date_dim where cr.cr_return_amount > 10000 and cs.cs_net_profit > 1 and cs.cs_net_paid > 0 and cs.cs_quantity > 0 and cs_sold_date_sk = d_date_sk and d_year = 2000 and d_moy = 12 group by cs.cs_item_sk ) in_cat ) catalog where ( catalog.return_rank <= 10 or catalog.currency_rank <=10 ) union all select 'store' as channel ,store.item ,store.return_ratio ,store.return_rank ,store.currency_rank from ( select item ,return_ratio ,currency_ratio ,rank() over (order by return_ratio) as return_rank ,rank() over (order by currency_ratio) as currency_rank from ( select sts.ss_item_sk as item ,(cast(sum(coalesce(sr.sr_return_quantity,0)) as numeric)/cast(sum(coalesce(sts.ss_quantity,0)) as numeric )) as return_ratio ,(cast(sum(coalesce(sr.sr_return_amt,0)) as numeric)/cast(sum(coalesce(sts.ss_net_paid,0)) as numeric )) as currency_ratio from tpcds_2t_baseline.store_sales sts left outer join tpcds_2t_baseline.store_returns sr on (sts.ss_ticket_number = sr.sr_ticket_number and sts.ss_item_sk = sr.sr_item_sk) ,tpcds_2t_baseline.date_dim where sr.sr_return_amt > 10000 and sts.ss_net_profit > 1 and sts.ss_net_paid > 0 and sts.ss_quantity > 0 and ss_sold_date_sk = d_date_sk and d_year = 2000 and d_moy = 12 group by sts.ss_item_sk ) in_store ) store where ( store.return_rank <= 10 or store.currency_rank <= 10 ) ) order by 1,4,5,2 limit 100; -- end query 48 in stream 0 using template query49.tpl -- start query 49 in stream 0 using template query9.tpl select case when (select count(*) from tpcds_2t_baseline.store_sales where ss_quantity between 1 and 20) > 144610 then (select avg(ss_ext_tax) from tpcds_2t_baseline.store_sales where ss_quantity between 1 and 20) else (select avg(ss_net_paid) from tpcds_2t_baseline.store_sales where ss_quantity between 1 and 20) end bucket1 , case when (select count(*) from tpcds_2t_baseline.store_sales where ss_quantity between 21 and 40) > 162498 then (select avg(ss_ext_tax) from tpcds_2t_baseline.store_sales where ss_quantity between 21 and 40) else (select avg(ss_net_paid) from tpcds_2t_baseline.store_sales where ss_quantity between 21 and 40) end bucket2, case when (select count(*) from tpcds_2t_baseline.store_sales where ss_quantity between 41 and 60) > 28387 then (select avg(ss_ext_tax) from tpcds_2t_baseline.store_sales where ss_quantity between 41 and 60) else (select avg(ss_net_paid) from tpcds_2t_baseline.store_sales where ss_quantity between 41 and 60) end bucket3, case when (select count(*) from tpcds_2t_baseline.store_sales where ss_quantity between 61 and 80) > 442573 then (select avg(ss_ext_tax) from tpcds_2t_baseline.store_sales where ss_quantity between 61 and 80) else (select avg(ss_net_paid) from tpcds_2t_baseline.store_sales where ss_quantity between 61 and 80) end bucket4, case when (select count(*) from tpcds_2t_baseline.store_sales where ss_quantity between 81 and 100) > 212532 then (select avg(ss_ext_tax) from tpcds_2t_baseline.store_sales where ss_quantity between 81 and 100) else (select avg(ss_net_paid) from tpcds_2t_baseline.store_sales where ss_quantity between 81 and 100) end bucket5 from tpcds_2t_baseline.reason where r_reason_sk = 1 ; -- end query 49 in stream 0 using template query9.tpl -- start query 50 in stream 0 using template query31.tpl with ss as (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim,tpcds_2t_baseline.customer_address where ss_sold_date_sk = d_date_sk and ss_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year), ws as (select ca_county,d_qoy, d_year,sum(ws_ext_sales_price) as web_sales from tpcds_2t_baseline.web_sales,tpcds_2t_baseline.date_dim,tpcds_2t_baseline.customer_address where ws_sold_date_sk = d_date_sk and ws_bill_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year) select ss1.ca_county ,ss1.d_year ,ws2.web_sales/ws1.web_sales web_q1_q2_increase ,ss2.store_sales/ss1.store_sales store_q1_q2_increase ,ws3.web_sales/ws2.web_sales web_q2_q3_increase ,ss3.store_sales/ss2.store_sales store_q2_q3_increase from ss ss1 ,ss ss2 ,ss ss3 ,ws ws1 ,ws ws2 ,ws ws3 where ss1.d_qoy = 1 and ss1.d_year = 2000 and ss1.ca_county = ss2.ca_county and ss2.d_qoy = 2 and ss2.d_year = 2000 and ss2.ca_county = ss3.ca_county and ss3.d_qoy = 3 and ss3.d_year = 2000 and ss1.ca_county = ws1.ca_county and ws1.d_qoy = 1 and ws1.d_year = 2000 and ws1.ca_county = ws2.ca_county and ws2.d_qoy = 2 and ws2.d_year = 2000 and ws1.ca_county = ws3.ca_county and ws3.d_qoy = 3 and ws3.d_year =2000 and case when ws1.web_sales > 0 then ws2.web_sales/ws1.web_sales else null end > case when ss1.store_sales > 0 then ss2.store_sales/ss1.store_sales else null end and case when ws2.web_sales > 0 then ws3.web_sales/ws2.web_sales else null end > case when ss2.store_sales > 0 then ss3.store_sales/ss2.store_sales else null end order by web_q2_q3_increase; -- end query 50 in stream 0 using template query31.tpl -- start query 51 in stream 0 using template query11.tpl with year_total as ( select c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,c_preferred_cust_flag customer_preferred_cust_flag ,c_birth_country customer_birth_country ,c_login customer_login ,c_email_address customer_email_address ,d_year dyear ,sum(ss_ext_list_price-ss_ext_discount_amt) year_total ,'s' sale_type from tpcds_2t_baseline.customer ,tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim where c_customer_sk = ss_customer_sk and ss_sold_date_sk = d_date_sk group by c_customer_id ,c_first_name ,c_last_name ,c_preferred_cust_flag ,c_birth_country ,c_login ,c_email_address ,d_year union all select c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,c_preferred_cust_flag customer_preferred_cust_flag ,c_birth_country customer_birth_country ,c_login customer_login ,c_email_address customer_email_address ,d_year dyear ,sum(ws_ext_list_price-ws_ext_discount_amt) year_total ,'w' sale_type from tpcds_2t_baseline.customer ,tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.date_dim where c_customer_sk = ws_bill_customer_sk and ws_sold_date_sk = d_date_sk group by c_customer_id ,c_first_name ,c_last_name ,c_preferred_cust_flag ,c_birth_country ,c_login ,c_email_address ,d_year ) select t_s_secyear.customer_id ,t_s_secyear.customer_first_name ,t_s_secyear.customer_last_name ,t_s_secyear.customer_preferred_cust_flag from year_total t_s_firstyear ,year_total t_s_secyear ,year_total t_w_firstyear ,year_total t_w_secyear where t_s_secyear.customer_id = t_s_firstyear.customer_id and t_s_firstyear.customer_id = t_w_secyear.customer_id and t_s_firstyear.customer_id = t_w_firstyear.customer_id and t_s_firstyear.sale_type = 's' and t_w_firstyear.sale_type = 'w' and t_s_secyear.sale_type = 's' and t_w_secyear.sale_type = 'w' and t_s_firstyear.dyear = 1998 and t_s_secyear.dyear = 1998+1 and t_w_firstyear.dyear = 1998 and t_w_secyear.dyear = 1998+1 and t_s_firstyear.year_total > 0 and t_w_firstyear.year_total > 0 and case when t_w_firstyear.year_total > 0 then t_w_secyear.year_total / t_w_firstyear.year_total else 0.0 end > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else 0.0 end order by t_s_secyear.customer_id ,t_s_secyear.customer_first_name ,t_s_secyear.customer_last_name ,t_s_secyear.customer_preferred_cust_flag limit 100; -- end query 51 in stream 0 using template query11.tpl -- start query 52 in stream 0 using template query93.tpl select ss_customer_sk ,sum(act_sales) sumsales from (select ss_item_sk ,ss_ticket_number ,ss_customer_sk ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price else (ss_quantity*ss_sales_price) end act_sales from tpcds_2t_baseline.store_sales left outer join tpcds_2t_baseline.store_returns on (sr_item_sk = ss_item_sk and sr_ticket_number = ss_ticket_number) ,tpcds_2t_baseline.reason where sr_reason_sk = r_reason_sk) t group by ss_customer_sk order by sumsales, ss_customer_sk limit 100; -- end query 52 in stream 0 using template query93.tpl -- start query 53 in stream 0 using template query29.tpl select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,max(ss_quantity) as store_sales_quantity ,max(sr_return_quantity) as store_returns_quantity ,max(cs_quantity) as catalog_sales_quantity from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store_returns ,tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.date_dim d1 ,tpcds_2t_baseline.date_dim d2 ,tpcds_2t_baseline.date_dim d3 ,tpcds_2t_baseline.store ,tpcds_2t_baseline.item where d1.d_moy = 4 and d1.d_year = 2000 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 4 + 3 and d2.d_year = 2000 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_year in (2000,2000+1,2000+2) group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100; -- end query 53 in stream 0 using template query29.tpl -- start query 54 in stream 0 using template query38.tpl select count(*) from ( select distinct c_last_name, c_first_name, d_date from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_customer_sk = customer.c_customer_sk and d_month_seq between 1212 and 1212 + 11 intersect distinct select distinct c_last_name, c_first_name, d_date from tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and d_month_seq between 1212 and 1212 + 11 intersect distinct select distinct c_last_name, c_first_name, d_date from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer where web_sales.ws_sold_date_sk = date_dim.d_date_sk and web_sales.ws_bill_customer_sk = customer.c_customer_sk and d_month_seq between 1212 and 1212 + 11 ) hot_cust limit 100; -- end query 54 in stream 0 using template query38.tpl -- start query 55 in stream 0 using template query22.tpl select i_product_name ,i_brand ,i_class ,i_category ,avg(inv_quantity_on_hand) qoh from tpcds_2t_baseline.inventory ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.item where inv_date_sk=d_date_sk and inv_item_sk=i_item_sk and d_month_seq between 1188 and 1188 + 11 group by rollup(i_product_name ,i_brand ,i_class ,i_category) order by qoh, i_product_name, i_brand, i_class, i_category limit 100; -- end query 55 in stream 0 using template query22.tpl -- start query 56 in stream 0 using template query89.tpl select * from( select i_category, i_class, i_brand, s_store_name, s_company_name, d_moy, sum(ss_sales_price) sum_sales, avg(sum(ss_sales_price)) over (partition by i_category, i_brand, s_store_name, s_company_name) avg_monthly_sales from tpcds_2t_baseline.item, tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store where ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and ss_store_sk = s_store_sk and d_year in (2001) and ((i_category in ('Electronics','Books','Home') and i_class in ('scanners','parenting','wallpaper') ) or (i_category in ('Shoes','Sports','Women') and i_class in ('kids','archery','dresses') )) group by i_category, i_class, i_brand, s_store_name, s_company_name, d_moy) tmp1 where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) else null end > 0.1 order by sum_sales - avg_monthly_sales, s_store_name limit 100; -- end query 56 in stream 0 using template query89.tpl -- start query 57 in stream 0 using template query15.tpl select ca_zip ,sum(cs_sales_price) from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.date_dim where cs_bill_customer_sk = c_customer_sk and c_current_addr_sk = ca_address_sk and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') or ca_state in ('CA','WA','GA') or cs_sales_price > 500) and cs_sold_date_sk = d_date_sk and d_qoy = 2 and d_year = 2002 group by ca_zip order by ca_zip limit 100; -- end query 57 in stream 0 using template query15.tpl -- start query 58 in stream 0 using template query6.tpl select a.ca_state state, count(*) cnt from tpcds_2t_baseline.customer_address a ,tpcds_2t_baseline.customer c ,tpcds_2t_baseline.store_sales s ,tpcds_2t_baseline.date_dim d ,tpcds_2t_baseline.item i where a.ca_address_sk = c.c_current_addr_sk and c.c_customer_sk = s.ss_customer_sk and s.ss_sold_date_sk = d.d_date_sk and s.ss_item_sk = i.i_item_sk and d.d_month_seq = (select distinct (d_month_seq) from tpcds_2t_baseline.date_dim where d_year = 1998 and d_moy = 6 ) and i.i_current_price > 1.2 * (select avg(j.i_current_price) from tpcds_2t_baseline.item j where j.i_category = i.i_category) group by a.ca_state having count(*) >= 10 order by cnt, a.ca_state limit 100; -- end query 58 in stream 0 using template query6.tpl -- start query 59 in stream 0 using template query52.tpl select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) ext_price from tpcds_2t_baseline.date_dim dt ,tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=2002 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,ext_price desc ,brand_id limit 100 ; -- end query 59 in stream 0 using template query52.tpl -- start query 60 in stream 0 using template query50.tpl select s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip ,sum(case when (sr_returned_date_sk - ss_sold_date_sk <= 30 ) then 1 else 0 end) as _30_days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 30) and (sr_returned_date_sk - ss_sold_date_sk <= 60) then 1 else 0 end ) as _31_to_60_days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 60) and (sr_returned_date_sk - ss_sold_date_sk <= 90) then 1 else 0 end) as _61_to_90_days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 90) and (sr_returned_date_sk - ss_sold_date_sk <= 120) then 1 else 0 end) as _91_to_120_days ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 120) then 1 else 0 end) as over_120_days from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store_returns ,tpcds_2t_baseline.store ,tpcds_2t_baseline.date_dim d1 ,tpcds_2t_baseline.date_dim d2 where d2.d_year = 2002 and d2.d_moy = 8 and ss_ticket_number = sr_ticket_number and ss_item_sk = sr_item_sk and ss_sold_date_sk = d1.d_date_sk and sr_returned_date_sk = d2.d_date_sk and ss_customer_sk = sr_customer_sk and ss_store_sk = s_store_sk group by s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip order by s_store_name ,s_company_id ,s_street_number ,s_street_name ,s_street_type ,s_suite_number ,s_city ,s_county ,s_state ,s_zip limit 100; -- end query 60 in stream 0 using template query50.tpl -- start query 61 in stream 0 using template query42.tpl select dt.d_year ,item.i_category_id ,item.i_category ,sum(ss_ext_sales_price) from tpcds_2t_baseline.date_dim dt ,tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=11 and dt.d_year=1999 group by dt.d_year ,item.i_category_id ,item.i_category order by sum(ss_ext_sales_price) desc,dt.d_year ,item.i_category_id ,item.i_category limit 100 ; -- end query 61 in stream 0 using template query42.tpl -- start query 62 in stream 0 using template query41.tpl select distinct(i_product_name) from tpcds_2t_baseline.item i1 where i_manufact_id between 794 and 794+40 and (select count(*) as item_cnt from tpcds_2t_baseline.item where (i_manufact = i1.i_manufact and ((i_category = 'Women' and (i_color = 'pink' or i_color = 'yellow') and (i_units = 'Lb' or i_units = 'Pallet') and (i_size = 'small' or i_size = 'petite') ) or (i_category = 'Women' and (i_color = 'deep' or i_color = 'goldenrod') and (i_units = 'Bundle' or i_units = 'Oz') and (i_size = 'extra large' or i_size = 'economy') ) or (i_category = 'Men' and (i_color = 'peru' or i_color = 'cream') and (i_units = 'Case' or i_units = 'Ounce') and (i_size = 'medium' or i_size = 'N/A') ) or (i_category = 'Men' and (i_color = 'purple' or i_color = 'floral') and (i_units = 'Each' or i_units = 'Cup') and (i_size = 'small' or i_size = 'petite') ))) or (i_manufact = i1.i_manufact and ((i_category = 'Women' and (i_color = 'blue' or i_color = 'seashell') and (i_units = 'Pound' or i_units = 'Carton') and (i_size = 'small' or i_size = 'petite') ) or (i_category = 'Women' and (i_color = 'slate' or i_color = 'saddle') and (i_units = 'Gram' or i_units = 'Tsp') and (i_size = 'extra large' or i_size = 'economy') ) or (i_category = 'Men' and (i_color = 'midnight' or i_color = 'chiffon') and (i_units = 'Box' or i_units = 'Ton') and (i_size = 'medium' or i_size = 'N/A') ) or (i_category = 'Men' and (i_color = 'orchid' or i_color = 'magenta') and (i_units = 'Unknown' or i_units = 'Tbl') and (i_size = 'small' or i_size = 'petite') )))) > 0 order by i_product_name limit 100; -- end query 62 in stream 0 using template query41.tpl -- start query 63 in stream 0 using template query8.tpl select s_store_name ,sum(ss_net_profit) from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.store, (select ca_zip from ( SELECT substr(ca_zip,1,5) ca_zip FROM tpcds_2t_baseline.customer_address WHERE substr(ca_zip,1,5) IN ( '43758','76357','20728','59309','19777','27690', '23681','52275','64367','24674','79465', '52936','53936','91889','89248','70394', '66020','56289','45541','29900','99055', '47395','16654','26748','74456','31039', '77674','87076','92273','31667','20150', '84426','75885','61588','57973','29487', '95008','65615','24339','84923','38463', '13811','44227','18570','40389','14584', '33007','61590','47363','57853','43499', '90755','47141','14392','33991','77031', '22854','20127','10624','15730','75295', '98460','17059','26953','82996','17095', '53227','34618','86978','33613','12541', '63977','53929','55459','11516','85350', '99888','23506','10569','66837','50031', '28282','83901','98554','54828','14616', '12743','42473','95507','30542','12883', '95097','61307','32530','37753','53116', '10989','87430','22114','68848','21246', '68327','28446','85870','11697','30541', '22933','70727','17570','55311','73355', '16347','61573','81229','95480','92091', '52603','51232','62666','12173','31993', '98202','78325','46798','63259','34167', '50435','56182','29390','51732','88435', '10366','46637','69283','18218','33324', '24139','16122','53142','16832','98386', '41451','85109','32534','83953','76537', '60857','59939','22271','38788','26296', '59937','14272','98651','38185','16322', '13735','56321','81398','36035','36512', '96290','40596','22748','77965','28512', '15540','20574','72340','81870','31905', '18121','26282','30345','38703','74274', '71129','23244','68810','10106','55461', '25528','71474','37071','21552','81846', '64930','13233','11694','17829','43790', '60379','11482','22714','40977','73320', '13928','78952','92802','66663','95765', '86101','19813','90867','81258','93891', '32755','21548','36452','50931','95773', '57046','14736','30562','44667','80519', '99886','97296','38505','29732','38693', '83898','88032','64442','25944','39303', '70781','92448','64252','89641','88070', '38159','27654','72120','41689','37122', '63776','90416','28479','14787','18038', '39783','50062','28010','13042','86777', '32380','80664','33558','43641','14627', '68858','57733','53458','73016','76141', '42375','12248','38778','50092','80825', '58934','12145','78407','57009','52782', '72140','35635','63926','35282','29292', '30149','33576','95945','48303','56310', '32214','69726','48249','91163','57311', '12361','20491','13551','61620','59648', '44466','53607','18410','99090','37973', '17986','80713','95948','35103','51799', '54707','52269','86117','44909','15530', '28999','80844','62823','46487','15144', '51445','81050','34943','45141','28541', '12414','56922','50548','16422','16780', '53104','60629','24405','61768','48257', '92852','27390','24411','17776','81487', '34848','45773','64188','24209','55276', '11379','33956','46173','67361','32337', '82112','73196','38461','43987','17980', '65414','12247','42107','15326','73018', '59993','85526','50231','60176','23889', '88012','27859','44921','50915','21742', '21272','64763','78761','62002','18502', '42208','49675','69413','46013','67034', '52739','94050','76249','25105','67299', '77588','50637','14333','39372','98030', '79792','12014','56236','61057','51347', '87879','71564','48478','33078','23325', '25526','52855','27570','78396','18695', '24397','76087','35195','97232','29136', '15812','18408','40746','78749') intersect distinct select ca_zip from (SELECT substr(ca_zip,1,5) ca_zip,count(*) cnt FROM tpcds_2t_baseline.customer_address, tpcds_2t_baseline.customer WHERE ca_address_sk = c_current_addr_sk and c_preferred_cust_flag='Y' group by ca_zip having count(*) > 10)A1)A2) V1 where ss_store_sk = s_store_sk and ss_sold_date_sk = d_date_sk and d_qoy = 1 and d_year = 2000 and (substr(s_zip,1,2) = substr(V1.ca_zip,1,2)) group by s_store_name order by s_store_name limit 100; -- end query 63 in stream 0 using template query8.tpl -- start query 64 in stream 0 using template query12.tpl select i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price ,sum(ws_ext_sales_price) as itemrevenue ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over (partition by i_class) as revenueratio from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where ws_item_sk = i_item_sk and i_category in ('Women', 'Children', 'Books') and ws_sold_date_sk = d_date_sk and d_date between date(2001, 02, 28) and date_add(date '2001-02-28', interval 30 day) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100; -- end query 64 in stream 0 using template query12.tpl -- start query 65 in stream 0 using template query20.tpl select i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price ,sum(cs_ext_sales_price) as itemrevenue ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over (partition by i_class) as revenueratio from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where cs_item_sk = i_item_sk and i_category in ('Men', 'Home', 'Music') and cs_sold_date_sk = d_date_sk and d_date between date(1999, 03, 08) and date_add(date '1999-03-08', interval 30 day) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100; -- end query 65 in stream 0 using template query20.tpl -- start query 66 in stream 0 using template query88.tpl select * from (select count(*) h8_30_to_9 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 8 and time_dim.t_minute >= 30 and ((household_demographics.hd_dep_count = -1 and household_demographics.hd_vehicle_count<=-1+2) or (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2)) and store.s_store_name = 'ese') s1, (select count(*) h9_to_9_30 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 9 and time_dim.t_minute < 30 and ((household_demographics.hd_dep_count = -1 and household_demographics.hd_vehicle_count<=-1+2) or (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2)) and store.s_store_name = 'ese') s2, (select count(*) h9_30_to_10 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 9 and time_dim.t_minute >= 30 and ((household_demographics.hd_dep_count = -1 and household_demographics.hd_vehicle_count<=-1+2) or (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2)) and store.s_store_name = 'ese') s3, (select count(*) h10_to_10_30 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 10 and time_dim.t_minute < 30 and ((household_demographics.hd_dep_count = -1 and household_demographics.hd_vehicle_count<=-1+2) or (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2)) and store.s_store_name = 'ese') s4, (select count(*) h10_30_to_11 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 10 and time_dim.t_minute >= 30 and ((household_demographics.hd_dep_count = -1 and household_demographics.hd_vehicle_count<=-1+2) or (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2)) and store.s_store_name = 'ese') s5, (select count(*) h11_to_11_30 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 11 and time_dim.t_minute < 30 and ((household_demographics.hd_dep_count = -1 and household_demographics.hd_vehicle_count<=-1+2) or (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2)) and store.s_store_name = 'ese') s6, (select count(*) h11_30_to_12 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 11 and time_dim.t_minute >= 30 and ((household_demographics.hd_dep_count = -1 and household_demographics.hd_vehicle_count<=-1+2) or (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2)) and store.s_store_name = 'ese') s7, (select count(*) h12_to_12_30 from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.household_demographics , tpcds_2t_baseline.time_dim, tpcds_2t_baseline.store where ss_sold_time_sk = time_dim.t_time_sk and ss_hdemo_sk = household_demographics.hd_demo_sk and ss_store_sk = s_store_sk and time_dim.t_hour = 12 and time_dim.t_minute < 30 and ((household_demographics.hd_dep_count = -1 and household_demographics.hd_vehicle_count<=-1+2) or (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or (household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2)) and store.s_store_name = 'ese') s8 ; -- end query 66 in stream 0 using template query88.tpl -- start query 67 in stream 0 using template query82.tpl select i_item_id ,i_item_desc ,i_current_price from tpcds_2t_baseline.item, tpcds_2t_baseline.inventory, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store_sales where i_current_price between 9 and 9+30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between date(2001, 06, 07) and date_add(date '2001-06-07', interval 60 day) and i_manufact_id in (797,412,331,589) and inv_quantity_on_hand between 100 and 500 and ss_item_sk = i_item_sk group by i_item_id,i_item_desc,i_current_price order by i_item_id limit 100; -- end query 67 in stream 0 using template query82.tpl -- start query 68 in stream 0 using template query23.tpl with frequent_ss_items as (select substr(i_item_desc,1,30) itemdesc,i_item_sk item_sk,d_date solddate,count(*) cnt from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.item where ss_sold_date_sk = d_date_sk and ss_item_sk = i_item_sk and d_year in (2000,2000 + 1,2000 + 2,2000 + 3) group by itemdesc,i_item_sk,d_date having count(*) >4), max_store_sales as (select max(csales) tpcds_cmax from (select c_customer_sk,sum(ss_quantity*ss_sales_price) csales from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.date_dim where ss_customer_sk = c_customer_sk and ss_sold_date_sk = d_date_sk and d_year in (2000,2000+1,2000+2,2000+3) group by c_customer_sk)), best_ss_customer as (select c_customer_sk,sum(ss_quantity*ss_sales_price) ssales from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.customer where ss_customer_sk = c_customer_sk group by c_customer_sk having sum(ss_quantity*ss_sales_price) > (95/100.0) * (select * from max_store_sales)) select c_last_name,c_first_name,sales from (select c_last_name,c_first_name,sum(cs_quantity*cs_list_price) sales from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.date_dim where d_year = 2000 and d_moy = 7 and cs_sold_date_sk = d_date_sk and cs_item_sk in (select item_sk from frequent_ss_items) and cs_bill_customer_sk in (select c_customer_sk from best_ss_customer) and cs_bill_customer_sk = c_customer_sk group by c_last_name,c_first_name union all select c_last_name,c_first_name,sum(ws_quantity*ws_list_price) sales from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.date_dim where d_year = 2000 and d_moy = 7 and ws_sold_date_sk = d_date_sk and ws_item_sk in (select item_sk from frequent_ss_items) and ws_bill_customer_sk in (select c_customer_sk from best_ss_customer) and ws_bill_customer_sk = c_customer_sk group by c_last_name,c_first_name) order by c_last_name,c_first_name,sales limit 100; -- end query 68 in stream 0 using template query23.tpl -- start query 69 in stream 0 using template query14.tpl with cross_items as (select i_item_sk ss_item_sk from tpcds_2t_baseline.item, (select iss.i_brand_id brand_id ,iss.i_class_id class_id ,iss.i_category_id category_id from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.item iss ,tpcds_2t_baseline.date_dim d1 where ss_item_sk = iss.i_item_sk and ss_sold_date_sk = d1.d_date_sk and d1.d_year between 1999 AND 1999 + 2 intersect distinct select ics.i_brand_id ,ics.i_class_id ,ics.i_category_id from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.item ics ,tpcds_2t_baseline.date_dim d2 where cs_item_sk = ics.i_item_sk and cs_sold_date_sk = d2.d_date_sk and d2.d_year between 1999 AND 1999 + 2 intersect distinct select iws.i_brand_id ,iws.i_class_id ,iws.i_category_id from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.item iws ,tpcds_2t_baseline.date_dim d3 where ws_item_sk = iws.i_item_sk and ws_sold_date_sk = d3.d_date_sk and d3.d_year between 1999 AND 1999 + 2) where i_brand_id = brand_id and i_class_id = class_id and i_category_id = category_id ), avg_sales as (select avg(quantity*list_price) average_sales from (select ss_quantity quantity ,ss_list_price list_price from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim where ss_sold_date_sk = d_date_sk and d_year between 1999 and 1999 + 2 union all select cs_quantity quantity ,cs_list_price list_price from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.date_dim where cs_sold_date_sk = d_date_sk and d_year between 1999 and 1999 + 2 union all select ws_quantity quantity ,ws_list_price list_price from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.date_dim where ws_sold_date_sk = d_date_sk and d_year between 1999 and 1999 + 2) x) select channel, i_brand_id,i_class_id,i_category_id,sum(sales), sum(number_sales) from( select 'store' channel, i_brand_id,i_class_id ,i_category_id,sum(ss_quantity*ss_list_price) sales , count(*) number_sales from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where ss_item_sk in (select ss_item_sk from cross_items) and ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and d_year = 1999+2 and d_moy = 11 group by i_brand_id,i_class_id,i_category_id having sum(ss_quantity*ss_list_price) > (select average_sales from avg_sales) union all select 'catalog' channel, i_brand_id,i_class_id,i_category_id, sum(cs_quantity*cs_list_price) sales, count(*) number_sales from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where cs_item_sk in (select ss_item_sk from cross_items) and cs_item_sk = i_item_sk and cs_sold_date_sk = d_date_sk and d_year = 1999+2 and d_moy = 11 group by i_brand_id,i_class_id,i_category_id having sum(cs_quantity*cs_list_price) > (select average_sales from avg_sales) union all select 'web' channel, i_brand_id,i_class_id,i_category_id, sum(ws_quantity*ws_list_price) sales , count(*) number_sales from tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where ws_item_sk in (select ss_item_sk from cross_items) and ws_item_sk = i_item_sk and ws_sold_date_sk = d_date_sk and d_year = 1999+2 and d_moy = 11 group by i_brand_id,i_class_id,i_category_id having sum(ws_quantity*ws_list_price) > (select average_sales from avg_sales) ) y group by rollup (channel, i_brand_id,i_class_id,i_category_id) order by channel,i_brand_id,i_class_id,i_category_id limit 100; -- end query 69 in stream 0 using template query14.tpl -- start query 70 in stream 0 using template query57.tpl with v1 as( select i_category, i_brand, cc_name, d_year, d_moy, sum(cs_sales_price) sum_sales, avg(sum(cs_sales_price)) over (partition by i_category, i_brand, cc_name, d_year) avg_monthly_sales, rank() over (partition by i_category, i_brand, cc_name order by d_year, d_moy) rn from tpcds_2t_baseline.item, tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.call_center where cs_item_sk = i_item_sk and cs_sold_date_sk = d_date_sk and cc_call_center_sk= cs_call_center_sk and ( d_year = 1999 or ( d_year = 1999-1 and d_moy =12) or ( d_year = 1999+1 and d_moy =1) ) group by i_category, i_brand, cc_name , d_year, d_moy), v2 as( select v1.i_category, v1.i_brand ,v1.d_year, v1.d_moy ,v1.avg_monthly_sales ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum from v1, v1 v1_lag, v1 v1_lead where v1.i_category = v1_lag.i_category and v1.i_category = v1_lead.i_category and v1.i_brand = v1_lag.i_brand and v1.i_brand = v1_lead.i_brand and v1. cc_name = v1_lag. cc_name and v1. cc_name = v1_lead. cc_name and v1.rn = v1_lag.rn + 1 and v1.rn = v1_lead.rn - 1) select * from v2 where d_year = 1999 and avg_monthly_sales > 0 and case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1 order by sum_sales - avg_monthly_sales, nsum limit 100; -- end query 70 in stream 0 using template query57.tpl -- start query 71 in stream 0 using template query65.tpl select s_store_name, i_item_desc, sc.revenue, i_current_price, i_wholesale_cost, i_brand from tpcds_2t_baseline.store, tpcds_2t_baseline.item, (select ss_store_sk, avg(revenue) as ave from (select ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim where ss_sold_date_sk = d_date_sk and d_month_seq between 1212 and 1212+11 group by ss_store_sk, ss_item_sk) sa group by ss_store_sk) sb, (select ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim where ss_sold_date_sk = d_date_sk and d_month_seq between 1212 and 1212+11 group by ss_store_sk, ss_item_sk) sc where sb.ss_store_sk = sc.ss_store_sk and sc.revenue <= 0.1 * sb.ave and s_store_sk = sc.ss_store_sk and i_item_sk = sc.ss_item_sk order by s_store_name, i_item_desc limit 100; -- end query 71 in stream 0 using template query65.tpl -- start query 72 in stream 0 using template query71.tpl select i_brand_id brand_id, i_brand brand,t_hour,t_minute, sum(ext_price) ext_price from tpcds_2t_baseline.item, (select ws_ext_sales_price as ext_price, ws_sold_date_sk as sold_date_sk, ws_item_sk as sold_item_sk, ws_sold_time_sk as time_sk from tpcds_2t_baseline.web_sales,tpcds_2t_baseline.date_dim where d_date_sk = ws_sold_date_sk and d_moy=12 and d_year=2002 union all select cs_ext_sales_price as ext_price, cs_sold_date_sk as sold_date_sk, cs_item_sk as sold_item_sk, cs_sold_time_sk as time_sk from tpcds_2t_baseline.catalog_sales,tpcds_2t_baseline.date_dim where d_date_sk = cs_sold_date_sk and d_moy=12 and d_year=2002 union all select ss_ext_sales_price as ext_price, ss_sold_date_sk as sold_date_sk, ss_item_sk as sold_item_sk, ss_sold_time_sk as time_sk from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim where d_date_sk = ss_sold_date_sk and d_moy=12 and d_year=2002 ) tmp,tpcds_2t_baseline.time_dim where sold_item_sk = i_item_sk and i_manager_id=1 and time_sk = t_time_sk and (t_meal_time = 'breakfast' or t_meal_time = 'dinner') group by i_brand, i_brand_id,t_hour,t_minute order by ext_price desc, i_brand_id ; -- end query 72 in stream 0 using template query71.tpl -- start query 73 in stream 0 using template query34.tpl select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim,tpcds_2t_baseline.store,tpcds_2t_baseline.household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28) and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '0-500') and household_demographics.hd_vehicle_count > 0 and (case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end) > 1.2 and date_dim.d_year in (2000,2000+1,2000+2) and store.s_county in ('Williamson County','Walker County','Ziebach County','Ziebach County', 'Ziebach County','Ziebach County','Ziebach County','Ziebach County') group by ss_ticket_number,ss_customer_sk) dn,tpcds_2t_baseline.customer where ss_customer_sk = c_customer_sk and cnt between 15 and 20 order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc, ss_ticket_number; -- end query 73 in stream 0 using template query34.tpl -- start query 74 in stream 0 using template query48.tpl select sum (ss_quantity) from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.store, tpcds_2t_baseline.customer_demographics, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.date_dim where s_store_sk = ss_store_sk and ss_sold_date_sk = d_date_sk and d_year = 1998 and ( ( cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'S' and cd_education_status = 'Secondary' and ss_sales_price between 100.00 and 150.00 ) or ( cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = 'Primary' and ss_sales_price between 50.00 and 100.00 ) or ( cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'W' and cd_education_status = '2 yr Degree' and ss_sales_price between 150.00 and 200.00 ) ) and ( ( ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('ND', 'KY', 'TX') and ss_net_profit between 0 and 2000 ) or (ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'AR', 'GA') and ss_net_profit between 150 and 3000 ) or (ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('NC', 'SD', 'IL') and ss_net_profit between 50 and 25000 ) ) ; -- end query 74 in stream 0 using template query48.tpl -- start query 75 in stream 0 using template query30.tpl with customer_total_return as (select wr_returning_customer_sk as ctr_customer_sk ,ca_state as ctr_state, sum(wr_return_amt) as ctr_total_return from tpcds_2t_baseline.web_returns ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.customer_address where wr_returned_date_sk = d_date_sk and d_year =2001 and wr_returning_addr_sk = ca_address_sk group by wr_returning_customer_sk ,ca_state) select c_customer_id,c_salutation,c_first_name,c_last_name,c_preferred_cust_flag ,c_birth_day,c_birth_month,c_birth_year,c_birth_country,c_login,c_email_address ,c_last_review_date_sk,ctr_total_return from customer_total_return ctr1 ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.customer where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2 from customer_total_return ctr2 where ctr1.ctr_state = ctr2.ctr_state) and ca_address_sk = c_current_addr_sk and ca_state = 'MO' and ctr1.ctr_customer_sk = c_customer_sk order by c_customer_id,c_salutation,c_first_name,c_last_name,c_preferred_cust_flag ,c_birth_day,c_birth_month,c_birth_year,c_birth_country,c_login,c_email_address ,c_last_review_date_sk,ctr_total_return limit 100; -- end query 75 in stream 0 using template query30.tpl -- start query 76 in stream 0 using template query74.tpl with year_total as ( select c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,d_year as year ,sum(ss_net_paid) year_total ,'s' sale_type from tpcds_2t_baseline.customer ,tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim where c_customer_sk = ss_customer_sk and ss_sold_date_sk = d_date_sk and d_year in (1998,1998+1) group by c_customer_id ,c_first_name ,c_last_name ,d_year union all select c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,d_year as year ,sum(ws_net_paid) year_total ,'w' sale_type from tpcds_2t_baseline.customer ,tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.date_dim where c_customer_sk = ws_bill_customer_sk and ws_sold_date_sk = d_date_sk and d_year in (1998,1998+1) group by c_customer_id ,c_first_name ,c_last_name ,d_year ) select t_s_secyear.customer_id, t_s_secyear.customer_first_name, t_s_secyear.customer_last_name from year_total t_s_firstyear ,year_total t_s_secyear ,year_total t_w_firstyear ,year_total t_w_secyear where t_s_secyear.customer_id = t_s_firstyear.customer_id and t_s_firstyear.customer_id = t_w_secyear.customer_id and t_s_firstyear.customer_id = t_w_firstyear.customer_id and t_s_firstyear.sale_type = 's' and t_w_firstyear.sale_type = 'w' and t_s_secyear.sale_type = 's' and t_w_secyear.sale_type = 'w' and t_s_firstyear.year = 1998 and t_s_secyear.year = 1998+1 and t_w_firstyear.year = 1998 and t_w_secyear.year = 1998+1 and t_s_firstyear.year_total > 0 and t_w_firstyear.year_total > 0 and case when t_w_firstyear.year_total > 0 then t_w_secyear.year_total / t_w_firstyear.year_total else null end > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else null end order by 2,1,3 limit 100; -- end query 76 in stream 0 using template query74.tpl -- start query 77 in stream 0 using template query87.tpl select count(*) from ((select distinct c_last_name, c_first_name, d_date from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_customer_sk = customer.c_customer_sk and d_month_seq between 1212 and 1212+11) except distinct (select distinct c_last_name, c_first_name, d_date from tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and d_month_seq between 1212 and 1212+11) except distinct (select distinct c_last_name, c_first_name, d_date from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer where web_sales.ws_sold_date_sk = date_dim.d_date_sk and web_sales.ws_bill_customer_sk = customer.c_customer_sk and d_month_seq between 1212 and 1212+11) ) cool_cust ; -- end query 77 in stream 0 using template query87.tpl -- start query 78 in stream 0 using template query77.tpl with ss as (select s_store_sk, sum(ss_ext_sales_price) as sales, sum(ss_net_profit) as profit from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store where ss_sold_date_sk = d_date_sk and d_date between date(2002, 08, 18) and date_add(date '2002-08-18', interval 30 day) and ss_store_sk = s_store_sk group by s_store_sk) , sr as (select s_store_sk, sum(sr_return_amt) as returns, sum(sr_net_loss) as profit_loss from tpcds_2t_baseline.store_returns, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store where sr_returned_date_sk = d_date_sk and d_date between date(2002, 08, 18) and date_add(date '2002-08-18', interval 30 day) and sr_store_sk = s_store_sk group by s_store_sk), cs as (select cs_call_center_sk, sum(cs_ext_sales_price) as sales, sum(cs_net_profit) as profit from tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.date_dim where cs_sold_date_sk = d_date_sk and d_date between date(2002, 08, 18) and date_add(date '2002-08-18', interval 30 day) group by cs_call_center_sk ), cr as (select cr_call_center_sk, sum(cr_return_amount) as returns, sum(cr_net_loss) as profit_loss from tpcds_2t_baseline.catalog_returns, tpcds_2t_baseline.date_dim where cr_returned_date_sk = d_date_sk and d_date between date(2002, 08, 18) and date_add(date '2002-08-18', interval 30 day) group by cr_call_center_sk ), ws as ( select wp_web_page_sk, sum(ws_ext_sales_price) as sales, sum(ws_net_profit) as profit from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.web_page where ws_sold_date_sk = d_date_sk and d_date between date(2002, 08, 18) and date_add(date '2002-08-18', interval 30 day) and ws_web_page_sk = wp_web_page_sk group by wp_web_page_sk), wr as (select wp_web_page_sk, sum(wr_return_amt) as returns, sum(wr_net_loss) as profit_loss from tpcds_2t_baseline.web_returns, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.web_page where wr_returned_date_sk = d_date_sk and d_date between date(2002, 08, 18) and date_add(date '2002-08-18', interval 30 day) and wr_web_page_sk = wp_web_page_sk group by wp_web_page_sk) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , ss.s_store_sk as id , sales , coalesce(returns, 0) as returns , (profit - coalesce(profit_loss,0)) as profit from ss left join sr on ss.s_store_sk = sr.s_store_sk union all select 'catalog channel' as channel , cs_call_center_sk as id , sales , returns , (profit - profit_loss) as profit from cs , cr union all select 'web channel' as channel , ws.wp_web_page_sk as id , sales , coalesce(returns, 0) returns , (profit - coalesce(profit_loss,0)) as profit from ws left join wr on ws.wp_web_page_sk = wr.wp_web_page_sk ) x group by rollup (channel, id) order by channel ,id limit 100; -- end query 78 in stream 0 using template query77.tpl -- start query 79 in stream 0 using template query73.tpl select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim,tpcds_2t_baseline.store,tpcds_2t_baseline.household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = 'Unknown') and household_demographics.hd_vehicle_count > 0 and case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1 and date_dim.d_year in (1999,1999+1,1999+2) and store.s_county in ('Walker County','Williamson County','Ziebach County','Ziebach County') group by ss_ticket_number,ss_customer_sk) dj, tpcds_2t_baseline.customer where ss_customer_sk = c_customer_sk and cnt between 1 and 5 order by cnt desc, c_last_name asc; -- end query 79 in stream 0 using template query73.tpl -- start query 80 in stream 0 using template query84.tpl select c_customer_id as customer_id , concat(coalesce(c_last_name,''), ', ', coalesce(c_first_name,'')) as customername from tpcds_2t_baseline.customer ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.customer_demographics ,tpcds_2t_baseline.household_demographics ,tpcds_2t_baseline.income_band ,tpcds_2t_baseline.store_returns where ca_city = 'Fairfield' and c_current_addr_sk = ca_address_sk and ib_lower_bound >= 58125 and ib_upper_bound <= 58125 + 50000 and ib_income_band_sk = hd_income_band_sk and cd_demo_sk = c_current_cdemo_sk and hd_demo_sk = c_current_hdemo_sk and sr_cdemo_sk = cd_demo_sk order by c_customer_id limit 100; -- end query 80 in stream 0 using template query84.tpl -- start query 81 in stream 0 using template query54.tpl with my_customers as ( select distinct c_customer_sk , c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, cs_bill_customer_sk customer_sk, cs_item_sk item_sk from tpcds_2t_baseline.catalog_sales union all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, ws_item_sk item_sk from tpcds_2t_baseline.web_sales ) cs_or_ws_sales, tpcds_2t_baseline.item, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 'Children' and i_class = 'toddlers' and c_customer_sk = cs_or_ws_sales.customer_sk and d_moy = 4 and d_year = 1999 ) , my_revenue as ( select c_customer_sk, sum(ss_ext_sales_price) as revenue from my_customers, tpcds_2t_baseline.store_sales, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.store, tpcds_2t_baseline.date_dim where c_current_addr_sk = ca_address_sk and ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and c_customer_sk = ss_customer_sk and d_month_seq between (select distinct d_month_seq+1 from tpcds_2t_baseline.date_dim where d_year = 1999 and d_moy = 4) and (select distinct d_month_seq+3 from tpcds_2t_baseline.date_dim where d_year = 1999 and d_moy = 4) group by c_customer_sk ) , segments as (select cast((revenue/50) as int64) as segment from my_revenue ) select segment, count(*) as num_customers, segment*50 as segment_base from segments group by segment order by segment, num_customers limit 100; -- end query 81 in stream 0 using template query54.tpl -- start query 82 in stream 0 using template query55.tpl select i_brand_id brand_id, i_brand brand, sum(ss_ext_sales_price) ext_price from tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store_sales, tpcds_2t_baseline.item where d_date_sk = ss_sold_date_sk and ss_item_sk = i_item_sk and i_manager_id=76 and d_moy=12 and d_year=1999 group by i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100 ; -- end query 82 in stream 0 using template query55.tpl -- start query 83 in stream 0 using template query56.tpl with ss as ( select i_item_id,sum(ss_ext_sales_price) total_sales from tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_item_id in (select i_item_id from tpcds_2t_baseline.item where i_color in ('blush','hot','orange')) and ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and d_year = 2000 and d_moy = 5 and ss_addr_sk = ca_address_sk and ca_gmt_offset = -5 group by i_item_id), cs as ( select i_item_id,sum(cs_ext_sales_price) total_sales from tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_item_id in (select i_item_id from tpcds_2t_baseline.item where i_color in ('blush','hot','orange')) and cs_item_sk = i_item_sk and cs_sold_date_sk = d_date_sk and d_year = 2000 and d_moy = 5 and cs_bill_addr_sk = ca_address_sk and ca_gmt_offset = -5 group by i_item_id), ws as ( select i_item_id,sum(ws_ext_sales_price) total_sales from tpcds_2t_baseline.web_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.item where i_item_id in (select i_item_id from tpcds_2t_baseline.item where i_color in ('blush','hot','orange')) and ws_item_sk = i_item_sk and ws_sold_date_sk = d_date_sk and d_year = 2000 and d_moy = 5 and ws_bill_addr_sk = ca_address_sk and ca_gmt_offset = -5 group by i_item_id) select i_item_id ,sum(total_sales) total_sales from (select * from ss union all select * from cs union all select * from ws) tmp1 group by i_item_id order by total_sales, i_item_id limit 100; -- end query 83 in stream 0 using template query56.tpl -- start query 84 in stream 0 using template query2.tpl with wscs as (select sold_date_sk ,sales_price from (select ws_sold_date_sk sold_date_sk ,ws_ext_sales_price sales_price from tpcds_2t_baseline.web_sales union all select cs_sold_date_sk sold_date_sk ,cs_ext_sales_price sales_price from tpcds_2t_baseline.catalog_sales)), wswscs as (select d_week_seq, sum(case when (d_day_name='Sunday') then sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then sales_price else null end) sat_sales from wscs ,tpcds_2t_baseline.date_dim where d_date_sk = sold_date_sk group by d_week_seq) select d_week_seq1 ,round(sun_sales1/sun_sales2,2) ,round(mon_sales1/mon_sales2,2) ,round(tue_sales1/tue_sales2,2) ,round(wed_sales1/wed_sales2,2) ,round(thu_sales1/thu_sales2,2) ,round(fri_sales1/fri_sales2,2) ,round(sat_sales1/sat_sales2,2) from (select wswscs.d_week_seq d_week_seq1 ,sun_sales sun_sales1 ,mon_sales mon_sales1 ,tue_sales tue_sales1 ,wed_sales wed_sales1 ,thu_sales thu_sales1 ,fri_sales fri_sales1 ,sat_sales sat_sales1 from wswscs,tpcds_2t_baseline.date_dim where date_dim.d_week_seq = wswscs.d_week_seq and d_year = 1998) y, (select wswscs.d_week_seq d_week_seq2 ,sun_sales sun_sales2 ,mon_sales mon_sales2 ,tue_sales tue_sales2 ,wed_sales wed_sales2 ,thu_sales thu_sales2 ,fri_sales fri_sales2 ,sat_sales sat_sales2 from wswscs ,tpcds_2t_baseline.date_dim where date_dim.d_week_seq = wswscs.d_week_seq and d_year = 1998+1) z where d_week_seq1=d_week_seq2-53 order by d_week_seq1; -- end query 84 in stream 0 using template query2.tpl -- start query 85 in stream 0 using template query26.tpl select i_item_id, avg(cs_quantity) agg1, avg(cs_list_price) agg2, avg(cs_coupon_amt) agg3, avg(cs_sales_price) agg4 from tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.customer_demographics, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.item, tpcds_2t_baseline.promotion where cs_sold_date_sk = d_date_sk and cs_item_sk = i_item_sk and cs_bill_cdemo_sk = cd_demo_sk and cs_promo_sk = p_promo_sk and cd_gender = 'M' and cd_marital_status = 'S' and cd_education_status = '4 yr Degree' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1999 group by i_item_id order by i_item_id limit 100; -- end query 85 in stream 0 using template query26.tpl -- start query 86 in stream 0 using template query40.tpl select w_state ,i_item_id ,sum(case when d_date < date(1998, 03, 13) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_before ,sum(case when d_date >= date(1998, 03, 13) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_after from tpcds_2t_baseline.catalog_sales left outer join tpcds_2t_baseline.catalog_returns on (cs_order_number = cr_order_number and cs_item_sk = cr_item_sk) ,tpcds_2t_baseline.warehouse ,tpcds_2t_baseline.item ,tpcds_2t_baseline.date_dim where i_current_price between 0.99 and 1.49 and i_item_sk = cs_item_sk and cs_warehouse_sk = w_warehouse_sk and cs_sold_date_sk = d_date_sk and d_date between date_sub(date '1998-03-13', interval 30 day) and date_add(date '1998-03-13', interval 30 day) group by w_state,i_item_id order by w_state,i_item_id limit 100; -- end query 86 in stream 0 using template query40.tpl -- start query 87 in stream 0 using template query72.tpl select i_item_desc ,w_warehouse_name ,d1.d_week_seq ,sum(case when p_promo_sk is null then 1 else 0 end) no_promo ,sum(case when p_promo_sk is not null then 1 else 0 end) promo ,count(*) total_cnt from tpcds_2t_baseline.catalog_sales join tpcds_2t_baseline.inventory on (cs_item_sk = inv_item_sk) join tpcds_2t_baseline.warehouse on (w_warehouse_sk=inv_warehouse_sk) join tpcds_2t_baseline.item on (i_item_sk = cs_item_sk) join tpcds_2t_baseline.customer_demographics on (cs_bill_cdemo_sk = cd_demo_sk) join tpcds_2t_baseline.household_demographics on (cs_bill_hdemo_sk = hd_demo_sk) join tpcds_2t_baseline.date_dim d1 on (cs_sold_date_sk = d1.d_date_sk) join tpcds_2t_baseline.date_dim d2 on (inv_date_sk = d2.d_date_sk) join tpcds_2t_baseline.date_dim d3 on (cs_ship_date_sk = d3.d_date_sk) left outer join tpcds_2t_baseline.promotion on (cs_promo_sk=p_promo_sk) left outer join tpcds_2t_baseline.catalog_returns on (cr_item_sk = cs_item_sk and cr_order_number = cs_order_number) where d1.d_week_seq = d2.d_week_seq and inv_quantity_on_hand < cs_quantity and d3.d_date > date_add(d1.d_date, interval 5 day) and hd_buy_potential = '501-1000' and d1.d_year = 2002 and cd_marital_status = 'M' group by i_item_desc,w_warehouse_name,d1.d_week_seq order by total_cnt desc, i_item_desc, w_warehouse_name, d_week_seq limit 100; -- end query 87 in stream 0 using template query72.tpl -- start query 88 in stream 0 using template query53.tpl select * from (select i_manufact_id, sum(ss_sales_price) sum_sales, avg(sum(ss_sales_price)) over (partition by i_manufact_id) avg_quarterly_sales from tpcds_2t_baseline.item, tpcds_2t_baseline.store_sales, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store where ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and ss_store_sk = s_store_sk and d_month_seq in (1202,1202+1,1202+2,1202+3,1202+4,1202+5,1202+6,1202+7,1202+8,1202+9,1202+10,1202+11) and ((i_category in ('Books','Children','Electronics') and i_class in ('personal','portable','reference','self-help') and i_brand in ('scholaramalgamalg #14','scholaramalgamalg #7', 'exportiunivamalg #9','scholaramalgamalg #9')) or(i_category in ('Women','Music','Men') and i_class in ('accessories','classical','fragrances','pants') and i_brand in ('amalgimporto #1','edu packscholar #1','exportiimporto #1', 'importoamalg #1'))) group by i_manufact_id, d_qoy ) tmp1 where case when avg_quarterly_sales > 0 then abs (sum_sales - avg_quarterly_sales)/ avg_quarterly_sales else null end > 0.1 order by avg_quarterly_sales, sum_sales, i_manufact_id limit 100; -- end query 88 in stream 0 using template query53.tpl -- start query 89 in stream 0 using template query79.tpl select c_last_name,c_first_name,substr(s_city,1,30),ss_ticket_number,amt,profit from (select ss_ticket_number ,ss_customer_sk ,store.s_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from tpcds_2t_baseline.store_sales,tpcds_2t_baseline.date_dim,tpcds_2t_baseline.store,tpcds_2t_baseline.household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (household_demographics.hd_dep_count = 9 or household_demographics.hd_vehicle_count > -1) and date_dim.d_dow = 1 and date_dim.d_year in (2000,2000+1,2000+2) and store.s_number_employees between 200 and 295 group by ss_ticket_number,ss_customer_sk,ss_addr_sk,store.s_city) ms, tpcds_2t_baseline.customer where ss_customer_sk = c_customer_sk order by c_last_name,c_first_name,substr(s_city,1,30), profit limit 100; -- end query 89 in stream 0 using template query79.tpl -- start query 90 in stream 0 using template query18.tpl select i_item_id, ca_country, ca_state, ca_county, avg( cast(cs_quantity as numeric)) agg1, avg( cast(cs_list_price as numeric)) agg2, avg( cast(cs_coupon_amt as numeric)) agg3, avg( cast(cs_sales_price as numeric)) agg4, avg( cast(cs_net_profit as numeric)) agg5, avg( cast(c_birth_year as numeric)) agg6, avg( cast(cd1.cd_dep_count as numeric)) agg7 from tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.customer_demographics cd1, tpcds_2t_baseline.customer_demographics cd2, tpcds_2t_baseline.customer, tpcds_2t_baseline.customer_address, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.item where cs_sold_date_sk = d_date_sk and cs_item_sk = i_item_sk and cs_bill_cdemo_sk = cd1.cd_demo_sk and cs_bill_customer_sk = c_customer_sk and cd1.cd_gender = 'F' and cd1.cd_education_status = '4 yr Degree' and c_current_cdemo_sk = cd2.cd_demo_sk and c_current_addr_sk = ca_address_sk and c_birth_month in (4,2,12,10,11,3) and d_year = 2001 and ca_state in ('AR','GA','CO' ,'MS','ND','KS','KY') group by rollup (i_item_id, ca_country, ca_state, ca_county) order by ca_country, ca_state, ca_county, i_item_id limit 100; -- end query 90 in stream 0 using template query18.tpl -- start query 91 in stream 0 using template query13.tpl select avg(ss_quantity) ,avg(ss_ext_sales_price) ,avg(ss_ext_wholesale_cost) ,sum(ss_ext_wholesale_cost) from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store ,tpcds_2t_baseline.customer_demographics ,tpcds_2t_baseline.household_demographics ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.date_dim where s_store_sk = ss_store_sk and ss_sold_date_sk = d_date_sk and d_year = 2001 and((ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'D' and cd_education_status = 'Advanced Degree' and ss_sales_price between 100.00 and 150.00 and hd_dep_count = 3 )or (ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'U' and cd_education_status = '2 yr Degree' and ss_sales_price between 50.00 and 100.00 and hd_dep_count = 1 ) or (ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'W' and cd_education_status = '4 yr Degree' and ss_sales_price between 150.00 and 200.00 and hd_dep_count = 1 )) and((ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('TX', 'OH', 'OK') and ss_net_profit between 100 and 200 ) or (ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('MS', 'NY', 'GA') and ss_net_profit between 150 and 300 ) or (ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('TN', 'IN', 'AL') and ss_net_profit between 50 and 250 )) ; -- end query 91 in stream 0 using template query13.tpl -- start query 92 in stream 0 using template query24.tpl with ssales as (select c_last_name ,c_first_name ,s_store_name ,ca_state ,s_state ,i_color ,i_current_price ,i_manager_id ,i_units ,i_size ,sum(ss_net_profit) netpaid from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store_returns ,tpcds_2t_baseline.store ,tpcds_2t_baseline.item ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.customer_address where ss_ticket_number = sr_ticket_number and ss_item_sk = sr_item_sk and ss_customer_sk = c_customer_sk and ss_item_sk = i_item_sk and ss_store_sk = s_store_sk and c_current_addr_sk = ca_address_sk and c_birth_country <> upper(ca_country) and s_zip = ca_zip and s_market_id=10 group by c_last_name ,c_first_name ,s_store_name ,ca_state ,s_state ,i_color ,i_current_price ,i_manager_id ,i_units ,i_size) select c_last_name ,c_first_name ,s_store_name ,sum(netpaid) paid from ssales where i_color = 'firebrick' group by c_last_name ,c_first_name ,s_store_name having sum(netpaid) > (select 0.05*avg(netpaid) from ssales) order by c_last_name ,c_first_name ,s_store_name ; -- end query 92 in stream 0 using template query24.tpl -- start query 93 in stream 0 using template query4.tpl with year_total as ( select c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,c_preferred_cust_flag customer_preferred_cust_flag ,c_birth_country customer_birth_country ,c_login customer_login ,c_email_address customer_email_address ,d_year dyear ,sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2) year_total ,'s' sale_type from tpcds_2t_baseline.customer ,tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim where c_customer_sk = ss_customer_sk and ss_sold_date_sk = d_date_sk group by c_customer_id ,c_first_name ,c_last_name ,c_preferred_cust_flag ,c_birth_country ,c_login ,c_email_address ,d_year union all select c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,c_preferred_cust_flag customer_preferred_cust_flag ,c_birth_country customer_birth_country ,c_login customer_login ,c_email_address customer_email_address ,d_year dyear ,sum((((cs_ext_list_price-cs_ext_wholesale_cost-cs_ext_discount_amt)+cs_ext_sales_price)/2) ) year_total ,'c' sale_type from tpcds_2t_baseline.customer ,tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.date_dim where c_customer_sk = cs_bill_customer_sk and cs_sold_date_sk = d_date_sk group by c_customer_id ,c_first_name ,c_last_name ,c_preferred_cust_flag ,c_birth_country ,c_login ,c_email_address ,d_year union all select c_customer_id customer_id ,c_first_name customer_first_name ,c_last_name customer_last_name ,c_preferred_cust_flag customer_preferred_cust_flag ,c_birth_country customer_birth_country ,c_login customer_login ,c_email_address customer_email_address ,d_year dyear ,sum((((ws_ext_list_price-ws_ext_wholesale_cost-ws_ext_discount_amt)+ws_ext_sales_price)/2) ) year_total ,'w' sale_type from tpcds_2t_baseline.customer ,tpcds_2t_baseline.web_sales ,tpcds_2t_baseline.date_dim where c_customer_sk = ws_bill_customer_sk and ws_sold_date_sk = d_date_sk group by c_customer_id ,c_first_name ,c_last_name ,c_preferred_cust_flag ,c_birth_country ,c_login ,c_email_address ,d_year ) select t_s_secyear.customer_id ,t_s_secyear.customer_first_name ,t_s_secyear.customer_last_name ,t_s_secyear.customer_preferred_cust_flag from year_total t_s_firstyear ,year_total t_s_secyear ,year_total t_c_firstyear ,year_total t_c_secyear ,year_total t_w_firstyear ,year_total t_w_secyear where t_s_secyear.customer_id = t_s_firstyear.customer_id and t_s_firstyear.customer_id = t_c_secyear.customer_id and t_s_firstyear.customer_id = t_c_firstyear.customer_id and t_s_firstyear.customer_id = t_w_firstyear.customer_id and t_s_firstyear.customer_id = t_w_secyear.customer_id and t_s_firstyear.sale_type = 's' and t_c_firstyear.sale_type = 'c' and t_w_firstyear.sale_type = 'w' and t_s_secyear.sale_type = 's' and t_c_secyear.sale_type = 'c' and t_w_secyear.sale_type = 'w' and t_s_firstyear.dyear = 1999 and t_s_secyear.dyear = 1999+1 and t_c_firstyear.dyear = 1999 and t_c_secyear.dyear = 1999+1 and t_w_firstyear.dyear = 1999 and t_w_secyear.dyear = 1999+1 and t_s_firstyear.year_total > 0 and t_c_firstyear.year_total > 0 and t_w_firstyear.year_total > 0 and case when t_c_firstyear.year_total > 0 then t_c_secyear.year_total / t_c_firstyear.year_total else null end > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else null end and case when t_c_firstyear.year_total > 0 then t_c_secyear.year_total / t_c_firstyear.year_total else null end > case when t_w_firstyear.year_total > 0 then t_w_secyear.year_total / t_w_firstyear.year_total else null end order by t_s_secyear.customer_id ,t_s_secyear.customer_first_name ,t_s_secyear.customer_last_name ,t_s_secyear.customer_preferred_cust_flag limit 100; -- end query 93 in stream 0 using template query4.tpl -- start query 94 in stream 0 using template query99.tpl select substr(w_warehouse_name,1,20) as warehouse_name ,sm_type ,cc_name ,sum(case when (cs_ship_date_sk - cs_sold_date_sk <= 30 ) then 1 else 0 end) as _30_days ,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 30) and (cs_ship_date_sk - cs_sold_date_sk <= 60) then 1 else 0 end ) as _31_to_60_days ,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 60) and (cs_ship_date_sk - cs_sold_date_sk <= 90) then 1 else 0 end) as _61_to_90_days ,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 90) and (cs_ship_date_sk - cs_sold_date_sk <= 120) then 1 else 0 end) as _91_to_120_days ,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 120) then 1 else 0 end) as over_120_days from tpcds_2t_baseline.catalog_sales ,tpcds_2t_baseline.warehouse ,tpcds_2t_baseline.ship_mode ,tpcds_2t_baseline.call_center ,tpcds_2t_baseline.date_dim where d_month_seq between 1222 and 1222 + 11 and cs_ship_date_sk = d_date_sk and cs_warehouse_sk = w_warehouse_sk and cs_ship_mode_sk = sm_ship_mode_sk and cs_call_center_sk = cc_call_center_sk group by warehouse_name ,sm_type ,cc_name order by warehouse_name ,sm_type ,cc_name limit 100; -- end query 94 in stream 0 using template query99.tpl -- start query 95 in stream 0 using template query68.tpl select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.store ,tpcds_2t_baseline.household_demographics ,tpcds_2t_baseline.customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 6 or household_demographics.hd_vehicle_count= 1) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Midway','Pleasant Hill') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.customer_address current_addr where ss_customer_sk = c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100; -- end query 95 in stream 0 using template query68.tpl -- start query 96 in stream 0 using template query83.tpl with sr_items as (select i_item_id item_id, sum(sr_return_quantity) sr_item_qty from tpcds_2t_baseline.store_returns, tpcds_2t_baseline.item, tpcds_2t_baseline.date_dim where sr_item_sk = i_item_sk and d_date in (select d_date from tpcds_2t_baseline.date_dim where d_week_seq in (select d_week_seq from tpcds_2t_baseline.date_dim where d_date in ('1998-05-29','1998-08-19','1998-11-10'))) and sr_returned_date_sk = d_date_sk group by i_item_id), cr_items as (select i_item_id item_id, sum(cr_return_quantity) cr_item_qty from tpcds_2t_baseline.catalog_returns, tpcds_2t_baseline.item, tpcds_2t_baseline.date_dim where cr_item_sk = i_item_sk and d_date in (select d_date from tpcds_2t_baseline.date_dim where d_week_seq in (select d_week_seq from tpcds_2t_baseline.date_dim where d_date in ('1998-05-29','1998-08-19','1998-11-10'))) and cr_returned_date_sk = d_date_sk group by i_item_id), wr_items as (select i_item_id item_id, sum(wr_return_quantity) wr_item_qty from tpcds_2t_baseline.web_returns, tpcds_2t_baseline.item, tpcds_2t_baseline.date_dim where wr_item_sk = i_item_sk and d_date in (select d_date from tpcds_2t_baseline.date_dim where d_week_seq in (select d_week_seq from tpcds_2t_baseline.date_dim where d_date in ('1998-05-29','1998-08-19','1998-11-10'))) and wr_returned_date_sk = d_date_sk group by i_item_id) select sr_items.item_id ,sr_item_qty ,sr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 sr_dev ,cr_item_qty ,cr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 cr_dev ,wr_item_qty ,wr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 wr_dev ,(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 average from sr_items ,cr_items ,wr_items where sr_items.item_id=cr_items.item_id and sr_items.item_id=wr_items.item_id order by sr_items.item_id ,sr_item_qty limit 100; -- end query 96 in stream 0 using template query83.tpl -- start query 97 in stream 0 using template query61.tpl select promotions,total,cast(promotions as numeric)/cast(total as numeric)*100 from (select sum(ss_ext_sales_price) promotions from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store ,tpcds_2t_baseline.promotion ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.item where ss_sold_date_sk = d_date_sk and ss_store_sk = s_store_sk and ss_promo_sk = p_promo_sk and ss_customer_sk= c_customer_sk and ca_address_sk = c_current_addr_sk and ss_item_sk = i_item_sk and ca_gmt_offset = -6 and i_category = 'Sports' and (p_channel_dmail = 'Y' or p_channel_email = 'Y' or p_channel_tv = 'Y') and s_gmt_offset = -6 and d_year = 1998 and d_moy = 12) promotional_sales, (select sum(ss_ext_sales_price) total from tpcds_2t_baseline.store_sales ,tpcds_2t_baseline.store ,tpcds_2t_baseline.date_dim ,tpcds_2t_baseline.customer ,tpcds_2t_baseline.customer_address ,tpcds_2t_baseline.item where ss_sold_date_sk = d_date_sk and ss_store_sk = s_store_sk and ss_customer_sk= c_customer_sk and ca_address_sk = c_current_addr_sk and ss_item_sk = i_item_sk and ca_gmt_offset = -6 and i_category = 'Sports' and s_gmt_offset = -6 and d_year = 1998 and d_moy = 12) all_sales order by promotions, total limit 100; -- end query 97 in stream 0 using template query61.tpl -- start query 98 in stream 0 using template query5.tpl with ssr as (select s_store_id, sum(sales_price) as sales, sum(profit) as profit, sum(return_amt) as returns, sum(net_loss) as profit_loss from ( select ss_store_sk as store_sk, ss_sold_date_sk as date_sk, ss_ext_sales_price as sales_price, ss_net_profit as profit, cast(0 as numeric) as return_amt, cast(0 as numeric) as net_loss from tpcds_2t_baseline.store_sales union all select sr_store_sk as store_sk, sr_returned_date_sk as date_sk, cast(0 as numeric) as sales_price, cast(0 as numeric) as profit, sr_return_amt as return_amt, sr_net_loss as net_loss from tpcds_2t_baseline.store_returns ) salesreturns, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.store where date_sk = d_date_sk and d_date between date(1998, 08, 21) and date_add(date '1998-08-21', interval 14 day) and store_sk = s_store_sk group by s_store_id) , csr as (select cp_catalog_page_id, sum(sales_price) as sales, sum(profit) as profit, sum(return_amt) as returns, sum(net_loss) as profit_loss from ( select cs_catalog_page_sk as page_sk, cs_sold_date_sk as date_sk, cs_ext_sales_price as sales_price, cs_net_profit as profit, cast(0 as numeric) as return_amt, cast(0 as numeric) as net_loss from tpcds_2t_baseline.catalog_sales union all select cr_catalog_page_sk as page_sk, cr_returned_date_sk as date_sk, cast(0 as numeric) as sales_price, cast(0 as numeric) as profit, cr_return_amount as return_amt, cr_net_loss as net_loss from tpcds_2t_baseline.catalog_returns ) salesreturns, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.catalog_page where date_sk = d_date_sk and d_date between date(1998, 08, 21) and date_add(date '1998-08-21', interval 14 day) and page_sk = cp_catalog_page_sk group by cp_catalog_page_id) , wsr as (select web_site_id, sum(sales_price) as sales, sum(profit) as profit, sum(return_amt) as returns, sum(net_loss) as profit_loss from ( select ws_web_site_sk as wsr_web_site_sk, ws_sold_date_sk as date_sk, ws_ext_sales_price as sales_price, ws_net_profit as profit, cast(0 as numeric) as return_amt, cast(0 as numeric) as net_loss from tpcds_2t_baseline.web_sales union all select ws_web_site_sk as wsr_web_site_sk, wr_returned_date_sk as date_sk, cast(0 as numeric) as sales_price, cast(0 as numeric) as profit, wr_return_amt as return_amt, wr_net_loss as net_loss from tpcds_2t_baseline.web_returns left outer join tpcds_2t_baseline.web_sales on ( wr_item_sk = ws_item_sk and wr_order_number = ws_order_number) ) salesreturns, tpcds_2t_baseline.date_dim, tpcds_2t_baseline.web_site where date_sk = d_date_sk and d_date between date(1998, 08, 21) and date_add(date '1998-08-21', interval 14 day) and wsr_web_site_sk = web_site_sk group by web_site_id) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , concat('store', s_store_id) as id , sales , returns , (profit - profit_loss) as profit from ssr union all select 'catalog channel' as channel , concat('catalog_page', cp_catalog_page_id) as id , sales , returns , (profit - profit_loss) as profit from csr union all select 'web channel' as channel , concat('web_site', web_site_id) as id , sales , returns , (profit - profit_loss) as profit from wsr ) x group by rollup (channel, id) order by channel ,id limit 100; -- end query 98 in stream 0 using template query5.tpl -- start query 99 in stream 0 using template query76.tpl select channel, col_name, d_year, d_qoy, i_category, COUNT(*) sales_cnt, SUM(ext_sales_price) sales_amt FROM ( SELECT 'store' as channel, 'ss_addr_sk' col_name, d_year, d_qoy, i_category, ss_ext_sales_price ext_sales_price FROM tpcds_2t_baseline.store_sales, tpcds_2t_baseline.item, tpcds_2t_baseline.date_dim WHERE ss_addr_sk IS NULL AND ss_sold_date_sk=d_date_sk AND ss_item_sk=i_item_sk UNION ALL SELECT 'web' as channel, 'ws_web_page_sk' col_name, d_year, d_qoy, i_category, ws_ext_sales_price ext_sales_price FROM tpcds_2t_baseline.web_sales, tpcds_2t_baseline.item, tpcds_2t_baseline.date_dim WHERE ws_web_page_sk IS NULL AND ws_sold_date_sk=d_date_sk AND ws_item_sk=i_item_sk UNION ALL SELECT 'catalog' as channel, 'cs_ship_mode_sk' col_name, d_year, d_qoy, i_category, cs_ext_sales_price ext_sales_price FROM tpcds_2t_baseline.catalog_sales, tpcds_2t_baseline.item, tpcds_2t_baseline.date_dim WHERE cs_ship_mode_sk IS NULL AND cs_sold_date_sk=d_date_sk AND cs_item_sk=i_item_sk) foo GROUP BY channel, col_name, d_year, d_qoy, i_category ORDER BY channel, col_name, d_year, d_qoy, i_category limit 100; -- END OF BENCHMARK
the_stack
-- Note this procedure is not included in the regular build, it -- is called during the post deployment process. -- This is due to the fact it updates temporal tables, and SSDT -- will throw up an error when this occurs, despite the fact we -- have procedures to deactivate the temporal tables and reactivate -- when done. DROP PROCEDURE IF EXISTS DataLoadSimulation.UpdateCustomFields; GO CREATE PROCEDURE DataLoadSimulation.UpdateCustomFields @CurrentDateTime AS date WITH EXECUTE AS OWNER AS BEGIN DECLARE @StartingWhen datetime2(7) = CAST(@CurrentDateTime AS date); SET @StartingWhen = DATEADD(hour, 23, @StartingWhen); -- Populate custom data for stock items UPDATE Warehouse.StockItems SET CustomFields = N'{ "CountryOfManufacture": ' + CASE WHEN IsChillerStock <> 0 THEN N'"USA", "ShelfLife": "7 days"' WHEN StockItemName LIKE N'%USB food%' THEN N'"Japan"' ELSE N'"China"' END + N', "Tags": []' + CASE WHEN Size IN (N'S', N'XS', N'XXS', N'3XS') THEN N', "Range": "Children"' WHEN Size IN (N'M') THEN N', "Range": "Teens/Young Adult"' WHEN Size IN (N'L', N'XL', N'XXL', N'3XL', N'4XL', N'5XL', N'6XL', N'7XL') THEN N', "Range": "Adult"' ELSE N'' END + CASE WHEN StockItemName LIKE N'RC %' THEN N', "MinimumAge": "10"' ELSE N'' END + N' }', ValidFrom = @StartingWhen; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'Radio Control'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'RC %'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'Realistic Sound'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'RC %'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'Vintage'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%vintage%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'Halloween Fun'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%halloween%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'Super Value'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%pack of%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'So Realistic'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%ride on%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'Comfortable'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%slipper%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'Long Battery Life'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%slipper%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', CASE WHEN StockItemID % 2 = 0 THEN N'32GB' ELSE N'16GB' END), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%USB food%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'Comedy'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%joke%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Warehouse.StockItems SET CustomFields = JSON_MODIFY(CustomFields, N'append $.Tags', N'USB Powered'), ValidFrom = @StartingWhen WHERE StockItemName LIKE N'%USB%'; SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE si SET si.CustomFields = JSON_MODIFY(si.CustomFields, N'append $.Tags', N'Limited Stock'), ValidFrom = @StartingWhen FROM Warehouse.StockItems AS si WHERE EXISTS (SELECT 1 FROM Warehouse.StockItemStockGroups AS sisg INNER JOIN Warehouse.StockGroups AS sg ON sisg.StockGroupID = sg.StockGroupID WHERE si.StockItemID = sisg.StockItemID AND sg.StockGroupName LIKE N'%Packaging%'); -- populate custom data for employees and salespeople SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); DECLARE EmployeeList CURSOR FAST_FORWARD READ_ONLY FOR SELECT PersonID, IsSalesperson FROM [Application].People WHERE IsEmployee <> 0; DECLARE @EmployeeID int; DECLARE @IsSalesperson bit; DECLARE @CustomFields nvarchar(max); DECLARE @JobTitle nvarchar(max); DECLARE @NumberOfAdditionalLanguages int; DECLARE @LanguageCounter int; DECLARE @OtherLanguages TABLE ( LanguageName nvarchar(50) ); DECLARE @LanguageName nvarchar(50); OPEN EmployeeList; FETCH NEXT FROM EmployeeList INTO @EmployeeID, @IsSalesperson; WHILE @@FETCH_STATUS = 0 BEGIN SET @CustomFields = N'{ "OtherLanguages": [] }'; SET @NumberOfAdditionalLanguages = FLOOR(RAND() * 4); DELETE @OtherLanguages; SET @LanguageCounter = 0; WHILE @LanguageCounter < @NumberOfAdditionalLanguages BEGIN SET @LanguageName = (SELECT TOP(1) alias FROM sys.syslanguages WHERE alias NOT LIKE N'%English%' AND alias NOT LIKE N'%Brazil%' ORDER BY NEWID()); IF @LanguageName LIKE N'%Chinese%' SET @LanguageName = N'Chinese'; IF NOT EXISTS (SELECT 1 FROM @OtherLanguages WHERE LanguageName = @LanguageName) BEGIN INSERT @OtherLanguages (LanguageName) VALUES(@LanguageName); SET @CustomFields = JSON_MODIFY(@CustomFields, N'append $.OtherLanguages', @LanguageName); END; SET @LanguageCounter += 1; END; SET @CustomFields = JSON_MODIFY(@CustomFields, N'$.HireDate', CONVERT(nvarchar(20), DATEADD(day, 0 - CEILING(RAND() * 2000) - 100, '20130101'), 126)); SET @JobTitle = N'Team Member'; SET @JobTitle = CASE WHEN RAND() < 0.05 THEN N'General Manager' WHEN RAND() < 0.1 THEN N'Manager' WHEN RAND() < 0.15 THEN N'Accounts Controller' WHEN RAND() < 0.2 THEN N'Warehouse Supervisor' ELSE @JobTitle END; SET @CustomFields = JSON_MODIFY(@CustomFields, N'$.Title', @JobTitle); IF @IsSalesperson <> 0 BEGIN SET @CustomFields = JSON_MODIFY(@CustomFields, N'$.PrimarySalesTerritory', (SELECT TOP(1) SalesTerritory FROM [Application].StateProvinces ORDER BY NEWID())); SET @CustomFields = JSON_MODIFY(@CustomFields, N'$.CommissionRate', CAST(CAST(RAND() * 5 AS decimal(18,2)) AS nvarchar(20))); END; UPDATE [Application].People SET CustomFields = @CustomFields, ValidFrom = @StartingWhen WHERE PersonID = @EmployeeID; FETCH NEXT FROM EmployeeList INTO @EmployeeID, @IsSalesperson; END; CLOSE EmployeeList; DEALLOCATE EmployeeList; -- Set user preferences SET @StartingWhen = DATEADD(minute, 1, @StartingWhen); UPDATE Application.People SET UserPreferences = N'{"theme":"'+ (CASE (PersonID % 7) WHEN 0 THEN 'ui-darkness' WHEN 1 THEN 'blitzer' WHEN 2 THEN 'humanity' WHEN 3 THEN 'dark-hive' WHEN 4 THEN 'ui-darkness' WHEN 5 THEN 'le-frog' WHEN 6 THEN 'black-tie' ELSE 'ui-lightness' END) + N'","dateFormat":"' + CASE (PersonID % 10) WHEN 0 THEN 'mm/dd/yy' WHEN 1 THEN 'yy-mm-dd' WHEN 2 THEN 'dd/mm/yy' WHEN 3 THEN 'DD, MM d, yy' WHEN 4 THEN 'dd/mm/yy' WHEN 5 THEN 'dd/mm/yy' WHEN 6 THEN 'mm/dd/yy' ELSE 'mm/dd/yy' END + N'","timeZone": "PST"' + N',"table":{"pagingType":"' + CASE (PersonID % 5) WHEN 0 THEN 'numbers' WHEN 1 THEN 'full_numbers' WHEN 2 THEN 'full' WHEN 3 THEN 'simple_numbers' ELSE 'simple' END + N'","pageLength": ' + CASE (PersonID % 5) WHEN 0 THEN '10' WHEN 1 THEN '25' WHEN 2 THEN '50' WHEN 3 THEN '10' ELSE '10' END + N'},"favoritesOnDashboard":true}', ValidFrom = @StartingWhen WHERE UserPreferences IS NOT NULL; END; GO
the_stack
CREATE OR REPLACE TYPE BODY json_value AS /* Copyright (c) 2010 Jonas Krogsboell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ CONSTRUCTOR FUNCTION json_value (object_or_array SYS.ANYDATA) RETURN SELF AS RESULT AS BEGIN CASE object_or_array.gettypename WHEN SYS_CONTEXT ('userenv', 'current_schema') || '.JSON_LIST' THEN self.typeval := 2; WHEN SYS_CONTEXT ('userenv', 'current_schema') || '.JSON' THEN self.typeval := 1; ELSE raise_application_error ( -20102, 'JSON_Value init error (JSON or JSON\_List allowed)'); END CASE; self.object_or_array := object_or_array; IF (self.object_or_array IS NULL) THEN self.typeval := 6; END IF; RETURN; END json_value; CONSTRUCTOR FUNCTION json_value (str VARCHAR2, esc BOOLEAN DEFAULT TRUE) RETURN SELF AS RESULT AS BEGIN self.typeval := 3; IF (esc) THEN self.num := 1; ELSE self.num := 0; END IF; --message to pretty printer self.str := str; RETURN; END json_value; CONSTRUCTOR FUNCTION json_value (str CLOB, esc BOOLEAN DEFAULT TRUE) RETURN SELF AS RESULT AS amount NUMBER := 32767; BEGIN self.typeval := 3; IF (esc) THEN self.num := 1; ELSE self.num := 0; END IF; --message to pretty printer IF (DBMS_LOB.getlength (str) > 32767) THEN extended_str := str; END IF; DBMS_LOB.read (str, amount, 1, self.str); RETURN; END json_value; CONSTRUCTOR FUNCTION json_value (num NUMBER) RETURN SELF AS RESULT AS BEGIN self.typeval := 4; self.num := num; IF (self.num IS NULL) THEN self.typeval := 6; END IF; RETURN; END json_value; CONSTRUCTOR FUNCTION json_value (b BOOLEAN) RETURN SELF AS RESULT AS BEGIN self.typeval := 5; self.num := 0; IF (b) THEN self.num := 1; END IF; IF (b IS NULL) THEN self.typeval := 6; END IF; RETURN; END json_value; CONSTRUCTOR FUNCTION json_value RETURN SELF AS RESULT AS BEGIN self.typeval := 6; /* for JSON null */ RETURN; END json_value; STATIC FUNCTION makenull RETURN json_value AS BEGIN RETURN json_value; END makenull; MEMBER FUNCTION get_type RETURN VARCHAR2 AS BEGIN CASE self.typeval WHEN 1 THEN RETURN 'object'; WHEN 2 THEN RETURN 'array'; WHEN 3 THEN RETURN 'string'; WHEN 4 THEN RETURN 'number'; WHEN 5 THEN RETURN 'bool'; WHEN 6 THEN RETURN 'null'; END CASE; RETURN 'unknown type'; END get_type; MEMBER FUNCTION get_string (max_byte_size NUMBER DEFAULT NULL, max_char_size NUMBER DEFAULT NULL) RETURN VARCHAR2 AS BEGIN IF (self.typeval = 3) THEN IF (max_byte_size IS NOT NULL) THEN RETURN SUBSTRB (self.str, 1, max_byte_size); ELSIF (max_char_size IS NOT NULL) THEN RETURN SUBSTR (self.str, 1, max_char_size); ELSE RETURN self.str; END IF; END IF; RETURN NULL; END get_string; MEMBER PROCEDURE get_string (self IN json_value, buf IN OUT NOCOPY CLOB) AS BEGIN IF (self.typeval = 3) THEN IF (extended_str IS NOT NULL) THEN DBMS_LOB.COPY (buf, extended_str, DBMS_LOB.getlength (extended_str)); ELSE DBMS_LOB.writeappend (buf, LENGTH (self.str), self.str); END IF; END IF; END get_string; MEMBER FUNCTION get_number RETURN NUMBER AS BEGIN IF (self.typeval = 4) THEN RETURN self.num; END IF; RETURN NULL; END get_number; MEMBER FUNCTION get_bool RETURN BOOLEAN AS BEGIN IF (self.typeval = 5) THEN RETURN self.num = 1; END IF; RETURN NULL; END get_bool; MEMBER FUNCTION get_null RETURN VARCHAR2 AS BEGIN IF (self.typeval = 6) THEN RETURN 'null'; END IF; RETURN NULL; END get_null; MEMBER FUNCTION is_object RETURN BOOLEAN AS BEGIN RETURN self.typeval = 1; END; MEMBER FUNCTION is_array RETURN BOOLEAN AS BEGIN RETURN self.typeval = 2; END; MEMBER FUNCTION is_string RETURN BOOLEAN AS BEGIN RETURN self.typeval = 3; END; MEMBER FUNCTION is_number RETURN BOOLEAN AS BEGIN RETURN self.typeval = 4; END; MEMBER FUNCTION is_bool RETURN BOOLEAN AS BEGIN RETURN self.typeval = 5; END; MEMBER FUNCTION is_null RETURN BOOLEAN AS BEGIN RETURN self.typeval = 6; END; /* Output methods */ MEMBER FUNCTION TO_CHAR (spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 0) RETURN VARCHAR2 AS BEGIN IF (spaces IS NULL) THEN RETURN json_printer.pretty_print_any ( self, line_length => chars_per_line); ELSE RETURN json_printer.pretty_print_any ( self, spaces, line_length => chars_per_line); END IF; END; MEMBER PROCEDURE TO_CLOB ( self IN json_value, buf IN OUT NOCOPY CLOB, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, erase_clob BOOLEAN DEFAULT TRUE) AS BEGIN IF (spaces IS NULL) THEN json_printer.pretty_print_any (self, FALSE, buf, line_length => chars_per_line, erase_clob => erase_clob); ELSE json_printer.pretty_print_any (self, spaces, buf, line_length => chars_per_line, erase_clob => erase_clob); END IF; END; MEMBER PROCEDURE PRINT (self IN json_value, spaces BOOLEAN DEFAULT TRUE, chars_per_line NUMBER DEFAULT 8192, jsonp VARCHAR2 DEFAULT NULL) AS --32512 is the real maximum in sqldeveloper my_clob CLOB; BEGIN my_clob := EMPTY_CLOB (); DBMS_LOB.createtemporary (my_clob, TRUE); json_printer.pretty_print_any ( self, spaces, my_clob, CASE WHEN (chars_per_line > 32512) THEN 32512 ELSE chars_per_line END); json_printer.dbms_output_clob (my_clob, json_printer.newline_char, jsonp); DBMS_LOB.freetemporary (my_clob); END; MEMBER PROCEDURE HTP (self IN json_value, spaces BOOLEAN DEFAULT FALSE, chars_per_line NUMBER DEFAULT 0, jsonp VARCHAR2 DEFAULT NULL) AS my_clob CLOB; BEGIN my_clob := EMPTY_CLOB (); DBMS_LOB.createtemporary (my_clob, TRUE); json_printer.pretty_print_any (self, spaces, my_clob, chars_per_line); json_printer.htp_output_clob (my_clob, jsonp); DBMS_LOB.freetemporary (my_clob); END; MEMBER FUNCTION value_of (self IN json_value, max_byte_size NUMBER DEFAULT NULL, max_char_size NUMBER DEFAULT NULL) RETURN VARCHAR2 AS BEGIN CASE self.typeval WHEN 1 THEN RETURN 'json object'; WHEN 2 THEN RETURN 'json array'; WHEN 3 THEN RETURN self.get_string (max_byte_size, max_char_size); WHEN 4 THEN RETURN self.get_number (); WHEN 5 THEN IF (self.get_bool ()) THEN RETURN 'true'; ELSE RETURN 'false'; END IF; ELSE RETURN NULL; END CASE; END; END; /
the_stack
-- 2017-10-07T17:32:20.767 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Window_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:32:20','YYYY-MM-DD HH24:MI:SS'),Name='ESR Payment Import' WHERE AD_Window_ID=540159 AND AD_Language='en_US' ; -- 2017-10-07T17:32:58.850 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:32:58','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Payment Import',WEBUI_NameBrowse='ESR Payment Import' WHERE AD_Menu_ID=540891 AND AD_Language='en_US' ; -- 2017-10-07T17:33:37.759 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:33:37','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Date',Description='',Help='' WHERE AD_Field_ID=550768 AND AD_Language='en_US' ; -- 2017-10-07T17:33:50.179 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:33:50','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Bankaccounnt',Description='' WHERE AD_Field_ID=551431 AND AD_Language='en_US' ; -- 2017-10-07T17:34:02.870 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:34:02','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Receipt',Description='' WHERE AD_Field_ID=551042 AND AD_Language='en_US' ; -- 2017-10-07T17:34:15.469 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:34:15','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Description' WHERE AD_Field_ID=550796 AND AD_Language='en_US' ; -- 2017-10-07T17:34:27.207 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:34:27','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Valid',Description='',Help='' WHERE AD_Field_ID=551052 AND AD_Language='en_US' ; -- 2017-10-07T17:34:40.169 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:34:40','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Processed',Description='',Help='' WHERE AD_Field_ID=551030 AND AD_Language='en_US' ; -- 2017-10-07T17:34:58.087 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:34:58','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Qty Transactions',Description='' WHERE AD_Field_ID=559451 AND AD_Language='nl_NL' ; -- 2017-10-07T17:35:23.920 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:35:23','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Sum Control Amount' WHERE AD_Field_ID=551051 AND AD_Language='en_US' ; -- 2017-10-07T17:35:42.966 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:35:42','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Payment Import' WHERE AD_Field_ID=550771 AND AD_Language='en_US' ; -- 2017-10-07T17:36:13.159 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:36:13','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Data Type',Description='' WHERE AD_Field_ID=558526 AND AD_Language='en_US' ; -- 2017-10-07T17:36:54.984 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:36:54','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Control Qty Transactions' WHERE AD_Field_ID=551083 AND AD_Language='en_US' ; -- 2017-10-07T17:39:22.732 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:39:22','YYYY-MM-DD HH24:MI:SS'),Name='Bankaccount' WHERE AD_Field_ID=551431 AND AD_Language='en_US' ; -- 2017-10-07T17:39:55.123 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:39:55','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Line',Description='' WHERE AD_Field_ID=550790 AND AD_Language='en_US' ; -- 2017-10-07T17:40:19.595 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:40:19','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Payment Import' WHERE AD_Field_ID=550783 AND AD_Language='en_US' ; -- 2017-10-07T17:40:35.701 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:40:35','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Processed',Description='',Help='' WHERE AD_Field_ID=551033 AND AD_Language='en_US' ; -- 2017-10-07T17:40:47.844 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:40:47','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Status Import' WHERE AD_Field_ID=551043 AND AD_Language='en_US' ; -- 2017-10-07T17:41:07.213 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:41:07','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Invoice Grandtotal',Description='' WHERE AD_Field_ID=551778 AND AD_Language='en_US' ; -- 2017-10-07T17:41:24.310 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:41:24','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Invoice Open Amount',Description='' WHERE AD_Field_ID=551779 AND AD_Language='en_US' ; -- 2017-10-07T17:41:35.402 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:41:35','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Amount',Description='',Help='' WHERE AD_Field_ID=550778 AND AD_Language='en_US' ; -- 2017-10-07T17:41:43.991 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:41:43','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Action' WHERE AD_Field_ID=551681 AND AD_Language='en_US' ; -- 2017-10-07T17:41:54.758 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:41:54','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Error Message' WHERE AD_Field_ID=550855 AND AD_Language='en_US' ; -- 2017-10-07T17:42:07.643 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:42:07','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Transaction type' WHERE AD_Field_ID=550794 AND AD_Language='en_US' ; -- 2017-10-07T17:42:25.605 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:42:25','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Reference No.',Description='' WHERE AD_Field_ID=550792 AND AD_Language='en_US' ; -- 2017-10-07T17:42:39.853 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:42:39','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Manual Reference No.' WHERE AD_Field_ID=551870 AND AD_Language='en_US' ; -- 2017-10-07T17:43:08.368 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:43:08','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Post Finance Member No.',Description='' WHERE AD_Field_ID=550791 AND AD_Language='en_US' ; -- 2017-10-07T17:43:20.687 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:43:20','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Bankaccount',Description='' WHERE AD_Field_ID=551172 AND AD_Language='en_US' ; -- 2017-10-07T17:43:34.665 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:43:34','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Description='',Help='' WHERE AD_Field_ID=550857 AND AD_Language='en_US' ; -- 2017-10-07T17:43:50.977 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:43:50','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Organisation' WHERE AD_Field_ID=550789 AND AD_Language='en_US' ; -- 2017-10-07T17:44:04.969 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:44:04','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Businesspartner',Description='',Help='' WHERE AD_Field_ID=550856 AND AD_Language='en_US' ; -- 2017-10-07T17:44:21.362 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:44:21','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Business Partner No.',Description='' WHERE AD_Field_ID=550788 AND AD_Language='en_US' ; -- 2017-10-07T17:44:30.177 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:44:30','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Invoice' WHERE AD_Field_ID=550858 AND AD_Language='en_US' ; -- 2017-10-07T17:44:43.377 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:44:43','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Invoice No.',Description='' WHERE AD_Field_ID=551900 AND AD_Language='en_US' ; -- 2017-10-07T17:44:59.553 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:44:59','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Invoice manually allocated' WHERE AD_Field_ID=551883 AND AD_Language='en_US' ; -- 2017-10-07T17:45:14.664 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:45:14','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Allocated' WHERE AD_Field_ID=551848 AND AD_Language='en_US' ; -- 2017-10-07T17:45:25.058 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:45:25','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Date Posted' WHERE AD_Field_ID=550779 AND AD_Language='en_US' ; -- 2017-10-07T17:45:36.657 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:45:36','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Date Payment' WHERE AD_Field_ID=550777 AND AD_Language='en_US' ; -- 2017-10-07T17:45:47.667 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:45:47','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Description' WHERE AD_Field_ID=550795 AND AD_Language='en_US' ; -- 2017-10-07T17:45:56.668 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:45:56','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Payment' WHERE AD_Field_ID=551032 AND AD_Language='en_US' ; -- 2017-10-07T17:46:07.861 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:46:07','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Valid',Description='',Help='' WHERE AD_Field_ID=551031 AND AD_Language='en_US' ; -- 2017-10-07T17:46:27.908 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:46:27','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Imported ESR Record',Description='' WHERE AD_Field_ID=550785 AND AD_Language='en_US' ; -- 2017-10-07T17:47:00.244 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:47:00','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Allocation Error',Description='' WHERE AD_Field_ID=558657 AND AD_Language='en_US' ; -- 2017-10-07T17:47:34.181 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:47:34','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Bankaccount No.',Description='' WHERE AD_Field_ID=550786 AND AD_Language='en_US' ; -- 2017-10-07T17:47:58.148 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:47:58','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Import Line' WHERE AD_Field_ID=550784 AND AD_Language='en_US' ; -- 2017-10-07T17:48:18.415 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546252 ; -- 2017-10-07T17:48:18.424 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546257 ; -- 2017-10-07T17:48:18.425 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546258 ; -- 2017-10-07T17:48:18.427 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546259 ; -- 2017-10-07T17:48:18.427 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546260 ; -- 2017-10-07T17:48:18.428 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546262 ; -- 2017-10-07T17:48:18.429 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546269 ; -- 2017-10-07T17:48:18.430 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546271 ; -- 2017-10-07T17:48:18.431 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546275 ; -- 2017-10-07T17:48:18.432 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=100,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546276 ; -- 2017-10-07T17:48:18.433 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2017-10-07 17:48:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546332 ; -- 2017-10-07T17:49:18.462 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=110,Updated=TO_TIMESTAMP('2017-10-07 17:49:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546334 ; -- 2017-10-07T17:49:42.179 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=120,Updated=TO_TIMESTAMP('2017-10-07 17:49:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546335 ; -- 2017-10-07T17:49:50.497 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=130,Updated=TO_TIMESTAMP('2017-10-07 17:49:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546336 ; -- 2017-10-07T17:49:58.273 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=140,Updated=TO_TIMESTAMP('2017-10-07 17:49:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546337 ; -- 2017-10-07T17:50:05.168 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=150,Updated=TO_TIMESTAMP('2017-10-07 17:50:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546338 ; -- 2017-10-07T17:50:11.400 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=160,Updated=TO_TIMESTAMP('2017-10-07 17:50:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546339 ; -- 2017-10-07T17:50:18.905 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=170,Updated=TO_TIMESTAMP('2017-10-07 17:50:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546340 ; -- 2017-10-07T17:50:27.775 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=180,Updated=TO_TIMESTAMP('2017-10-07 17:50:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546341 ; -- 2017-10-07T17:50:36.044 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=190,Updated=TO_TIMESTAMP('2017-10-07 17:50:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546342 ; -- 2017-10-07T17:50:45.126 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=200,Updated=TO_TIMESTAMP('2017-10-07 17:50:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546343 ; -- 2017-10-07T17:50:53.494 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=210,Updated=TO_TIMESTAMP('2017-10-07 17:50:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546344 ; -- 2017-10-07T17:50:59.741 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=220,Updated=TO_TIMESTAMP('2017-10-07 17:50:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546345 ; -- 2017-10-07T17:51:06.301 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=230,Updated=TO_TIMESTAMP('2017-10-07 17:51:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546346 ; -- 2017-10-07T17:51:12.796 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=240,Updated=TO_TIMESTAMP('2017-10-07 17:51:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546347 ; -- 2017-10-07T17:51:21.764 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=250,Updated=TO_TIMESTAMP('2017-10-07 17:51:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546348 ; -- 2017-10-07T17:51:28.207 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=260,Updated=TO_TIMESTAMP('2017-10-07 17:51:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546349 ; -- 2017-10-07T17:51:35.172 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=270,Updated=TO_TIMESTAMP('2017-10-07 17:51:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546350 ; -- 2017-10-07T17:51:41.634 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=280,Updated=TO_TIMESTAMP('2017-10-07 17:51:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546351 ; -- 2017-10-07T17:51:45.777 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_ElementGroup WHERE AD_UI_ElementGroup_ID=540794 ; -- 2017-10-07T17:51:48.634 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Column WHERE AD_UI_Column_ID=540459 ; -- 2017-10-07T17:51:57.186 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Section_Trl WHERE AD_UI_Section_ID=540336 ; -- 2017-10-07T17:51:57.189 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Section WHERE AD_UI_Section_ID=540336 ; -- 2017-10-07T17:52:09.035 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=290,Updated=TO_TIMESTAMP('2017-10-07 17:52:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546332 ; -- 2017-10-07T17:52:16.257 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=540787, SeqNo=300,Updated=TO_TIMESTAMP('2017-10-07 17:52:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546333 ; -- 2017-10-07T17:52:20.112 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_ElementGroup WHERE AD_UI_ElementGroup_ID=540793 ; -- 2017-10-07T17:52:23.392 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Column WHERE AD_UI_Column_ID=540458 ; -- 2017-10-07T17:52:27.016 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Section_Trl WHERE AD_UI_Section_ID=540335 ; -- 2017-10-07T17:52:27.021 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Section WHERE AD_UI_Section_ID=540335 ; -- 2017-10-07T17:53:14.317 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-10-07 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546269 ; -- 2017-10-07T17:53:14.318 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-10-07 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546271 ; -- 2017-10-07T17:53:14.319 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-10-07 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546257 ; -- 2017-10-07T17:53:14.321 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-10-07 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546258 ; -- 2017-10-07T17:53:14.322 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-10-07 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546259 ; -- 2017-10-07T17:53:14.323 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-10-07 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546260 ; -- 2017-10-07T17:53:14.324 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-10-07 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546262 ; -- 2017-10-07T17:53:31.205 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=10,Updated=TO_TIMESTAMP('2017-10-07 17:53:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546252 ; -- 2017-10-07T17:53:31.208 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=20,Updated=TO_TIMESTAMP('2017-10-07 17:53:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546269 ; -- 2017-10-07T17:53:31.209 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=30,Updated=TO_TIMESTAMP('2017-10-07 17:53:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546271 ; -- 2017-10-07T17:53:31.210 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=40,Updated=TO_TIMESTAMP('2017-10-07 17:53:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546257 ; -- 2017-10-07T17:56:56.757 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546282 ; -- 2017-10-07T17:56:56.760 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546283 ; -- 2017-10-07T17:56:56.763 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546284 ; -- 2017-10-07T17:56:56.770 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546285 ; -- 2017-10-07T17:56:56.773 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546286 ; -- 2017-10-07T17:56:56.778 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546287 ; -- 2017-10-07T17:56:56.782 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546292 ; -- 2017-10-07T17:56:56.786 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546293 ; -- 2017-10-07T17:56:56.790 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546294 ; -- 2017-10-07T17:56:56.794 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546295 ; -- 2017-10-07T17:56:56.797 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546296 ; -- 2017-10-07T17:56:56.799 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546290 ; -- 2017-10-07T17:56:56.801 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546291 ; -- 2017-10-07T17:56:56.803 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546298 ; -- 2017-10-07T17:56:56.805 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546301 ; -- 2017-10-07T17:56:56.806 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546302 ; -- 2017-10-07T17:56:56.807 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546299 ; -- 2017-10-07T17:56:56.809 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546303 ; -- 2017-10-07T17:56:56.810 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546304 ; -- 2017-10-07T17:56:56.812 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546305 ; -- 2017-10-07T17:56:56.813 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546307 ; -- 2017-10-07T17:56:56.814 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546309 ; -- 2017-10-07T17:56:56.815 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546311 ; -- 2017-10-07T17:56:56.816 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546314 ; -- 2017-10-07T17:56:56.818 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546317 ; -- 2017-10-07T17:56:56.819 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546319 ; -- 2017-10-07T17:56:56.820 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546320 ; -- 2017-10-07T17:56:56.821 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546310 ; -- 2017-10-07T17:56:56.822 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546300 ; -- 2017-10-07T17:56:56.823 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546312 ; -- 2017-10-07T17:56:56.823 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546313 ; -- 2017-10-07T17:56:56.824 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546308 ; -- 2017-10-07T17:56:56.825 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546288 ; -- 2017-10-07T17:56:56.826 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546297 ; -- 2017-10-07T17:56:56.827 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546316 ; -- 2017-10-07T17:56:56.827 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546289 ; -- 2017-10-07T17:56:56.828 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=100,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546318 ; -- 2017-10-07T17:56:56.829 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2017-10-07 17:56:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546315 ; -- 2017-10-07T17:57:11.748 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=10,Updated=TO_TIMESTAMP('2017-10-07 17:57:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546310 ; -- 2017-10-07T17:57:11.749 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=20,Updated=TO_TIMESTAMP('2017-10-07 17:57:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546312 ; -- 2017-10-07T17:57:11.750 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=30,Updated=TO_TIMESTAMP('2017-10-07 17:57:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546300 ; -- 2017-10-07T17:57:28.626 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:57:28','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Date Posted' WHERE AD_Field_ID=555063 AND AD_Language='en_US' ; -- 2017-10-07T17:57:42.202 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:57:42','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Business Partner',Description='',Help='' WHERE AD_Field_ID=555074 AND AD_Language='en_US' ; -- 2017-10-07T17:57:49.849 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:57:49','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Invoice' WHERE AD_Field_ID=555086 AND AD_Language='en_US' ; -- 2017-10-07T17:58:14.070 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:58:14','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=555078 AND AD_Language='en_US' ; -- 2017-10-07T17:58:24.326 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:58:24','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Action' WHERE AD_Field_ID=555071 AND AD_Language='en_US' ; -- 2017-10-07T17:58:43.870 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:58:43','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Invoice Grandtotal',Description='' WHERE AD_Field_ID=555087 AND AD_Language='en_US' ; -- 2017-10-07T17:58:57.841 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:58:57','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Open Amount',Description='' WHERE AD_Field_ID=555082 AND AD_Language='en_US' ; -- 2017-10-07T17:59:09.310 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:59:09','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Amount',Description='',Help='' WHERE AD_Field_ID=555062 AND AD_Language='en_US' ; -- 2017-10-07T17:59:20.532 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:59:20','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Error Message' WHERE AD_Field_ID=555073 AND AD_Language='en_US' ; -- 2017-10-07T17:59:31.223 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:59:31','YYYY-MM-DD HH24:MI:SS'),Description='',Help='' WHERE AD_Field_ID=555083 AND AD_Language='en_US' ; -- 2017-10-07T17:59:41.786 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:59:41','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Description' WHERE AD_Field_ID=555061 AND AD_Language='en_US' ; -- 2017-10-07T17:59:58.880 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 17:59:58','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Reference No.',Description='' WHERE AD_Field_ID=555067 AND AD_Language='en_US' ; -- 2017-10-07T18:00:06.552 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:00:06','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Payment' WHERE AD_Field_ID=555093 AND AD_Language='en_US' ; -- 2017-10-07T18:00:15.342 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:00:15','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Date Payment' WHERE AD_Field_ID=555092 AND AD_Language='en_US' ; -- 2017-10-07T18:00:23.157 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:00:23','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Allocated' WHERE AD_Field_ID=555060 AND AD_Language='en_US' ; -- 2017-10-07T18:00:32.647 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:00:32','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Line',Description='' WHERE AD_Field_ID=555084 AND AD_Language='en_US' ; -- 2017-10-07T18:00:41.971 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:00:41','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Transaction Type' WHERE AD_Field_ID=555090 AND AD_Language='en_US' ; -- 2017-10-07T18:00:56.952 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:00:56','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Port Finance Member No.',Description='' WHERE AD_Field_ID=555085 AND AD_Language='en_US' ; -- 2017-10-07T18:01:08.077 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:01:08','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Bankaccount',Description='' WHERE AD_Field_ID=555059 AND AD_Language='en_US' ; -- 2017-10-07T18:01:19.406 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:01:19','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Invoice No.',Description='' WHERE AD_Field_ID=555066 AND AD_Language='en_US' ; -- 2017-10-07T18:01:36.635 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:01:36','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Business Partner No.',Description='' WHERE AD_Field_ID=555075 AND AD_Language='en_US' ; -- 2017-10-07T18:01:46.391 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:01:46','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Organisation' WHERE AD_Field_ID=555068 AND AD_Language='en_US' ; -- 2017-10-07T18:01:58.853 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:01:58','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Processed',Description='',Help='' WHERE AD_Field_ID=555091 AND AD_Language='en_US' ; -- 2017-10-07T18:02:08.909 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:02:08','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Valid',Description='',Help='' WHERE AD_Field_ID=555076 AND AD_Language='en_US' ; -- 2017-10-07T18:02:30.774 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:02:30','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Manual Reference No.' WHERE AD_Field_ID=555072 AND AD_Language='en_US' ; -- 2017-10-07T18:02:43.399 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:02:43','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Manual',Description='',Help='' WHERE AD_Field_ID=555081 AND AD_Language='en_US' ; -- 2017-10-07T18:03:04.065 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:03:04','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Imported ESR Record',Description='' WHERE AD_Field_ID=555077 AND AD_Language='en_US' ; -- 2017-10-07T18:03:16.834 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:03:16','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Allocation Error',Description='' WHERE AD_Field_ID=558658 AND AD_Language='nl_NL' ; -- 2017-10-07T18:03:36.585 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:03:36','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Payment Import' WHERE AD_Field_ID=555069 AND AD_Language='en_US' ; -- 2017-10-07T18:03:52.403 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:03:52','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Bank Account No.',Description='',Help='' WHERE AD_Field_ID=555079 AND AD_Language='en_US' ; -- 2017-10-07T18:04:00.810 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:04:00','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Reference No.' WHERE AD_Field_ID=555088 AND AD_Language='en_US' ; -- 2017-10-07T18:04:34.223 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:04:34','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='ESR Import Line' WHERE AD_Field_ID=555070 AND AD_Language='en_US' ; -- 2017-10-07T18:05:25.173 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:05:25','YYYY-MM-DD HH24:MI:SS'),Name='Open Amount' WHERE AD_Field_ID=551779 AND AD_Language='en_US' ; -- 2017-10-07T18:05:34.285 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:05:34','YYYY-MM-DD HH24:MI:SS'),Name='Transaction Type' WHERE AD_Field_ID=550794 AND AD_Language='en_US' ; -- 2017-10-07T18:06:05.478 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-07 18:06:05','YYYY-MM-DD HH24:MI:SS'),Name='Business Partner' WHERE AD_Field_ID=550856 AND AD_Language='en_US' ; -- 2017-10-07T18:08:37.657 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Datum',Updated=TO_TIMESTAMP('2017-10-07 18:08:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=550768 ; -- 2017-10-07T18:09:00.313 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=-1.000000000000,Updated=TO_TIMESTAMP('2017-10-07 18:09:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=550768 ; -- 2017-10-07T18:09:09.555 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=558526 ; -- 2017-10-07T18:09:31.403 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=1.000000000000,Updated=TO_TIMESTAMP('2017-10-07 18:09:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=550790 ; -- 2017-10-07T18:09:38.459 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551778 ; -- 2017-10-07T18:09:40.035 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551779 ; -- 2017-10-07T18:09:41.140 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551681 ; -- 2017-10-07T18:09:42.251 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551870 ; -- 2017-10-07T18:09:43.506 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551900 ; -- 2017-10-07T18:09:44.272 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551883 ; -- 2017-10-07T18:09:45.354 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=551848 ; -- 2017-10-07T18:09:48.465 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:09:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=558657 ; -- 2017-10-07T18:10:06.580 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=1.000000000000,Updated=TO_TIMESTAMP('2017-10-07 18:10:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=555084 ; -- 2017-10-07T18:10:17.582 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=NULL,Updated=TO_TIMESTAMP('2017-10-07 18:10:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=558658 ; -- 2017-10-07T18:10:55.178 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y',Updated=TO_TIMESTAMP('2017-10-07 18:10:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=547551 ; -- 2017-10-07T18:11:08.216 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=10,Updated=TO_TIMESTAMP('2017-10-07 18:11:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=547551 ; -- 2017-10-07T18:11:08.223 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=20,Updated=TO_TIMESTAMP('2017-10-07 18:11:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=548231 ; -- 2017-10-07T18:11:08.230 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsSelectionColumn='Y', SelectionColumnSeqNo=30,Updated=TO_TIMESTAMP('2017-10-07 18:11:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=547544 ;
the_stack
BEGIN; -- version CREATE OR REPLACE FUNCTION gd_version() RETURNS text AS $$ SELECT '2.2.1'::text; $$ LANGUAGE SQL IMMUTABLE; -- default time zone CREATE OR REPLACE FUNCTION gd_time_zone() RETURNS text AS $$ SELECT 'Etc/UTC'::text; $$ LANGUAGE SQL IMMUTABLE; -- default week start CREATE OR REPLACE FUNCTION gd_week_start() RETURNS int AS $$ SELECT 6; -- mon=0, tue=1, wed=2, thu=3, fri=4, sat=5, sun=6 $$ LANGUAGE SQL IMMUTABLE; -- second CREATE OR REPLACE FUNCTION gd_second(timestamptz) RETURNS timestamptz AS $$ SELECT DATE_TRUNC('second', $1)::timestamptz; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_second(timestamp) RETURNS timestamptz AS $$ SELECT gd_second($1::timestamptz); $$ LANGUAGE SQL STABLE; -- minute CREATE OR REPLACE FUNCTION gd_minute(timestamptz) RETURNS timestamptz AS $$ SELECT DATE_TRUNC('minute', $1)::timestamptz; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_minute(timestamp) RETURNS timestamptz AS $$ SELECT gd_minute($1::timestamptz); $$ LANGUAGE SQL STABLE; -- hour CREATE OR REPLACE FUNCTION gd_hour(timestamptz) RETURNS timestamptz AS $$ SELECT DATE_TRUNC('hour', $1)::timestamptz; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_hour(timestamp) RETURNS timestamptz AS $$ SELECT gd_hour($1::timestamptz); $$ LANGUAGE SQL STABLE; -- day CREATE OR REPLACE FUNCTION gd_day(date) RETURNS date AS $$ SELECT $1; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day(date, text) RETURNS date AS $$ SELECT gd_day($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day(timestamptz, text) RETURNS date AS $$ SELECT DATE_TRUNC('day', $1 AT TIME ZONE $2)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day(timestamp, text) RETURNS date AS $$ SELECT gd_day($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day(timestamptz) RETURNS date AS $$ SELECT gd_day($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day(timestamp) RETURNS date AS $$ SELECT gd_day($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- week CREATE OR REPLACE FUNCTION gd_week(date) RETURNS date AS $$ SELECT (DATE_TRUNC('week', $1 - (gd_week_start() || ' day')::interval) + (gd_week_start() || ' day')::interval)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_week(date, text) RETURNS date AS $$ SELECT gd_week($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_week(timestamptz, text) RETURNS date AS $$ SELECT (DATE_TRUNC('week', ($1 - (gd_week_start() || ' day')::interval) AT TIME ZONE $2) + (gd_week_start() || ' day')::interval)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_week(timestamp, text) RETURNS date AS $$ SELECT gd_week($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_week(timestamptz) RETURNS date AS $$ SELECT gd_week($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_week(timestamp) RETURNS date AS $$ SELECT gd_week($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- month CREATE OR REPLACE FUNCTION gd_month(date) RETURNS date AS $$ SELECT DATE_TRUNC('month', $1)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month(date, text) RETURNS date AS $$ SELECT gd_month($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month(timestamptz, text) RETURNS date AS $$ SELECT DATE_TRUNC('month', $1 AT TIME ZONE $2)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month(timestamp, text) RETURNS date AS $$ SELECT gd_month($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month(timestamptz) RETURNS date AS $$ SELECT gd_month($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month(timestamp) RETURNS date AS $$ SELECT gd_month($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- quarter CREATE OR REPLACE FUNCTION gd_quarter(date) RETURNS date AS $$ SELECT DATE_TRUNC('quarter', $1)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_quarter(date, text) RETURNS date AS $$ SELECT gd_quarter($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_quarter(timestamptz, text) RETURNS date AS $$ SELECT DATE_TRUNC('quarter', $1 AT TIME ZONE $2)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_quarter(timestamp, text) RETURNS date AS $$ SELECT gd_quarter($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_quarter(timestamptz) RETURNS date AS $$ SELECT gd_quarter($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_quarter(timestamp) RETURNS date AS $$ SELECT gd_quarter($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- year CREATE OR REPLACE FUNCTION gd_year(date) RETURNS date AS $$ SELECT DATE_TRUNC('year', $1)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_year(date, text) RETURNS date AS $$ SELECT gd_year($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_year(timestamptz, text) RETURNS date AS $$ SELECT DATE_TRUNC('year', $1 AT TIME ZONE $2)::date; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_year(timestamp, text) RETURNS date AS $$ SELECT gd_year($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_year(timestamptz) RETURNS date AS $$ SELECT gd_year($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_year(timestamp) RETURNS date AS $$ SELECT gd_year($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- hour of day CREATE OR REPLACE FUNCTION gd_hour_of_day(timestamptz, text) RETURNS integer AS $$ SELECT EXTRACT(HOUR FROM $1 AT TIME ZONE $2)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_hour_of_day(timestamp, text) RETURNS integer AS $$ SELECT gd_hour_of_day($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_hour_of_day(timestamptz) RETURNS integer AS $$ SELECT gd_hour_of_day($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_hour_of_day(timestamp) RETURNS integer AS $$ SELECT gd_hour_of_day($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- day of week CREATE OR REPLACE FUNCTION gd_day_of_week(date) RETURNS integer AS $$ SELECT EXTRACT(DOW FROM $1)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_week(date, text) RETURNS integer AS $$ SELECT gd_day_of_week($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_week(timestamptz, text) RETURNS integer AS $$ SELECT EXTRACT(DOW FROM $1 AT TIME ZONE $2)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_week(timestamp, text) RETURNS integer AS $$ SELECT gd_day_of_week($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_week(timestamptz) RETURNS integer AS $$ SELECT gd_day_of_week($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_week(timestamp) RETURNS integer AS $$ SELECT gd_day_of_week($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- day of month CREATE OR REPLACE FUNCTION gd_day_of_month(date) RETURNS integer AS $$ SELECT EXTRACT(DAY FROM $1)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_month(date, text) RETURNS integer AS $$ SELECT gd_day_of_month($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_month(timestamptz, text) RETURNS integer AS $$ SELECT EXTRACT(DAY FROM $1 AT TIME ZONE $2)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_month(timestamp, text) RETURNS integer AS $$ SELECT gd_day_of_month($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_month(timestamptz) RETURNS integer AS $$ SELECT gd_day_of_month($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_month(timestamp) RETURNS integer AS $$ SELECT gd_day_of_month($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- day of year CREATE OR REPLACE FUNCTION gd_day_of_year(date) RETURNS integer AS $$ SELECT EXTRACT(DOY FROM $1)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_year(date, text) RETURNS integer AS $$ SELECT gd_day_of_year($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_year(timestamptz, text) RETURNS integer AS $$ SELECT EXTRACT(DOY FROM $1 AT TIME ZONE $2)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_year(timestamp, text) RETURNS integer AS $$ SELECT gd_day_of_year($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_year(timestamptz) RETURNS integer AS $$ SELECT gd_day_of_year($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_day_of_year(timestamp) RETURNS integer AS $$ SELECT gd_day_of_year($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- month of year CREATE OR REPLACE FUNCTION gd_month_of_year(date) RETURNS integer AS $$ SELECT EXTRACT(MONTH FROM $1)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month_of_year(date, text) RETURNS integer AS $$ SELECT gd_month_of_year($1); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month_of_year(timestamptz, text) RETURNS integer AS $$ SELECT EXTRACT(MONTH FROM $1 AT TIME ZONE $2)::integer; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month_of_year(timestamp, text) RETURNS integer AS $$ SELECT gd_month_of_year($1::timestamptz, $2); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month_of_year(timestamptz) RETURNS integer AS $$ SELECT gd_month_of_year($1, gd_time_zone()); $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_month_of_year(timestamp) RETURNS integer AS $$ SELECT gd_month_of_year($1::timestamptz, gd_time_zone()); $$ LANGUAGE SQL STABLE; -- period CREATE OR REPLACE FUNCTION gd_period(text, timestamp) RETURNS date AS $$ SELECT CASE WHEN $1 = 'day' THEN gd_day($2) WHEN $1 = 'week' THEN gd_week($2) WHEN $1 = 'month' THEN gd_month($2) WHEN $1 = 'quarter' THEN gd_quarter($2) WHEN $1 = 'year' THEN gd_year($2) ELSE NULL END; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_period(text, timestamptz) RETURNS date AS $$ SELECT CASE WHEN $1 = 'day' THEN gd_day($2) WHEN $1 = 'week' THEN gd_week($2) WHEN $1 = 'month' THEN gd_month($2) WHEN $1 = 'quarter' THEN gd_quarter($2) WHEN $1 = 'year' THEN gd_year($2) ELSE NULL END; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_period(text, date) RETURNS date AS $$ SELECT CASE WHEN $1 = 'day' THEN gd_day($2) WHEN $1 = 'week' THEN gd_week($2) WHEN $1 = 'month' THEN gd_month($2) WHEN $1 = 'quarter' THEN gd_quarter($2) WHEN $1 = 'year' THEN gd_year($2) ELSE NULL END; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_period(text, timestamp, text) RETURNS date AS $$ SELECT CASE WHEN $1 = 'day' THEN gd_day($2, $3) WHEN $1 = 'week' THEN gd_week($2, $3) WHEN $1 = 'month' THEN gd_month($2, $3) WHEN $1 = 'quarter' THEN gd_quarter($2, $3) WHEN $1 = 'year' THEN gd_year($2, $3) ELSE NULL END; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_period(text, timestamptz, text) RETURNS date AS $$ SELECT CASE WHEN $1 = 'day' THEN gd_day($2, $3) WHEN $1 = 'week' THEN gd_week($2, $3) WHEN $1 = 'month' THEN gd_month($2, $3) WHEN $1 = 'quarter' THEN gd_quarter($2, $3) WHEN $1 = 'year' THEN gd_year($2, $3) ELSE NULL END; $$ LANGUAGE SQL STABLE; CREATE OR REPLACE FUNCTION gd_period(text, date, text) RETURNS date AS $$ SELECT CASE WHEN $1 = 'day' THEN gd_day($2, $3) WHEN $1 = 'week' THEN gd_week($2, $3) WHEN $1 = 'month' THEN gd_month($2, $3) WHEN $1 = 'quarter' THEN gd_quarter($2, $3) WHEN $1 = 'year' THEN gd_year($2, $3) ELSE NULL END; $$ LANGUAGE SQL STABLE; COMMIT;
the_stack
####################### # create procedure to generate the MLB season ####################### DELIMITER $$ DROP PROCEDURE IF EXISTS generateNFLSeason $$ CREATE PROCEDURE generateNFLSeason() BEGIN /* Each team plays each team in their own division twice */ DECLARE v_date_offset INT DEFAULT 0; DECLARE v_event_date DATETIME; DECLARE v_sport_division_short_name VARCHAR(10); DECLARE v_day_increment INT; DECLARE div_done INT DEFAULT FALSE; DECLARE div_cur CURSOR FOR SELECT distinct sport_division_short_name FROM sport_team WHERE sport_type_name = 'football' AND sport_league_short_name = 'NFL'; DECLARE CONTINUE HANDLER FOR NOT FOUND SET div_done = TRUE; OPEN div_cur; div_loop: LOOP FETCH NEXT FROM div_cur INTO v_sport_division_short_name; IF div_done THEN CLOSE div_cur; LEAVE div_loop; END IF; SET v_date_offset = 0; BLOCK1: BEGIN DECLARE v_team1_id INT; DECLARE v_team1_home_field_id INT; DECLARE team1_done INT DEFAULT FALSE; DECLARE team1 CURSOR FOR SELECT id, home_field_id FROM sport_team WHERE sport_division_short_name = v_sport_division_short_name AND sport_type_name = 'football' AND sport_league_short_name = 'NFL' order by id; DECLARE CONTINUE HANDLER FOR NOT FOUND SET team1_done = TRUE; OPEN team1; team1_loop: LOOP FETCH NEXT FROM team1 INTO v_team1_id, v_team1_home_field_id; IF team1_done THEN CLOSE team1; LEAVE team1_loop; END IF; /* start on the closest sunday to sept 1 of the current year */ SET v_day_increment = 1 - DAYOFWEEK(STR_TO_DATE(concat('01,9,',DATE_FORMAT(NOW(),'%Y')),'%d,%m,%Y')); SET v_event_date = DATE_ADD(STR_TO_DATE(concat('01,9,',DATE_FORMAT(NOW(),'%Y')),'%d,%m,%Y'), INTERVAL v_day_increment + 7*v_date_offset DAY); BLOCK2: BEGIN DECLARE v_team2_id INT; DECLARE v_team2_home_field_id INT; DECLARE team2_done INT DEFAULT FALSE; DECLARE team2 CURSOR FOR SELECT id, home_field_id FROM sport_team WHERE ID > v_team1_id AND sport_division_short_name = v_sport_division_short_name AND sport_type_name = 'football' AND sport_league_short_name = 'NFL' ORDER BY id; DECLARE CONTINUE HANDLER FOR NOT FOUND SET team2_done = TRUE; open team2; team2_loop: LOOP FETCH NEXT FROM team2 INTO v_team2_id, v_team2_home_field_id; IF team2_done THEN CLOSE team2; LEAVE team2_loop; END IF; INSERT INTO sporting_event(sport_type_name, home_team_id, away_team_id, location_id,start_date_time,start_date) VALUES('football', v_team1_id, v_team2_id, v_team1_home_field_id, DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR),v_event_date ); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); END LOOP; END BLOCK2; BLOCK3: BEGIN DECLARE v_team3_id INT; DECLARE v_team3_home_field_id INT; DECLARE team3_done INT DEFAULT FALSE; DECLARE team3 CURSOR FOR SELECT id, home_field_id FROM sport_team WHERE id < v_team1_id AND sport_division_short_name = v_sport_division_short_name AND sport_Type_name = 'football' AND sport_league_short_name = 'NFL' ORDER BY id; DECLARE CONTINUE HANDLER FOR NOT FOUND SET team3_done = TRUE; OPEN team3; team3_loop: LOOP FETCH NEXT FROM team3 INTO v_team3_id, v_team3_home_field_id; IF team3_done THEN CLOSE team3; LEAVE team3_loop; END IF; INSERT INTO sporting_event(sport_type_name, home_team_id, away_team_id, location_id,start_date_time, start_date) VALUES('football', v_team1_id, v_team3_id, v_team1_home_field_id,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR),v_event_date ); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); END LOOP; END BLOCK3; set v_date_offset = v_date_offset + 1; END LOOP; END BLOCK1; END LOOP; /* Each team plays each team in another division once */ /* load division tables, note there are 4 teams per division so use the counter for indexing */ drop table if exists v_date_tab; create temporary table v_date_tab(id INT PRIMARY KEY, dt DATETIME); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(1,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(6,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(11,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(16,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(2,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(7,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(12,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(13,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(3,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(8,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(9,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(14,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(4,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(5,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(10,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(15,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); drop table if exists v_nfc_tab; create temporary table v_nfc_tab(id INT, conf VARCHAR(10)); INSERT INTO v_nfc_tab VALUES (1,'NFC North'), (2,'NFC East'), (3,'NFC South'), (4,'NFC West'); drop table if exists v_afc_tab; create temporary table v_afc_tab(id INT, conf VARCHAR(10)); INSERT INTO v_afc_tab VALUES (1,'AFC North'), (2,'AFC East'), (3,'AFC South'), (4,'AFC West'); CROSS_CONF_BLOCK: BEGIN DECLARE i INT DEFAULT 1; DECLARE v_nfc_conf VARCHAR(10); DECLARE v_afc_conf VARCHAR(10); WHILE i <= 4 DO SELECT conf INTO v_nfc_conf FROM v_nfc_tab WHERE id = i; SELECT conf INTO v_afc_conf FROM v_afc_tab WHERE id = 1; CC_BLOCK1: BEGIN DECLARE v_rownum INT DEFAULT 1; DECLARE v_t2_id INT; DECLARE v_t2_field_id INT; DECLARE v_t1_id INT; DECLARE v_t1_field_id INT; DECLARE v_dt DATETIME; DECLARE cross_div_done INT DEFAULT FALSE; DECLARE cross_div_cur CURSOR FOR SELECT a.id as t2_id, a.home_field_id as t2_field_id, b.id as t1_id, b.home_field_id as t1_field_id FROM sport_team a, sport_team b WHERE a.sport_division_short_name = v_afc_conf AND b.sport_division_short_name = v_nfc_conf ORDER BY a.name, b.name; DECLARE CONTINUE HANDLER FOR NOT FOUND SET cross_div_done = TRUE; OPEN cross_div_cur; cross_div_cur_loop: LOOP FETCH NEXT FROM cross_div_cur INTO v_t2_id, v_t2_field_id, v_t1_id, v_t1_field_id; IF cross_div_done THEN CLOSE cross_div_cur; LEAVE cross_div_cur_loop; END IF; SELECT dt INTO v_dt FROM v_date_tab WHERE id = v_rownum; IF (v_rownum % 2) = 0 THEN INSERT INTO sporting_event(sport_type_name, home_team_id, away_team_id, location_id,start_date_time,start_date) VALUES('football', v_t2_id, v_t1_id, v_t2_field_id, v_dt,v_dt); ELSE INSERT INTO sporting_event(sport_type_name, home_team_id, away_team_id, location_id,start_date_time,start_date) VALUES('football', v_t1_id, v_t2_id, v_t1_field_id, v_dt,v_dt); END IF; END LOOP; END CC_BLOCK1; SET i = i + 1; END WHILE; DELETE FROM v_date_tab; SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(1,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(6,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(11,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(16,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(2,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(7,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(12,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(13,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(3,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(8,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(9,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(14,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(4,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(5,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(10,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(15,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); DELETE FROM v_nfc_tab; INSERT INTO v_nfc_tab VALUES (1,'NFC North'), (2,'NFC East'), (3,'NFC South'), (4,'NFC West'); DELETE FROM v_afc_tab; INSERT INTO v_afc_tab VALUES (1,'AFC West'), (2,'AFC North'), (3,'AFC East'), (4,'AFC South'); SET i = 1; WHILE i <= 4 DO SELECT conf INTO v_nfc_conf FROM v_nfc_tab WHERE id = i; SELECT conf INTO v_afc_conf FROM v_afc_tab WHERE id = 1; CC_BLOCK2: BEGIN DECLARE v_rownum INT DEFAULT 1; DECLARE v_t2_id INT; DECLARE v_t2_field_id INT; DECLARE v_t1_id INT; DECLARE v_t1_field_id INT; DECLARE v_dt DATETIME; DECLARE cross_div_done INT DEFAULT FALSE; DECLARE cross_div_cur CURSOR FOR SELECT a.id as t2_id, a.home_field_id as t2_field_id, b.id as t1_id, b.home_field_id as t1_field_id FROM sport_team a, sport_team b WHERE a.sport_division_short_name = v_afc_conf AND b.sport_division_short_name = v_nfc_conf ORDER BY a.name, b.name; DECLARE CONTINUE HANDLER FOR NOT FOUND SET cross_div_done = TRUE; OPEN cross_div_cur; cross_div_cur_loop: LOOP FETCH NEXT FROM cross_div_cur INTO v_t2_id, v_t2_field_id, v_t1_id, v_t1_field_id; IF cross_div_done THEN CLOSE cross_div_cur; LEAVE cross_div_cur_loop; END IF; SELECT dt INTO v_dt FROM v_date_tab WHERE id = v_rownum; IF (v_rownum % 2) = 0 THEN INSERT INTO sporting_event(sport_type_name, home_team_id, away_team_id, location_id,start_date_time,start_date) VALUES('football', v_t2_id, v_t1_id, v_t2_field_id, v_dt,v_dt); ELSE INSERT INTO sporting_event(sport_type_name, home_team_id, away_team_id, location_id,start_date_time,start_date) VALUES('football', v_t1_id, v_t2_id, v_t1_field_id, v_dt,v_dt); END IF; END LOOP; END CC_BLOCK2; SET i = i + 1; END WHILE; DELETE FROM v_date_tab; SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(1,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(6,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(11,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(16,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(2,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(7,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(12,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(13,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(3,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(8,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(9,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(14,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); SET v_event_date = DATE_ADD(v_event_date, INTERVAL 7 DAY); insert into v_date_tab values(4,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(5,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(10,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); insert into v_date_tab values(15,DATE_ADD(v_event_date, INTERVAL FLOOR(rand()*(19 - 12 +1)) + 12 HOUR)); DELETE FROM v_nfc_tab; INSERT INTO v_nfc_tab VALUES (1,'NFC North'), (2,'NFC East'), (3,'NFC South'), (4,'NFC West'); DELETE FROM v_afc_tab; INSERT INTO v_afc_tab VALUES (1,'AFC South'), (2,'AFC West'), (3,'AFC North'), (4,'AFC East'); SET i = 1; WHILE i <= 4 DO SELECT conf INTO v_nfc_conf FROM v_nfc_tab WHERE id = i; SELECT conf INTO v_afc_conf FROM v_afc_tab WHERE id = 1; CC_BLOCK3: BEGIN DECLARE v_rownum INT DEFAULT 1; DECLARE v_t2_id INT; DECLARE v_t2_field_id INT; DECLARE v_t1_id INT; DECLARE v_t1_field_id INT; DECLARE v_dt DATETIME; DECLARE cross_div_done INT DEFAULT FALSE; DECLARE cross_div_cur CURSOR FOR SELECT a.id as t2_id, a.home_field_id as t2_field_id, b.id as t1_id, b.home_field_id as t1_field_id FROM sport_team a, sport_team b WHERE a.sport_division_short_name = v_afc_conf AND b.sport_division_short_name = v_nfc_conf ORDER BY a.name, b.name; DECLARE CONTINUE HANDLER FOR NOT FOUND SET cross_div_done = TRUE; OPEN cross_div_cur; cross_div_cur_loop: LOOP FETCH NEXT FROM cross_div_cur INTO v_t2_id, v_t2_field_id, v_t1_id, v_t1_field_id; IF cross_div_done THEN CLOSE cross_div_cur; LEAVE cross_div_cur_loop; END IF; SELECT dt INTO v_dt FROM v_date_tab WHERE id = v_rownum; IF (v_rownum % 2) = 0 THEN INSERT INTO sporting_event(sport_type_name, home_team_id, away_team_id, location_id,start_date_time,start_date) VALUES('football', v_t2_id, v_t1_id, v_t2_field_id, v_dt,v_dt); ELSE INSERT INTO sporting_event(sport_type_name, home_team_id, away_team_id, location_id,start_date_time,start_date) VALUES('football', v_t1_id, v_t2_id, v_t1_field_id, v_dt,v_dt); END IF; END LOOP; END CC_BLOCK3; SET i = i + 1; END WHILE; END CROSS_CONF_BLOCK; END; $$ DELIMITER ;
the_stack
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for sys_config -- ---------------------------- DROP TABLE IF EXISTS `sys_config`; CREATE TABLE `sys_config` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称', `key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '键', `value` varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '值', `code` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编码', `data_type` int(2) NULL DEFAULT NULL COMMENT '数据类型//radio/1,KV,2,字典,3,数组', `parent_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '类型', `parent_key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sort` int(11) NOT NULL DEFAULT 10 COMMENT '排序号', `project_id` bigint(20) NULL DEFAULT 1 COMMENT '项目ID', `copy_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '拷贝状态 1 拷贝 2 不拷贝', `change_status` tinyint(1) NOT NULL DEFAULT 2 COMMENT '1 不可更改 2 可以更改', `enable` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用//radio/1,启用,2,禁用', `update_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间', `update_id` bigint(20) NULL DEFAULT 0 COMMENT '更新人', `create_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间', `create_id` bigint(20) NULL DEFAULT 0 COMMENT '创建者', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统配置表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of sys_config -- ---------------------------- INSERT INTO `sys_config` VALUES (24, '系统参数', 'system', '', '', NULL, 0, NULL, 15, 1, 1, 2, 1, '2017-09-15 17:02:30', 4, '2017-09-15 16:54:52', 4); INSERT INTO `sys_config` VALUES (46, '日志控制配置', 'system.debug', 'false', '', NULL, 24, 'system', 15, 1, 1, 1, 1, '2019-02-24 00:00:08', 0, '2017-09-15 17:06:21', 4); INSERT INTO `sys_config` VALUES (47, '短信配置', 'sms', '', '', NULL, 0, '', 15, 1, 1, 2, 1, '2019-02-20 22:45:41', 1, '2017-09-15 17:06:56', 4); INSERT INTO `sys_config` VALUES (50, '短信账号', 'sms.username', 'test', '', NULL, 47, 'sms', 10, 1, 1, 2, 1, '2019-02-20 22:26:29', 1, '2019-02-18 01:07:47', 1); INSERT INTO `sys_config` VALUES (51, '短信密码', 'sms.passwd', '111111', '', NULL, 47, 'sms', 10, 1, 1, 2, 1, '2019-02-18 01:08:16', 1, '2019-02-18 01:08:16', 1); INSERT INTO `sys_config` VALUES (52, '短信类型', 'sms.type', '阿里云', '', NULL, 47, 'sms', 10, 1, 1, 2, 1, '2019-02-20 22:26:21', 1, '2019-02-20 22:26:21', 1); INSERT INTO `sys_config` VALUES (53, '性别', 'sex', '', '', NULL, 0, NULL, 90, 1, 1, 2, 1, '2019-02-20 23:35:18', 1, '2019-02-20 23:35:18', 1); INSERT INTO `sys_config` VALUES (54, '性别男', 'sex.male', '男', '1', NULL, 53, 'sex', 91, 1, 1, 2, 1, '2019-02-20 23:40:19', 1, '2019-02-20 23:35:45', 1); INSERT INTO `sys_config` VALUES (55, '性别女', 'sex.female', '女', '2', NULL, 53, 'sex', 92, 1, 1, 2, 1, '2019-02-20 23:40:24', 1, '2019-02-20 23:36:12', 1); INSERT INTO `sys_config` VALUES (56, '性别未知', 'sex.unknown', '未知', '3', NULL, 53, 'sex', 93, 1, 1, 2, 1, '2019-02-20 23:40:29', 1, '2019-02-20 23:36:46', 1); -- ---------------------------- -- Table structure for sys_department -- ---------------------------- DROP TABLE IF EXISTS `sys_department`; CREATE TABLE `sys_department` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `parent_id` int(11) NULL DEFAULT 0 COMMENT '上级机构', `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '部门/11111', `code` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构编码', `sort` int(11) NULL DEFAULT 0 COMMENT '序号', `linkman` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人', `linkman_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人电话', `remark` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构描述', `enable` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用//radio/1,启用,2,禁用', `update_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间', `update_id` bigint(20) NULL DEFAULT 0 COMMENT '更新人', `create_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间', `create_id` bigint(20) NULL DEFAULT 0 COMMENT '创建者', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `uni_depart_name`(`name`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 10015 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '组织机构' ROW_FORMAT = Compact; -- ---------------------------- -- Records of sys_department -- ---------------------------- INSERT INTO `sys_department` VALUES (10001, 0, 'FLY的狐狸', 'ABC000', 100, '', '', '', 1, '2017-04-28 01:16:43', 1, '2016-07-31 18:12:30', 1); INSERT INTO `sys_department` VALUES (10002, 10001, '开发组', 'ABC001', 101, NULL, NULL, NULL, 1, '2016-07-31 18:15:29', 1, '2016-07-31 18:15:29', 1); INSERT INTO `sys_department` VALUES (10003, 10001, '产品组', 'ABC003', 103, '', '', '', 1, '2017-04-28 00:58:41', 1, '2016-07-31 18:16:06', 1); INSERT INTO `sys_department` VALUES (10004, 10001, '运营组', 'ABC004', 104, NULL, NULL, NULL, 1, '2016-07-31 18:16:30', 1, '2016-07-31 18:16:30', 1); INSERT INTO `sys_department` VALUES (10005, 10001, '测试组', '12323', 10, '', '', '', 0, '2019-06-30 22:33:44', 1, '2017-10-18 18:13:09', 1); -- ---------------------------- -- Table structure for sys_log -- ---------------------------- DROP TABLE IF EXISTS `sys_log`; CREATE TABLE `sys_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `log_type` int(11) NOT NULL COMMENT '类型', `oper_object` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作对象', `oper_table` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作表', `oper_id` int(11) NULL DEFAULT 0 COMMENT '操作主键', `oper_type` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作类型', `oper_remark` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作备注', `enable` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用//radio/1,启用,2,禁用', `update_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间', `update_id` bigint(20) NULL DEFAULT 0 COMMENT '更新人', `create_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间', `create_id` bigint(20) NULL DEFAULT 0 COMMENT '创建者', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 11813 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日志' ROW_FORMAT = Compact; -- ---------------------------- -- Table structure for sys_menu -- ---------------------------- DROP TABLE IF EXISTS `sys_menu`; CREATE TABLE `sys_menu` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `parent_id` int(11) NOT NULL DEFAULT 0 COMMENT '父id', `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '名称/11111', `icon` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单图标', `urlkey` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单key', `url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '链接地址', `perms` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '授权(多个用逗号分隔,如:user:list,user:create)', `status` int(11) NULL DEFAULT 1 COMMENT '状态//radio/2,隐藏,1,显示', `type` int(11) NULL DEFAULT 1 COMMENT '类型//select/1,目录,2,菜单,3,按钮', `sort` int(11) NULL DEFAULT 1 COMMENT '排序', `level` int(11) NULL DEFAULT 1 COMMENT '级别', `enable` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用//radio/1,启用,2,禁用', `update_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间', `update_id` bigint(20) NULL DEFAULT 0 COMMENT '更新人', `create_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间', `create_id` bigint(20) NULL DEFAULT 0 COMMENT '创建者', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单' ROW_FORMAT = Compact; -- ---------------------------- -- Records of sys_menu -- ---------------------------- INSERT INTO `sys_menu` VALUES (1, 20, '系统首页', 'fa fa-home', 'home', '/admin/welcome.html', '', 1, 2, 10, 2, 1, '2019-02-17 23:24:28', 1, '2015-04-27 17:28:06', 1); INSERT INTO `sys_menu` VALUES (2, 0, '系统管理', 'fa fa-institution', 'system_root', NULL, NULL, 1, 1, 190, 1, 1, '2015-04-27 17:28:06', 1, '2015-04-27 17:28:06', 1); INSERT INTO `sys_menu` VALUES (3, 2, '组织机构', 'fa fa-users', 'department', '/system/department/index', NULL, 1, 2, 191, 2, 1, '2015-04-27 17:28:06', 1, '2015-04-27 17:28:25', 1); INSERT INTO `sys_menu` VALUES (4, 2, '用户管理', 'fa fa-user-o', 'user', '/system/user/index', NULL, 1, 2, 192, 2, 1, '2015-04-27 17:28:06', 1, '2015-04-27 17:28:46', 1); INSERT INTO `sys_menu` VALUES (5, 2, '角色管理', 'fa fa-address-book-o', 'role', '/system/role/index', NULL, 1, 2, 194, 2, 1, '2015-04-27 17:28:06', 1, '2015-04-27 17:29:13', 1); INSERT INTO `sys_menu` VALUES (6, 2, '菜单管理', 'fa fa-bars', 'menu', '/system/menu/index', NULL, 1, 2, 196, 2, 1, '2015-04-27 17:29:43', 1, '2015-04-27 17:29:43', 1); INSERT INTO `sys_menu` VALUES (8, 2, '参数配置', 'fa fa-file-text-o', 'config', '/system/config/index', '', 1, 2, 198, 2, 1, '2017-09-15 14:53:36', 1, '2016-12-17 23:34:13', 1); INSERT INTO `sys_menu` VALUES (9, 2, '日志管理', 'fa fa-line-chart', 'log', '/system/log/index', NULL, 1, 2, 199, 2, 1, '2015-04-27 17:28:06', 1, '2016-01-03 18:09:18', 1); INSERT INTO `sys_menu` VALUES (20, 0, '业务处理', 'fa fa-home', 'home', '', '', 1, 1, 10, 1, 1, '2019-02-17 23:24:08', 1, '2019-02-17 23:24:08', 1); -- ---------------------------- -- Table structure for sys_role -- ---------------------------- DROP TABLE IF EXISTS `sys_role`; CREATE TABLE `sys_role` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '名称/11111/', `status` int(11) NULL DEFAULT 1 COMMENT '状态//radio/2,隐藏,1,显示', `sort` int(11) NULL DEFAULT 1 COMMENT '排序', `remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '说明//textarea', `enable` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用//radio/1,启用,2,禁用', `update_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间', `update_id` bigint(20) NULL DEFAULT 0 COMMENT '更新人', `create_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间', `create_id` bigint(20) NULL DEFAULT 0 COMMENT '创建者', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色' ROW_FORMAT = Compact; -- ---------------------------- -- Records of sys_role -- ---------------------------- INSERT INTO `sys_role` VALUES (1, '测试角色', 1, 10, '', 1, '2019-07-03 00:55:45', 1, '2017-09-15 14:54:26', 1); -- ---------------------------- -- Table structure for sys_role_menu -- ---------------------------- DROP TABLE IF EXISTS `sys_role_menu`; CREATE TABLE `sys_role_menu` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `role_id` bigint(20) NOT NULL COMMENT '角色id', `menu_id` bigint(20) NOT NULL COMMENT '菜单id', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联' ROW_FORMAT = Compact; -- ---------------------------- -- Records of sys_role_menu -- ---------------------------- INSERT INTO `sys_role_menu` VALUES (48, 1, 20); INSERT INTO `sys_role_menu` VALUES (49, 1, 1); -- ---------------------------- -- Table structure for sys_user -- ---------------------------- DROP TABLE IF EXISTS `sys_user`; CREATE TABLE `sys_user` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `uuid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'UUID', `username` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录名/11111', `password` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码', `salt` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1111' COMMENT '密码盐', `real_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '真实姓名', `depart_id` int(11) NULL DEFAULT 0 COMMENT '部门/11111/dict', `user_type` int(11) NULL DEFAULT 2 COMMENT '类型//select/1,管理员,2,普通用户,3,前台用户,4,第三方用户,5,API用户', `status` int(11) NULL DEFAULT 10 COMMENT '状态', `thirdid` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '第三方ID', `endtime` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结束时间', `email` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'email', `tel` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号', `address` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址', `title_url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像地址', `remark` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '说明', `theme` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'default' COMMENT '主题', `back_site_id` int(11) NULL DEFAULT 0 COMMENT '后台选择站点ID', `create_site_id` int(11) NULL DEFAULT 1 COMMENT '创建站点ID', `project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目ID', `project_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称', `enable` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用//radio/1,启用,2,禁用', `update_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新时间', `update_id` bigint(20) NULL DEFAULT 0 COMMENT '更新人', `create_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间', `create_id` bigint(20) NULL DEFAULT 0 COMMENT '创建者', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `uni_user_username`(`username`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户' ROW_FORMAT = Compact; -- ---------------------------- -- Records of sys_user -- ---------------------------- INSERT INTO `sys_user` VALUES (1, '94091b1fa6ac4a27a06c0b92155aea6a', 'admin', '9fb3dc842c899aa63d6944a55080b795', '1111', '系统管理员', 10001, 1, 10, '', '', 'zcool321@sina.com', '123', '', '', '时间是最好的老师,但遗憾的是&mdash;&mdash;最后他把所有的学生都弄死了', 'flat', 5, 1, 1, 'test', 1, '2019-07-08 18:12:28', 1, '2017-03-19 20:41:25', 1); INSERT INTO `sys_user` VALUES (9, 'xa5450ztN08S37tKj93ujhJ66069q92R', 'test', 'ea8207ee50ccf367e99c8444fda7da32', 'GM26Mq', 'test', 10002, 2, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'default', 0, 1, 0, NULL, 1, '2019-11-12 15:31:31', 1, '2019-07-11 15:49:24', 1); INSERT INTO `sys_user` VALUES (12, '8609WdcTI1337Y7e5kQ94v872Z02mh24', 'testLogin', '7f4d0d8db5546f395e87dfd294608b9b', '3n7Ci8', 'testLogin', 10002, 2, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'default', 0, 1, 0, NULL, 1, '2019-11-12 15:31:08', 1, '2019-11-12 15:31:08', 1); INSERT INTO `sys_user` VALUES (13, 'PTMB2mcqk87n1x15K84E56T75SY11Q5w', 'testLogout', '961c0645f7ae271d6e1fc1ff01e786d7', '0X6509', 'testLogout', 10002, 2, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'default', 0, 1, 0, NULL, 1, '2019-11-12 15:31:19', 1, '2019-11-12 15:31:19', 1); -- ---------------------------- -- Table structure for sys_user_role -- ---------------------------- DROP TABLE IF EXISTS `sys_user_role`; CREATE TABLE `sys_user_role` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `user_id` bigint(20) NOT NULL COMMENT '用户id', `role_id` bigint(20) NOT NULL COMMENT '角色id', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户和角色关联' ROW_FORMAT = Compact; -- ---------------------------- -- Records of sys_user_role -- ---------------------------- INSERT INTO `sys_user_role` VALUES (1, 1, 1); SET FOREIGN_KEY_CHECKS = 1;
the_stack
-- 2020-08-18T11:20:47.047Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571101,1738,0,30,541485,'Line_ID',TO_TIMESTAMP('2020-08-18 14:20:46','YYYY-MM-DD HH24:MI:SS'),100,'Transaction line ID (internal)','D',10,'Internal link','Y','Y','N','N','N','N','N','N','N','N','Y','Line ID',TO_TIMESTAMP('2020-08-18 14:20:46','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:47.056Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571101 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:47.197Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(1738) ; -- 2020-08-18T11:20:47.370Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571102,215,0,30,541485,'C_UOM_ID',TO_TIMESTAMP('2020-08-18 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,'Maßeinheit','D',10,'Eine eindeutige (nicht monetäre) Maßeinheit','Y','Y','N','N','N','N','N','N','N','N','Y','Maßeinheit',TO_TIMESTAMP('2020-08-18 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:47.375Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571102 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:47.382Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(215) ; -- 2020-08-18T11:20:47.619Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571103,526,0,29,541485,'Qty',TO_TIMESTAMP('2020-08-18 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,'Menge','D',131089,'Menge bezeichnet die Anzahl eines bestimmten Produktes oder Artikels für dieses Dokument.','Y','Y','N','N','N','N','N','N','N','N','Y','Menge',TO_TIMESTAMP('2020-08-18 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:47.622Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571103 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:47.624Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(526) ; -- 2020-08-18T11:20:48.012Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571104,1884,0,30,541485,'A_Asset_ID',TO_TIMESTAMP('2020-08-18 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,'Asset used internally or by customers','D',10,'An asset is either created by purchasing or by delivering a product. An asset can be used internally or be a customer asset.','Y','Y','N','N','N','N','N','N','N','N','Y','Asset',TO_TIMESTAMP('2020-08-18 14:20:47','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:48.019Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571104 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:48.026Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(1884) ; -- 2020-08-18T11:20:48.304Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571105,2073,0,30,541485,'C_ProjectPhase_ID',TO_TIMESTAMP('2020-08-18 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,'Phase eines Projektes','D',10,'Y','Y','N','N','N','N','N','N','N','N','Y','Projekt-Phase',TO_TIMESTAMP('2020-08-18 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:48.307Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571105 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:48.311Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(2073) ; -- 2020-08-18T11:20:48.491Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571106,2074,0,30,541485,'C_ProjectTask_ID',TO_TIMESTAMP('2020-08-18 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,'Aktuelle Projekt-Aufgabe in einer Phase','D',10,'Eine Projekt-Aufgabe in einer Projekt-Phase repräsentiert die durchzuführende Tätigkeit.','Y','Y','N','N','N','N','N','N','N','N','Y','Projekt-Aufgabe',TO_TIMESTAMP('2020-08-18 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:48.494Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571106 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:48.496Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(2074) ; -- 2020-08-18T11:20:48.850Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571107,542922,0,30,541485,'SubLine_ID',TO_TIMESTAMP('2020-08-18 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,'Transaction sub line ID (internal)','D',10,'Y','Y','N','N','N','N','N','N','N','N','Y','SubLine ID',TO_TIMESTAMP('2020-08-18 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:48.853Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571107 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:48.856Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(542922) ; -- 2020-08-18T11:20:49.054Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571108,196,0,30,541485,'C_DocType_ID',TO_TIMESTAMP('2020-08-18 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,'Belegart oder Verarbeitungsvorgaben','D',10,'Die Belegart bestimmt den Nummernkreis und die Vorgaben für die Belegverarbeitung.','Y','Y','N','N','N','N','N','N','N','N','Y','Belegart',TO_TIMESTAMP('2020-08-18 14:20:48','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:49.062Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571108 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:49.093Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(196) ; -- 2020-08-18T11:20:49.338Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571109,865,0,10,541485,'DocBaseType',TO_TIMESTAMP('2020-08-18 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,'','D',3,'','Y','Y','N','N','N','N','N','N','N','N','Y','Dokument Basis Typ',TO_TIMESTAMP('2020-08-18 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:49.343Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571109 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:49.347Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(865) ; -- 2020-08-18T11:20:49.648Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571110,542959,0,10,541485,'VATCode',TO_TIMESTAMP('2020-08-18 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','Y','N','N','N','N','N','N','N','N','Y','VAT Code',TO_TIMESTAMP('2020-08-18 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:49.660Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571110 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:49.668Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(542959) ; -- 2020-08-18T11:20:49.883Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,571111,543871,0,30,541485,'Counterpart_Fact_Acct_ID',TO_TIMESTAMP('2020-08-18 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','Y','N','N','N','N','N','N','N','N','Y','Counterpart Accounting Fact',TO_TIMESTAMP('2020-08-18 14:20:49','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2020-08-18T11:20:49.886Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Column_ID=571111 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2020-08-18T11:20:49.889Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_Column_Translation_From_AD_Element(543871) ; -- 2020-08-18T11:21:30.941Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET FieldLength=10,Updated=TO_TIMESTAMP('2020-08-18 14:21:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=571103 ; -- 2020-08-18T11:22:36.210Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=13,Updated=TO_TIMESTAMP('2020-08-18 14:22:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=571107 ; -- 2020-08-18T11:22:44.339Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=13,Updated=TO_TIMESTAMP('2020-08-18 14:22:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=571101 ; -- 2020-08-18T11:23:17.327Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Reference_ID=17, AD_Reference_Value_ID=183,Updated=TO_TIMESTAMP('2020-08-18 14:23:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=571109 ; -- 2020-08-18T11:28:50.817Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540200,544009,TO_TIMESTAMP('2020-08-18 14:28:50','YYYY-MM-DD HH24:MI:SS'),100,'Y','quantity',30,TO_TIMESTAMP('2020-08-18 14:28:50','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-08-18T12:11:58.834Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,571103,615921,0,242,TO_TIMESTAMP('2020-08-18 15:11:58','YYYY-MM-DD HH24:MI:SS'),100,'Menge',10,'D','Menge bezeichnet die Anzahl eines bestimmten Produktes oder Artikels für dieses Dokument.','Y','N','N','N','N','N','N','N','Menge',TO_TIMESTAMP('2020-08-18 15:11:58','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-08-18T12:11:58.841Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Field_ID=615921 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2020-08-18T12:11:59.136Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_FieldTranslation_From_AD_Name_Element(526) ; -- 2020-08-18T12:11:59.577Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Element_Link WHERE AD_Field_ID=615921 ; -- 2020-08-18T12:11:59.698Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select AD_Element_Link_Create_Missing_Field(615921) ; -- 2020-08-18T12:12:26.489Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,571102,615922,0,242,TO_TIMESTAMP('2020-08-18 15:12:26','YYYY-MM-DD HH24:MI:SS'),100,'Maßeinheit',10,'D','Eine eindeutige (nicht monetäre) Maßeinheit','Y','N','N','N','N','N','N','N','Maßeinheit',TO_TIMESTAMP('2020-08-18 15:12:26','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-08-18T12:12:26.496Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language, t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y'AND (l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N') AND t.AD_Field_ID=615922 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2020-08-18T12:12:26.506Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_FieldTranslation_From_AD_Name_Element(215) ; -- 2020-08-18T12:12:26.601Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_Element_Link WHERE AD_Field_ID=615922 ; -- 2020-08-18T12:12:26.615Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select AD_Element_Link_Create_Missing_Field(615922) ; -- 2020-08-18T12:12:48.142Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2020-08-18 15:12:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=615922 ; -- 2020-08-18T12:12:49.731Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2020-08-18 15:12:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=615921 ; -- 2020-08-18T12:13:17.501Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,615921,0,242,570661,544009,TO_TIMESTAMP('2020-08-18 15:13:17','YYYY-MM-DD HH24:MI:SS'),100,'Menge','Menge bezeichnet die Anzahl eines bestimmten Produktes oder Artikels für dieses Dokument.','Y','N','Y','N','N','Menge',10,0,0,TO_TIMESTAMP('2020-08-18 15:13:17','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-08-18T12:13:26.582Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,615922,0,242,570662,544009,TO_TIMESTAMP('2020-08-18 15:13:26','YYYY-MM-DD HH24:MI:SS'),100,'Maßeinheit','Eine eindeutige (nicht monetäre) Maßeinheit','Y','N','Y','N','N','Maßeinheit',20,0,0,TO_TIMESTAMP('2020-08-18 15:13:26','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2020-08-18T13:29:01.486Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=210,Updated=TO_TIMESTAMP('2020-08-18 16:29:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=570661 ; -- 2020-08-18T13:29:01.494Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=220,Updated=TO_TIMESTAMP('2020-08-18 16:29:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=570662 ;
the_stack
create schema hw_groupingsets; set search_path=hw_groupingsets; create table gstest1(a int, b int, v int)with(orientation = column); insert into gstest1 values (1,1,10),(1,1,11),(1,2,12),(1,2,13),(1,3,14), (2,3,15), (3,3,16), (3,4,17), (4,1,18), (4,1,19); create table gstest2 (a integer, b integer, c integer, d integer, e integer, f integer, g integer, h integer) with(orientation = column); copy gstest2 from stdin; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 2 1 1 1 1 1 2 2 2 1 1 1 1 2 2 2 2 1 1 1 2 2 2 2 2 1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 \. create table gstest3 (a integer, b integer, c integer, d integer)with(orientation = column); copy gstest3 from stdin; 1 1 1 1 2 2 2 2 \. select a, b, grouping(a,b), sum(v), count(*), max(v) from gstest1 group by rollup (a,b) order by 1, 2, 3, 4, 5, 6; -- nesting with window functions select a, b, sum(c), sum(sum(c)) over (order by a,b) as rsum from gstest2 group by rollup (a,b) order by 1, 2, 3, 4; -- nesting with grouping sets select sum(c) from gstest2 group by grouping sets((), grouping sets((), grouping sets(()))) order by 1 desc; select sum(c) from gstest2 group by grouping sets((), grouping sets((), grouping sets(((a, b))))) order by 1 desc; select sum(c) from gstest2 group by grouping sets(grouping sets(rollup(c), grouping sets(cube(c)))) order by 1 desc; select sum(c) from gstest2 group by grouping sets(a, grouping sets(a, cube(b))) order by 1 desc; select sum(c) from gstest2 group by grouping sets(grouping sets((a, (b)))) order by 1 desc; select sum(c) from gstest2 group by grouping sets(grouping sets((a, b))) order by 1 desc; select sum(c) from gstest2 group by grouping sets(grouping sets(a, grouping sets(a), a)) order by 1 desc; select sum(c) from gstest2 group by grouping sets(grouping sets(a, grouping sets(a, grouping sets(a), ((a)), a, grouping sets(a), (a)), a)) order by 1 desc; select sum(c) from gstest2 group by grouping sets((a,(a,b)), grouping sets((a,(a,b)),a)) order by 1 desc; create table gstest_empty (a integer, b integer, v integer) with(orientation = column); select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),a); select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),()); select a, b, sum(v), count(*) from gstest_empty group by grouping sets ((a,b),(),(),()); select a, b, avg(v), sum(v), count(*) from gstest_empty group by grouping sets ((a,b),(),(),()); select sum(v), count(*) from gstest_empty group by grouping sets ((),(),()); -- empty input with joins tests some important code paths select t1.a, t2.b, sum(t1.v), count(*) from gstest_empty t1, gstest_empty t2 group by grouping sets ((t1.a,t2.b),()); -- simple joins, var resolution, GROUPING on join vars select t1.a, t2.b, grouping(t1.a, t2.b), sum(t1.v), max(t2.a) from gstest1 t1, gstest2 t2 group by grouping sets ((t1.a, t2.b), ()) order by 1, 2, 3, 4, 5; select t1.a, t2.b, grouping(t1.a, t2.b), sum(t1.v), max(t2.a) from gstest1 t1 join gstest2 t2 on (t1.a=t2.a) group by grouping sets ((t1.a, t2.b), ()) order by 1, 2, 3, 4, 5; select a, b, grouping(a, b), sum(t1.v), max(t2.c) from gstest1 t1 join gstest2 t2 using (a,b) group by grouping sets ((a, b), ()) order by 1, 2, 3, 4, 5;; -- check that functionally dependent cols are not nulled select a, d, grouping(a,b,c) from gstest3 group by grouping sets ((a,b), (a,c)); -- Views with GROUPING SET queries select a, b, grouping(a,b), sum(c), count(*), max(c) from gstest2 group by rollup ((a,b,c),(c,d)) order by 1, 2, 3, 4, 5, 6; select a, b, sum(c), sum(sum(c)) over (order by a,b) as rsum from gstest2 group by cube (a,b) order by 1, 2, 3, 4; select a, b, sum(c) from (values (1,1,10),(1,1,11),(1,2,12),(1,2,13),(1,3,14),(2,3,15),(3,3,16),(3,4,17),(4,1,18),(4,1,19)) v(a,b,c) group by rollup (a,b) order by 1, 2, 3; -- Agg level check. This querys should error out. select (select grouping(a,b) from gstest2) from gstest2 group by a,b; select a, grouping(a, b, c) from gstest2 group by cube(a, b); --Nested queries select a, b, sum(c), count(*) from gstest2 group by grouping sets (rollup(a,b),a) order by 1, 2, 3, 4; create table rtest(a int, b varchar(5), c char(5), d text, e numeric(5, 0), f timestamp); insert into rtest values(1, generate_series(1, 2), generate_series(1, 3), generate_series(1, 4), generate_series(1, 6), '2012-12-16 10:11:15'); create table vec_aptest(a int, b varchar(5), c char(5), d text, e numeric(5, 0), f timestamp)with(orientation = column); insert into vec_aptest select * from rtest; select a, b, c, sum(a), avg(e), max(d), min(e) from vec_aptest group by rollup(a, b, c, d, e, f) order by 1, 2, 3, 4, 5, 6, 7; select b, c, sum(a), avg(e), max(d), min(e) from vec_aptest group by rollup(b, c, d, e, f) order by 1, 2, 3, 4, 5, 6; select b, c, sum(a), avg(e), max(d), min(e) from vec_aptest group by rollup(b, c, d, e) order by 1, 2, 3, 4, 5, 6; select a, b, c, sum(a), avg(e), max(d), min(e) from vec_aptest group by cube(a, b, c, d, e, f) order by 1, 2, 3, 4, 5, 6, 7; select b, c, sum(a), avg(e), max(d), min(e) from vec_aptest group by cube(b, c, d, e, f) order by 1, 2, 3, 4, 5, 6; select b, c, sum(a), avg(e), max(d), min(e) from vec_aptest group by cube(b, c, d, e) order by 1, 2, 3, 4, 5, 6; explain (costs off)select a, b, c from vec_aptest where b = '12' group by rollup(a), grouping sets(b, c) order by 1,2,3; explain (costs off)select a, b, c, d from vec_aptest where d = '12' group by rollup(a, b, c), grouping sets(d) order by 1, 2, 3, 4; drop table rtest; delete from vec_aptest; --test include duplicate columns insert into vec_aptest values(generate_series(1, 10), generate_series(1, 10), generate_series(1, 10), generate_series(1, 10), generate_series(1, 10), '2012-12-16 10:11:15'); select a, b, sum(a), avg(e), max(d), min(e) from vec_aptest group by rollup(a, a, b) order by 1, 2, 3, 4, 5, 6; select a, b, sum(a), avg(e), max(d), min(e) from vec_aptest group by rollup((a, b), (a, b)) order by 1, 2, 3, 4, 5, 6; select a, b, sum(a), avg(e), max(d), min(e) from vec_aptest group by rollup((a, b), (c, d)) order by 1, 2, 3, 4, 5, 6; select a, b, sum(a), avg(e), max(d), min(e) from vec_aptest group by cube(a, a, b) order by 1, 2, 3, 4, 5, 6; select a, b, sum(a), avg(e), max(d), min(e) from vec_aptest group by cube((a, b), (a, b)) order by 1, 2, 3, 4, 5, 6; select a, b, sum(a), avg(e), max(d), min(e) from vec_aptest group by cube((a, b), (c, d)) order by 1, 2, 3, 4, 5, 6; create table vec_t1(a int, b int, c int)with(orientation = column); explain (verbose on, costs off) select a, rank() over (partition by grouping(a)) from vec_t1 group by rollup(a, b, c) order by 1, 2; insert into vec_t1 values(generate_series(1, 10), generate_series(1, 10), generate_series(1, 10)); explain (verbose on, costs off) select avg(a), count(distinct b), count(distinct c) from vec_t1 group by (); explain (verbose on, costs off) select a, count(distinct b), count(distinct b) from vec_t1 group by rollup(a, b); explain (verbose on, costs off) select a, count(distinct b), count(distinct c) from vec_t1 group by rollup(a, b); select avg(a), count(distinct b), count(distinct c) from vec_t1 group by () order by 1, 2, 3; select a, count(distinct b), count(distinct b) from vec_t1 group by rollup(a, b) order by 1, 2, 3; select a, count(distinct b), count(distinct c) from vec_t1 group by rollup(a, b) order by 1, 2, 3; explain (verbose on, costs off) select a, sum(c), grouping(c) from vec_t1 group by rollup(a, b), grouping sets(c) order by 1, 2, 3; explain (verbose on, costs off) select a, sum(c), grouping(c) from vec_t1 group by rollup(a, b), cube(c) order by 1, 2, 3; select a, sum(c), grouping(c) from vec_t1 group by rollup(a, b), grouping sets(c) order by 1, 2, 3; select a, sum(c), grouping(c) from vec_t1 group by rollup(a, b), cube(c) order by 1, 2, 3; explain (verbose on, costs off) select a, sum(c), grouping(c) from vec_t1 group by cube(a, b), grouping sets(c) order by 1, 2, 3; select a, sum(c), grouping(c) from vec_t1 group by cube(a, b), grouping sets(c) order by 1, 2, 3; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by grouping sets(a); select a, sum(c) from vec_t1 group by grouping sets(a) order by 1, 2; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by cube(a, b), grouping sets(a); select a, sum(c) from vec_t1 group by cube(a, b), grouping sets(a) order by 1, 2; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by cube(a, b), a; select a, sum(c) from vec_t1 group by cube(a, b), a order by 1, 2; explain (verbose on, costs off) select a, sum(c), avg(b) from vec_t1 group by rollup(a, b), grouping sets(a); select a, sum(c), avg(b) from vec_t1 group by rollup(a, b), grouping sets(a) order by 1, 2; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by rollup(a, b), a; select a, sum(c) from vec_t1 group by rollup(a, b), a order by 1, 2; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by grouping sets(a, b); explain (verbose on, costs off) select a, b, sum(c) from vec_t1 group by grouping sets(a, b) having grouping(a) = 0; select a, b, sum(c) from vec_t1 group by grouping sets(a, b) having grouping(a) = 0 order by 1, 2, 3; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by grouping sets(a) having grouping(a) = 0; select a, sum(c) from vec_t1 group by grouping sets(a) having grouping(a) = 0 order by 1, 2; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by grouping sets(a, b) having sum(a) = 1; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by grouping sets(a, b) having sum(b) = 1; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by a, grouping sets(b, c) having sum(b) > 10; explain (verbose on, costs off) select a, sum(c) from vec_t1 group by grouping sets(a, b) having sum(a)+sum(b) > 1 or grouping(a)=0; explain (verbose on, costs off) select a, b, sum(c) from vec_t1 group by rollup(a, b) having b is not null; select a, b, sum(c) from vec_t1 group by rollup(a, b) having b is not null order by 1,2,3; explain (verbose on, costs off) select a, b, sum(c) from vec_t1 group by a, grouping sets(b, c) having b is not null; select a, b, sum(c) from vec_t1 group by a, grouping sets(b, c) having b is not null order by 1,2,3; SELECT 1 Column_006 GROUP BY cube(Column_006) order by 1 nulls first; explain (verbose on, costs off) select distinct b from vec_t1 group by a, grouping sets(b, c); explain (verbose on, costs off) select avg(distinct b) from vec_t1 group by grouping sets(b, c) having avg(distinct b) > 600; explain (verbose on, costs off) select avg(distinct b) from vec_t1 group by grouping sets(b, c) having sum(distinct b) > 600; explain (verbose on, costs off) select avg(distinct a) from vec_t1 group by grouping sets(b, c); explain (verbose on, costs off) select a, b, b from vec_t1 group by rollup(1, 2), 3 order by 1, 2, 3; analyze vec_t1; explain (verbose on, costs off) select a, grouping(a) from vec_t1 where 0 = 1 group by a; -- test AP func with const target list used in setop branch -- hashagg subplan explain (costs off, verbose on) select 1 from vec_t1 minus SELECT 1 Column_006 where 1=0 GROUP BY cube(Column_006); select 1 from vec_t1 minus SELECT 1 Column_006 where 1=0 GROUP BY cube(Column_006); -- non-hashagg subplan explain (costs off, verbose on) select 1 from vec_t1 minus (SELECT 1 Column_006 where 1=0 GROUP BY cube(Column_006) limit 1); select 1 from vec_t1 minus (SELECT 1 Column_006 where 1=0 GROUP BY cube(Column_006) limit 1); -- stream added plan explain (costs off, verbose on) select 1,1 from vec_t1 union SELECT 2 c1, 2 c2 from vec_t1 where 1=0 GROUP BY cube(c1, c2); select 1,1 from vec_t1 union SELECT 2 c1, 2 c2 from vec_t1 where 1=0 GROUP BY cube(c1, c2) order by 1; explain (costs off, verbose on) select 1,1 from vec_t1 union SELECT 2 c1, count(distinct(b)) from vec_t1 where 1=0 GROUP BY cube(a, c1); select 1,1 from vec_t1 union SELECT 2 c1, count(distinct(b)) from vec_t1 where 1=0 GROUP BY cube(a, c1) order by 1; -- const column in AP func and non-AP func explain (costs off, verbose on) select 1,1,1 from vec_t1 union SELECT 2 c1, 2 c2, 4 c3 from vec_t1 where 1=0 GROUP BY cube(c1, c2); select 1,1,1 from vec_t1 union SELECT 2 c1, 2 c2, 4 c3 from vec_t1 where 1=0 GROUP BY cube(c1, c2) order by 1; -- unknown type explain (costs off, verbose on) select 1, '1' from vec_t1 union select 1, '243' xx from vec_t1 where 1=0 group by cube(1); select 1, '1' from vec_t1 union select 1, '243' xx from vec_t1 where 1=0 group by cube(1) order by 1; create table temp_grouping_table as select a, b, c from vec_t1 group by grouping sets(a, b), rollup(b), cube(c); \o xml_explain_temp.txt explain (format xml) select a, b, c from vec_t1 group by rollup(a, b, c); explain (format JSON) select a, b, c from vec_t1 group by rollup(a, b, c); explain (format YAML) select a, b, c from vec_t1 group by rollup(a, b, c); \o drop table vec_t1; create table vec_t1(a int)with(orientation = column); insert into vec_t1 values(1); select 1 a, 2, count(*) from vec_t1 group by cube(1, 2) having count(*) = 1 order by 1, 2; drop table vec_t1; drop table temp_grouping_table; drop table vec_aptest; drop table gstest1; drop table gstest2; drop table gstest3; drop table gstest_empty; -- adjust distribute key from equivalence class create table adj_t(a varchar(10), b varchar(10)); drop table adj_t; create table hash_partition_002 ( abstime_02 abstime, bit_02 bit(2), blob_02 blob, bytea_02 bytea, int2_02 SMALLINT, int4_02 INTEGER, int8_02 BIGINT, nvarchar2_02 NVARCHAR2(100), raw_02 raw, reltime_02 reltime, text_02 text, varbit_02 varbit, varchar_02 varchar(50), bpchar_02 bpchar(60), date_02 date, timestamp_02 timestamp, timestamptz_02 timestamptz )partition by range(date_02) ( partition p1 start('0002-01-01') end ('0006-01-01') every('1 year'), partition p2 end(maxvalue) ); create table hash_partition_003 ( abstime_03 abstime, bit_03 bit(3), blob_03 blob, bytea_03 bytea, int2_03 SMALLINT, int4_03 INTEGER, int8_03 BIGINT, nvarchar2_03 NVARCHAR2(100), raw_03 raw, reltime_03 reltime, text_03 text, varbit_03 varbit, varchar_03 varchar(50), bpchar_03 bpchar(60), date_03 date, timestamp_03 timestamp, timestamptz_03 timestamptz )partition by range(timestamp_03) ( partition p1 start('0003-01-01') end ('0006-01-01') every('1 year'), partition p2 end(maxvalue) ); insert into hash_partition_002 values ('1999-01-01',B'10','9999999999999',E'\\000',-32768,-2147483648,-9223372036854775808,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_002 values ('1999-01-01',B'11','9999999999999',E'\\000',32767,2147483647,9223372036854775807,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_002 values ('1999-01-01',B'01','9999999999999',E'\\000',32767,2147483647,9223372036854775807,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_002 values ('1999-01-01',B'11','9999999999999',E'\\000',-32768,-2147483648,-9223372036854775808,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_002 values ('1999-01-01',B'10','9999999999999',E'\\000',-32768,-2147483648,-9223372036854775808,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_002 values ('1999-01-01',B'11','9999999999999',E'\\000',-32768,-2147483648,-9223372036854775808,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_003 values ('1999-01-01',B'101','9999999999999',E'\\000',-32768,-2147483648,-9223372036854775808,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_003 values ('1999-01-01',B'110','9999999999999',E'\\000',32767,2147483647,9223372036854775807,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_003 values ('1999-01-01',B'011','9999999999999',E'\\000',32767,2147483647,9223372036854775807,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_003 values ('1999-01-01',B'010','9999999999999',E'\\000',-32768,-2147483648,-9223372036854775808,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_003 values ('1999-01-01',B'001','9999999999999',E'\\000',-32768,-2147483648,-9223372036854775808,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); insert into hash_partition_003 values ('1999-01-01',B'111','9999999999999',E'\\000',-32768,-2147483648,-9223372036854775808,0.115145415,'DEADBEEF',' 2009 days 23:59:59','XXXXXXXXXXXXXXXXX ',B'1101100011','0.222','1212','2011-01-01','0002-09-09 23:59:59','0003-09-09 00:02:01'); SELECT nullif(bit_02,varbit_03) as a , varbit_02::bit, '01' lx, 'v_dt' ::VARCHAR AS rq FROM hash_partition_002 left join hash_partition_003 on bit_02 = varbit_03 or varbit_03>bit_02 WHERE rq = 'v_dt' GROUP BY bit_02, varbit_03,varbit_02, rollup(text_03,int4_03,nvarchar2_02,varchar_02) having max(abstime_03)::int <> 1 order by 1, 2, 3, 4; select distinct(count(bit_03)), length(varbit_03), 'ee'::text as a from hash_partition_002 right join hash_partition_003 on varbit_03>bit_02 group by bit_03, varbit_03,rollup(varbit_03,bit_03,'ee'::text) HAVING count(1)>0 order by 1, 2, 3; SELECT count(bit_02) FROM hash_partition_002 GROUP BY bit_02,rollup(text_02) HAVING max(abstime_02)::int <> 1; SELECT nullif(bit_02,varbit_03) as a , varbit_02::bit, '01' lx, 'v_dt' ::VARCHAR AS rq FROM hash_partition_002 left join hash_partition_003 on bit_02 = varbit_03 or varbit_03>bit_02 WHERE rq = 'v_dt' GROUP BY bit_02, varbit_03,varbit_02, rollup(text_03,int4_03,nvarchar2_02,varchar_02) having max(abstime_03)::int <> 1 order by 1, 2, 3, 4; select distinct(count(bit_03)), length(varbit_03), 'ee'::text as a from hash_partition_002 right join hash_partition_003 on varbit_03>bit_02 group by bit_03, varbit_03,rollup(varbit_03,bit_03,'ee'::text) HAVING count(1)>0 order by 1, 2, 3; SELECT bit_02 FROM hash_partition_002 GROUP BY bit_02,rollup(text_02) HAVING max(abstime_02)::int <> 1 ORDER BY 1; SELECT count(bit_02) FROM hash_partition_002 GROUP BY bit_02,rollup(text_02) HAVING max(abstime_02)::int <> 1 ORDER BY 1; drop schema hw_groupingsets cascade;
the_stack
-- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "ALTER EXTENSION h3 UPDATE TO '0.2.0'" to load this file. \quit -- Indexing functions (indexing.c) CREATE OR REPLACE FUNCTION h3_geo_to_h3(point, resolution integer) RETURNS h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_geo_to_h3(point, resolution integer) IS 'Indexes the location at the specified resolution'; CREATE OR REPLACE FUNCTION h3_h3_to_geo(h3index) RETURNS point AS 'h3', 'h3_to_geo' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_to_geo(h3index) IS 'Finds the centroid of the index'; CREATE OR REPLACE FUNCTION h3_h3_to_geo_boundary(h3index) RETURNS polygon AS 'h3', 'h3_to_geo_boundary' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_to_geo_boundary(h3index) IS 'Finds the boundary of the index'; -- Index inspection functions (inspection.c) CREATE OR REPLACE FUNCTION h3_h3_get_resolution(h3index) RETURNS integer AS 'h3', 'h3_get_resolution' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_get_resolution(h3index) IS 'Returns the resolution of the index'; CREATE OR REPLACE FUNCTION h3_h3_get_base_cell(h3index) RETURNS integer AS 'h3', 'h3_get_base_cell' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_get_base_cell(h3index) IS 'Returns the base cell number of the index'; CREATE OR REPLACE FUNCTION h3_h3_is_valid(h3index) RETURNS bool AS 'h3', 'h3_is_valid' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_is_valid(h3index) IS 'Returns true if the given H3Index is valid'; CREATE OR REPLACE FUNCTION h3_h3_is_res_class_iii(h3index) RETURNS bool AS 'h3', 'h3_is_res_class_iii' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_is_res_class_iii(h3index) IS 'Returns true if this index has a resolution with Class III orientation'; CREATE OR REPLACE FUNCTION h3_h3_is_pentagon(h3index) RETURNS bool AS 'h3', 'h3_is_pentagon' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_is_pentagon(h3index) IS 'Returns true if this index represents a pentagonal cell'; -- Grid traversal functions (traversal.c) CREATE OR REPLACE FUNCTION h3_k_ring(h3index, k integer DEFAULT 1) RETURNS SETOF h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_k_ring(h3index, k integer) IS 'Produces indices within "k" distance of the origin index'; CREATE OR REPLACE FUNCTION h3_k_ring_distances(h3index, k integer DEFAULT 1, OUT index h3index, OUT distance int) RETURNS SETOF record AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_k_ring_distances(h3index, k integer) IS 'Produces indices within "k" distance of the origin index paired with their distance to the origin'; CREATE OR REPLACE FUNCTION h3_hex_ring(h3index, k integer DEFAULT 1) RETURNS SETOF h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_hex_ring(h3index, k integer) IS 'Returns the hollow hexagonal ring centered at origin with distance "k"'; CREATE OR REPLACE FUNCTION h3_distance(h3index, h3index) RETURNS integer AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_distance(h3index, h3index) IS 'Returns the distance in grid cells between the two indices'; CREATE OR REPLACE FUNCTION h3_experimental_h3_to_local_ij(origin h3index, index h3index) RETURNS POINT AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_experimental_h3_to_local_ij(origin h3index, index h3index) IS 'Produces local IJ coordinates for an H3 index anchored by an origin. This function is experimental, and its output is not guaranteed to be compatible across different versions of H3.'; CREATE OR REPLACE FUNCTION h3_experimental_local_ij_to_h3(origin h3index, coord POINT) RETURNS h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_experimental_local_ij_to_h3(origin h3index, coord POINT) IS 'Produces an H3 index from local IJ coordinates anchored by an origin. This function is experimental, and its output is not guaranteed to be compatible across different versions of H3.'; -- Hierarchical grid functions (hierarchy.c) CREATE OR REPLACE FUNCTION h3_h3_to_parent(h3index, resolution integer DEFAULT -1) RETURNS h3index AS 'h3', 'h3_to_parent' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_to_parent(h3index, resolution integer) IS 'Returns the parent of the given index'; CREATE OR REPLACE FUNCTION h3_h3_to_children(h3index, resolution integer DEFAULT -1) RETURNS SETOF h3index AS 'h3', 'h3_to_children' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_to_children(index h3index, resolution integer) IS 'Returns the set of children of the given index'; CREATE OR REPLACE FUNCTION h3_compact(h3index[]) RETURNS SETOF h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_compact(h3index[]) IS 'Compacts the given array as best as possible'; CREATE OR REPLACE FUNCTION h3_uncompact(h3index[], resolution integer DEFAULT -1) RETURNS SETOF h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_uncompact(h3index[], resolution integer) IS 'Uncompacts the given array at the given resolution. If no resolution is given, then it is chosen as one higher than the highest resolution in the set'; -- Region functions (regions.c) CREATE OR REPLACE FUNCTION h3_polyfill(exterior polygon, holes polygon[], resolution integer DEFAULT 1) RETURNS SETOF h3index AS 'h3' LANGUAGE C IMMUTABLE PARALLEL SAFE; -- NOT STRICT COMMENT ON FUNCTION h3_polyfill(exterior polygon, holes polygon[], resolution integer) IS 'Takes an exterior polygon [and a set of hole polygon] and returns the set of hexagons that best fit the structure'; CREATE OR REPLACE FUNCTION h3_h3_set_to_linked_geo(h3index[], OUT exterior polygon, OUT holes polygon[]) RETURNS SETOF record AS 'h3', 'h3_set_to_multi_polygon' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_set_to_linked_geo(h3index[]) IS 'Create a LinkedGeoPolygon describing the outline(s) of a set of hexagons. Polygon outlines will follow GeoJSON MultiPolygon order: Each polygon will have one outer loop, which is first in the list, followed by any holes'; -- Unidirectional edge functions (uniedges.c) CREATE OR REPLACE FUNCTION h3_h3_indexes_are_neighbors(h3index, h3index) RETURNS boolean AS 'h3', 'h3_indexes_are_neighbors' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_indexes_are_neighbors(h3index, h3index) IS 'Returns true if the given indices are neighbors'; CREATE OR REPLACE FUNCTION h3_get_h3_unidirectional_edge(origin h3index, destination h3index) RETURNS h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_get_h3_unidirectional_edge(origin h3index, destination h3index) IS 'Returns a unidirectional edge H3 index based on the provided origin and destination.'; CREATE OR REPLACE FUNCTION h3_h3_unidirectional_edge_is_valid(edge h3index) RETURNS boolean AS 'h3', 'h3_unidirectional_edge_is_valid' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_h3_unidirectional_edge_is_valid(edge h3index) IS 'Returns true if the given edge is valid.'; CREATE OR REPLACE FUNCTION h3_get_origin_h3_index_from_unidirectional_edge(edge h3index) RETURNS h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_get_origin_h3_index_from_unidirectional_edge(edge h3index) IS 'Returns the origin index from the given edge.'; CREATE OR REPLACE FUNCTION h3_get_destination_h3_index_from_unidirectional_edge(edge h3index) RETURNS h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_get_destination_h3_index_from_unidirectional_edge(edge h3index) IS 'Returns the destination index from the given edge.'; CREATE OR REPLACE FUNCTION h3_get_h3_indexes_from_unidirectional_edge(edge h3index, OUT origin h3index, OUT destination h3index) RETURNS record AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_get_h3_indexes_from_unidirectional_edge(edge h3index) IS 'Returns the pair of indices from the given edge.'; CREATE OR REPLACE FUNCTION h3_get_h3_unidirectional_edges_from_hexagon(h3index) RETURNS SETOF h3index AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_get_h3_unidirectional_edges_from_hexagon(h3index) IS 'Returns all unidirectional edges with the given index as origin'; CREATE OR REPLACE FUNCTION h3_get_unidirectional_edge_boundary(edge h3index) RETURNS polygon AS 'h3', 'h3_get_h3_unidirectional_edge_boundary' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_get_unidirectional_edge_boundary(edge h3index) IS 'Provides the coordinates defining the unidirectional edge.'; -- Miscellaneous H3 functions (miscellaneous.c) CREATE OR REPLACE FUNCTION h3_num_hexagons(resolution integer) RETURNS bigint AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION h3_num_hexagons(resolution integer) IS 'Number of unique H3 indexes at the given resolution.'; -- DEPRECATED in v3.4.0 CREATE OR REPLACE FUNCTION h3_degs_to_rads(float) RETURNS float AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OR REPLACE FUNCTION h3_rads_to_degs(float) RETURNS float AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- DEPRECATED in v3.5.0 CREATE OR REPLACE FUNCTION h3_hex_area_km2(integer) RETURNS float AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OR REPLACE FUNCTION h3_hex_area_m2(integer) RETURNS float AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OR REPLACE FUNCTION h3_edge_length_km(integer) RETURNS float AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OR REPLACE FUNCTION h3_edge_length_m(integer) RETURNS float AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OR REPLACE FUNCTION h3_hex_range(h3index, k integer) RETURNS SETOF h3index AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OR REPLACE FUNCTION h3_hex_range_distances(h3index, k integer, OUT h3index, OUT int) RETURNS SETOF record AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OR REPLACE FUNCTION h3_hex_ranges(h3index[], k integer) RETURNS SETOF h3index AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; -- DEPRECATED in v3.6.0 CREATE OR REPLACE FUNCTION h3_string_to_h3(cstring) RETURNS h3index AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; CREATE OR REPLACE FUNCTION h3_h3_to_string(h3index) RETURNS cstring AS 'h3', 'h3index_in' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
the_stack
-- For more verbose documentation, see Bitcloud.org wiki -- -- http://bitcloudproject.org/w/Nodepool.sql_Database_Design -- -- All below SQL should be generic SQL -- /* Nodepool.sql Database Rules: - Every record is owned by its creator, as enforced via synchronization verifying signature. - The only exception to the above is in the case of user files, which are owned by both the user and Publisher. - Every record may only be modified/deleted by its owner(s), but may be removed by anyone via "garbage collection" if its owner(s) have been banned. - SQLite supports DB functions/stored procedures written in C. Those functions, therefore, will only be referenced hereing documentation provided in the sync and interface code elsewhere. */ PRAGMA foreign_keys = ON; ---------------------------- -- Bitcloud Nodepool Team -- ---------------------------- -- general nodepool -- -- The contents of the general nodepool are synced globally across every nodes -- in the Bitcloud network. /* nodes table Contains: records of all nodes on the Bitcloud nework (up to 1.8e19) Rules: - Each node must sign its own entire row (except the signature field itself) using its own public key. - The node must provide a new signature of its row every 3 days maximum. Otherwise it is deleted from the nodepool and connections refused. - creation_date must be within the same synchronization period that the node is registered for node registration be valid. - Consistancy is checked by ensuring that nobody tries to register in other period that is not the actual: */ CREATE TABLE nodes ( public_key BLOB PRIMARY KEY NOT NULL, -- ID proximity BLOB NOT NULL, -- DHT (kademlia-like) map coordinates signature BLOB NOT NULL, -- self certificate of this row creation_date INTEGER NOT NULL, proof_of_creation BLOB, -- see CA generation in the protocol spec net_protocol INTEGER DEFAULT 1, -- 1 IP, 2 Tor address TEXT NOT NULL -- IP or onion address ); -- A grid is a collection of nodes associated that can sell -- space and bandwidth to a publisher CREATE TABLE grids ( id BLOB PRIMARY KEY NOT NULL, -- random number owner_id BLOB NOT NULL REFERENCES nodes(public_key), signature BLOB NOT NULL -- signature of the owner ); CREATE TABLE publishers ( public_key BLOB PRIMARY KEY NOT NULL, address TEXT, creation_date DATE DEFAULT CURRENT_TIMESTAMP NOT NULL, proof_of_creation BLOB, -- see CA generation in the protocol spec nickname TEXT, -- is information about the content of this publisher public?: public_metadata BOOLEAN DEFAULT FALSE, public_files BOOLEAN DEFAULT FALSE, -- trust all other publisher users by default? If not, only trust -- those in the publisher_trusts with positive trust. If yes, trust -- all except those with negative trust. trust_all_users BOOLEAN DEFAULT TRUE ); ------------------------------------- -- internal publishers/grid tables -- ------------------------------------- -- these tables are shared between associations (e.g., between publishers and -- grids, or grids and nodes, etc.) /* node_audit table: things in this table are only inserted after a node failed to provide a correct check. Every single row in this table is deleted after every check period, and the new content based on the last one, so it can ensure continuation of the measurements and save space at the same time. For example, if a node fails to be available for some periods, there is no need that the nodes doing the check have to insert new rows, they just reuse the rows from the previous perirods, and sign the row. The limit is 16 rows per node. Auditors are random. Nodes doing everything perfect are never present in this table except when issued by malicious nodes. The majority of the net must be malicious in order to have consecuences for those nodes. Bitcloud do not count reputation, but just measures possible incorrections of the nodes. DAs on top could implement a system of reputation based on this table and other tables they provide. */ CREATE TABLE publisher_trusts ( from_publisher BLOB NOT NULL REFERENCES publishers(public_key), to_publisher BLOB REFERENCES publishers(public_key), trust_users BOOLEAN NOT NULL, trust_powers BOOLEAN NOT NULL, -- like baning users or moderate files signature BLOB NOT NULL, -- from signature reason INTEGER NOT NULL, /* 1: Friend 2: Banned 3: Bad contracts 4: ... to be continued */ CHECK (reason>=1 and reason <=3) ); CREATE TABLE users ( public_key BLOB PRIMARY KEY NOT NULL, publisher BLOB NOT NULL REFERENCES publishers(public_key), publisher_signature BLOB, address TEXT, nick TEXT COLLATE NOCASE, fixed_address BOOLEAN DEFAULT TRUE, revocation_date DATE DEFAULT CURRENT_TIMESTAMP, storage_quota INTEGER DEFAULT 0, bandwidth_quota INTEGER DEFAULT 0, files_quota INTEGER DEFAULT 0, -- how many files can upload folder_quota INTEGER DEFAULT 0, -- how many folders allowed root_folder BLOB REFERENCES folders(id) ); -- User requests sent to the grids, for example, creating -- a folder or uploading/downloading a file CREATE TABLE user_requests ( id BLOB PRIMARY KEY NOT NULL, user BLOB NOT NULL REFERENCES users(public_key), signature BLOB NOT NULL, grid TEXT NOT NULL REFERENCES grids(public_key), action INTEGER NOT NULL, -- every type of action will have a different param values param1 BLOB, param2 BLOB, /* 1: Download file: param1=fileID, param2=offset 2: Stream file: param1=fileID, param2=offset 3: Upload file: param1=fileID, param2=folderID 4: Create folder: param1=folderID 5: Remove folder: param1=folderID 6: Rename folder: param1=folderID 7: Move file: param1=origin_foldeID, param2=final_folderID 8: Rename file: param1=fileID, param2=new_name 9: Delete file: param1=fileID 10: Update file owner: param1=fileID, param2=userID 11: Update file permissions: param1=fileID, param2=flags 11: Grant user file access: param1=fileID, param2=userID 12: Grant user folder acccess: param1=folderID, param2=userID 13: ... to be continued */ CHECK (action > 0 and action<=12) ); CREATE TABLE publisher_grid_contracts ( id BLOB PRIMARY KEY NOT NULL, publisher BLOB NOT NULL REFERENCES publishers(public_key), grid TEXT NOT NULL REFERENCES grids(public_key), -- Signatures of this contract: publisher_sig TEXT NOT NULL, grid_sig TEXT NOT NULL, -- Terms: min_bandwidth INTEGER NOT NULL, start_date DATE DEFAULT CURRENT_TIMESTAMP NOT NULL, end_date DATE DEFAULT CURRENT_TIMESTAMP NOT NULL, availability INTEGER NOT NULL, -- % of time online ping_average INTEGER DEFAULT 0, -- Coin terms coin TEXT /* example: BTC */ ); -- Table for owner requests of its grid nodes CREATE TABLE grid_owner_requests ( grid BLOB PRIMARY KEY REFERENCES grids(id), owner_sig BLOB NOT NULL, action INTEGER NOT NULL, param1 BLOB, param2 BLOB /* possible actions 1: Assign storage node: param1=nodeID, param2=gatewayID 2: Upgrade storage node to gateway: param1=nodeID 3: Set minimum bandwidth: param1=nodeID, param2=rate 4: Revoke node: param1=nodeID 5: ... to be continued */ ); -- Table used for publishers instructing orders to contracted grids: CREATE TABLE publisher_requests ( grid_sig BLOB NOT NULL, publisher_sig BLOB, action INTEGER NOT NULL, param1 BLOB, param2 BLOB, /* possible actions: 1: Accept user: param1=userID, param2=due-time 2: Revoke user: param1=userID 3: Remove file: param1=fileID 4: Remove folder: param1=folderID 5: Set user files quota: param1=userID, param2=quota 6: Set user storage quota: param1=userID, param2=quota 7: Set user folders quota: param1=userID, param2=quota 8: Set file permisions: param1=fileID, param2=flags 9: Update file owner: param1=fileID, param2=userID 10: Update folder owner: param1=fileID, param2=userID 11: Register nickname: param1=userID, param2=nickname 12: Delete nickname: param1=nickname 13: .... to be continued */ CHECK (action>=1 and action<=12) ); -- Gateways convert reconstruct data from the storage nodes and -- present it to the users/publishers. Multiple gateways per grid -- are possible. CREATE TABLE gateways ( node BLOB PRIMARY KEY REFERENCES nodes(public_key), grid TEXT NOT NULL REFERENCES grids(id), priority INTEGER, --larger means more priority, in case of the gateway --to have more than one grid associated. grid_sig TEXT, node_sig TEXT ); CREATE TABLE grid_node_contracts ( id BLOB PRIMARY KEY NOT NULL, grid TEXT REFERENCES grids(public_key), node BLOB NOT NULL REFERENCES nodes(public_key), grid_sig TEXT, node_sig TEXT, min_storage INTEGER NOT NULL, min_bandwidth INTEGER NOT NULL, start_date DATE DEFAULT CURRENT_TIMESTAMP NOT NULL, working_time INTEGER, -- only the grid can modify this -- Coin terms coin TEXT(4), -- ie: BTC bandwidth_block_size INTEGER DEFAULT 100000000, price_per_block INTEGER DEFAULT 0 ); CREATE TABLE node_audits ( node BLOB REFERENCES nodes(public_key), auditor BLOB NOT NULL REFERENCES nodes(public_key), signature BLOB NOT NULL, -- auditors signature periods INTEGER DEFAULT 1, -- number of periods this audis is applicable for reason INTEGER NOT NULL, /* 1: Ping timeout. 2: Incorrect signature. 3: Incorrect audition. 4: Too slow connection. 5: Denial of service. 6: Corrupt data. 7: ... to be continued */ CHECK (reason>=1 and reason <=6) ); -------------------- -- files and folders -------------------- -- synced between publishers/grids/users but not globally. CREATE TABLE folders ( id BLOB NOT NULL PRIMARY KEY, parent BLOB REFERENCES folders(id), name TEXT, permission BLOB REFERENCES permissions(id) ); CREATE TABLE files ( hash TEXT NOT NULL PRIMARY KEY, name TEXT, mime_type TEXT, content BLOB, rate INTEGER DEFAULT 0, --bandwidth rate at what must be streamed folder BLOB NOT NULL REFERENCES folders(id), user_sig TEXT NOT NULL, permissions BLOB REFERENCES permissions(id) ); CREATE TABLE permissions ( id BLOB NOT NULL PRIMARY KEY, user BLOB REFERENCES users(public_key), publisher BLOB REFERENCES publishers(public_key), -- NULL user/publisher means permissions for everyone read BOOLEAN, read_quota INTEGER, write BOOLEAN, write_quota INTEGER, create_new BOOLEAN, remove BOOLEAN, set_perm BOOLEAN -- Meaning someone can have permissions to set permissions in UI term ); -------------------- -- private tables -- -------------------- -- Tables not synced. Mostly internal configuration and convenient tables. CREATE TABLE CAs ( public_key BLOB PRIMARY KEY NOT NULL, private_key BLOB NOT NULL, proof_of_generation BLOB, ssl_extra TEXT ); CREATE TABLE configs ( var BLOB PRIMARY KEY NOT NULL, val BLOB NOT NULL ); -- logs -- ---------- CREATE TABLE logs ( num INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, error_code INTEGER NOT NULL, log TEXT, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ); -- synch working tables -- ---------- CREATE TABLE syncing_pool ( node_id BLOB PRIMARY KEY NOT NULL REFERENCES nodes(public_key), num INTEGER, -- the number of the current synchronization round instance_num INTEGER -- different synchronization pool per instance, since data may have different consistency -- anything else to add about the synch process? random assignment info? ); /* CREATE TABLE instance_index ( node_key BLOB PRIMARY KEY NOT NULL REFERENCES nodes(public_key), instance_num INTEGER() -- size should be equivalent to number of different configurations/instances ); --- this may be built out later. this was an idea to not duplicate nodes table per instance */ /* Every table, including deriving DAs tables, need to meet certain rules. This table is just a configuration table never synced. It is created at the time of node creation and updated when the software is updated. When a Dapp is addded to the node, this table is updated with the information of the new tables. */ CREATE TABLE table_rules ( table_id INTEGER PRIMARY KEY NOT NULL, -- must be unique and assigned by the repository table_name TEXT NOT NULL, dapp INTEGER REFERENCES DApps(id), -- exposure of the table in the nodepool -- 0=private; 1=grid; 2=participants only; 3=full global (careful); exposure INTEGER DEFAULT 0, -- participants (OR checked) -- 1=node; 2=grid owner; 4=gateways; 8=publishers; 16=users paticipants INTEGER DEFAULT 0, -- how data is synced? -- 0=nosync, 1=proximity, 2=random, 3=manual, 4=owner sync_type INTEGER DEFAULT 0, nodes_to_sync INTEGER DEFAULT 16, proximity_nodes INTEGER DEFAULT 12, -- how offten to check consistency? (this is different than actually syncing) -- in seconds, 0=nocheck check_every INTEGER DEFAULT 600, -- check function: this is a C function that checks the consistency of the -- last block across the nodes affected (from exposure). check_function TEXT DEFAULT "bc_check", -- sync functions: this C functions take a table and a row from argument and try -- to modify the local DB if tests are passed: insert_function TEXT default "bc_insert", delete_function TEXT default "bc_delete", update_function TEXT default "bc_update", -- maximum general number of transactions per check period and participant: max_transactions INTEGER DEFAULT 1, -- if max number of transaction must be specified per participant to avoid excess -- of flood or DDOS attacks: check_flood_function TEXT DEFAULT "bc_check_flood" ); -- Table for registering DApps using repositories CREATE TABLE DApps ( id INTEGER NOT NULL PRIMARY KEY, -- the ID must be unique and assigned by the repository name TEXT NOT NULL UNIQUE, description TEXT, author TEXT, license TEXT, version FLOAT NOT NULL, -- example: 0.96 is_static BOOLEAN DEFAULT 0, -- compiled static or dynamic. -- This is the name of the library (.so or .dll) file to download. This file -- will contain some or all the functions in the "table_rules". This file is -- located in the "dapp" directory. dapp_library TEXT, run BOOLEAN DEFAULT 0, -- is this DApp to be run when calling bc_run_all_apps()? is_downloaded BOOLEAN DEFAULT 0, -- the files are downloaded -- The respository and signature, without this the app is considered malicious repository INTEGER REFERENCES repositories(id), rep_sig BLOB ); -- DApps dependences. Multiple dependences per DApp are possible CREATE TABLE dependences ( dapp INTEGER REFERENCES DApps(id), dependency INTEGER REFERENCES DApps(id), -- the DApp in dependency min_version FLOAT DEFAULT 0, -- the required minimum version max_version FLOAT DEFAULT 999, PRIMARY KEY (dapp, dependency) ); CREATE TABLE repositories ( id INTEGER NOT NULL PRIMARY KEY, name TEXT NOT NULL, address TEXT NOT NULL, public_key BLOB NOT NULL, -- for signing DApps signature BLOB NOT NULL -- self signature of this row for security reasons ); /* Default values */ -- Fake first repository for testing purposes INSERT INTO repositories VALUES ( 1, --id "Bitcloud Foundation Main Repository", --name "127.0.0.1", --address "foo", --public key "bar" --signature ); -- The first DApp is Bitcloud itself, some values faked INSERT INTO DApps VALUES ( 1, --id "Bitcloud", --name "Bitcloud bare bones.", --description "Bitcloud Foundation", --author "MIT", --license 0.01, --version 1, --is static NULL, --library 1, --run 1, --is downloaded 1, --bitcloud foundation repository "foo" --signature ); -- The default dependence only requires Bitcloud to run: INSERT INTO dependences VALUES ( 1, --Bitcloud dapp 1, --Bitcloud dapp depends on itself 0, --min version 999 --max version ); -- end
the_stack
create table dbgen_version ( dv_version varchar(32), dv_create_date date , dv_create_time timestamp, dv_cmdline_args varchar(200) ); create table customer_address ( ca_address_sk int4 not null , ca_address_id char(16) not null , ca_street_number char(10) , ca_street_name varchar(60) , ca_street_type char(15) , ca_suite_number char(10) , ca_city varchar(60) , ca_county varchar(30) , ca_state char(2) , ca_zip char(10) , ca_country varchar(20) , ca_gmt_offset numeric(5,2) , ca_location_type char(20) ,primary key (ca_address_sk) ) distkey(ca_address_sk); create table customer_demographics ( cd_demo_sk int4 not null , cd_gender char(1) , cd_marital_status char(1) , cd_education_status char(20) , cd_purchase_estimate int4 , cd_credit_rating char(10) , cd_dep_count int4 , cd_dep_employed_count int4 , cd_dep_college_count int4 ,primary key (cd_demo_sk) )distkey (cd_demo_sk); create table date_dim ( d_date_sk integer not null, d_date_id char(16) not null, d_date date, d_month_seq integer , d_week_seq integer , d_quarter_seq integer , d_year integer , d_dow integer , d_moy integer , d_dom integer , d_qoy integer , d_fy_year integer , d_fy_quarter_seq integer , d_fy_week_seq integer , d_day_name char(9) , d_quarter_name char(6) , d_holiday char(1) , d_weekend char(1) , d_following_holiday char(1) , d_first_dom integer , d_last_dom integer , d_same_day_ly integer , d_same_day_lq integer , d_current_day char(1) , d_current_week char(1) , d_current_month char(1) , d_current_quarter char(1) , d_current_year char(1) , primary key (d_date_sk) ) diststyle all; create table warehouse ( w_warehouse_sk integer not null, w_warehouse_id char(16) not null, w_warehouse_name varchar(20) , w_warehouse_sq_ft integer , w_street_number char(10) , w_street_name varchar(60) , w_street_type char(15) , w_suite_number char(10) , w_city varchar(60) , w_county varchar(30) , w_state char(2) , w_zip char(10) , w_country varchar(20) , w_gmt_offset decimal(5,2) , primary key (w_warehouse_sk) ) diststyle all; create table ship_mode ( sm_ship_mode_sk integer not null, sm_ship_mode_id char(16) not null, sm_type char(30) , sm_code char(10) , sm_carrier char(20) , sm_contract char(20) , primary key (sm_ship_mode_sk) ) diststyle all; create table time_dim ( t_time_sk integer not null, t_time_id char(16) not null, t_time integer , t_hour integer , t_minute integer , t_second integer , t_am_pm char(2) , t_shift char(20) , t_sub_shift char(20) , t_meal_time char(20) , primary key (t_time_sk) ) diststyle all; create table reason ( r_reason_sk integer not null, r_reason_id char(16) not null, r_reason_desc char(100) , primary key (r_reason_sk) ) diststyle all ; create table income_band ( ib_income_band_sk integer not null, ib_lower_bound integer , ib_upper_bound integer , primary key (ib_income_band_sk) ) diststyle all; create table item ( i_item_sk int4 not null, i_item_id char(16) not null , i_rec_start_date date, i_rec_end_date date, i_item_desc varchar(200) , i_current_price numeric(7,2), i_wholesale_cost numeric(7,2), i_brand_id int4, i_brand char(50) , i_class_id int4, i_class char(50) , i_category_id int4, i_category char(50) , i_manufact_id int4, i_manufact char(50) , i_size char(20) , i_formulation char(20) , i_color char(20) , i_units char(10), i_container char(10), i_manager_id int4, i_product_name char(50) ,primary key (i_item_sk) ) distkey(i_item_sk) sortkey(i_category); create table store ( s_store_sk integer not null, s_store_id char(16) not null, s_rec_start_date date, s_rec_end_date date, s_closed_date_sk integer , s_store_name varchar(50) , s_number_employees integer , s_floor_space integer , s_hours char(20) , s_manager varchar(40) , s_market_id integer , s_geography_class varchar(100) , s_market_desc varchar(100) , s_market_manager varchar(40) , s_division_id integer , s_division_name varchar(50) , s_company_id integer , s_company_name varchar(50) , s_street_number varchar(10) , s_street_name varchar(60) , s_street_type char(15) , s_suite_number char(10) , s_city varchar(60) , s_county varchar(30) , s_state char(2) , s_zip char(10) , s_country varchar(20) , s_gmt_offset decimal(5,2) , s_tax_precentage decimal(5,2) , primary key (s_store_sk) ) diststyle all; create table call_center ( cc_call_center_sk integer not null, cc_call_center_id char(16) not null, cc_rec_start_date date, cc_rec_end_date date, cc_closed_date_sk integer , cc_open_date_sk integer , cc_name varchar(50) , cc_class varchar(50) , cc_employees integer , cc_sq_ft integer , cc_hours char(20) , cc_manager varchar(40) , cc_mkt_id integer , cc_mkt_class char(50) , cc_mkt_desc varchar(100) , cc_market_manager varchar(40) , cc_division integer , cc_division_name varchar(50) , cc_company integer , cc_company_name char(50) , cc_street_number char(10) , cc_street_name varchar(60) , cc_street_type char(15) , cc_suite_number char(10) , cc_city varchar(60) , cc_county varchar(30) , cc_state char(2) , cc_zip char(10) , cc_country varchar(20) , cc_gmt_offset decimal(5,2) , cc_tax_percentage decimal(5,2) , primary key (cc_call_center_sk) ) diststyle all; create table customer ( c_customer_sk int4 not null , c_customer_id char(16) not null , c_current_cdemo_sk int4 , c_current_hdemo_sk int4 , c_current_addr_sk int4 , c_first_shipto_date_sk int4 , c_first_sales_date_sk int4 , c_salutation char(10) , c_first_name char(20) , c_last_name char(30) , c_preferred_cust_flag char(1) , c_birth_day int4 , c_birth_month int4 , c_birth_year int4 , c_birth_country varchar(20) , c_login char(13) , c_email_address char(50) , c_last_review_date_sk int4 , primary key (c_customer_sk) ) distkey(c_customer_sk); create table web_site ( web_site_sk integer not null, web_site_id char(16) not null, web_rec_start_date date, web_rec_end_date date, web_name varchar(50) , web_open_date_sk integer , web_close_date_sk integer , web_class varchar(50) , web_manager varchar(40) , web_mkt_id integer , web_mkt_class varchar(50) , web_mkt_desc varchar(100) , web_market_manager varchar(40) , web_company_id integer , web_company_name char(50) , web_street_number char(10) , web_street_name varchar(60) , web_street_type char(15) , web_suite_number char(10) , web_city varchar(60) , web_county varchar(30) , web_state char(2) , web_zip char(10) , web_country varchar(20) , web_gmt_offset decimal(5,2) , web_tax_percentage decimal(5,2) , primary key (web_site_sk) ) diststyle all; create table store_returns ( sr_returned_date_sk int4 , sr_return_time_sk int4 , sr_item_sk int4 not null , sr_customer_sk int4 , sr_cdemo_sk int4 , sr_hdemo_sk int4 , sr_addr_sk int4 , sr_store_sk int4 , sr_reason_sk int4 , sr_ticket_number int8 not null, sr_return_quantity int4 , sr_return_amt numeric(7,2) , sr_return_tax numeric(7,2) , sr_return_amt_inc_tax numeric(7,2) , sr_fee numeric(7,2) , sr_return_ship_cost numeric(7,2) , sr_refunded_cash numeric(7,2) , sr_reversed_charge numeric(7,2) , sr_store_credit numeric(7,2) , sr_net_loss numeric(7,2) ,primary key (sr_item_sk, sr_ticket_number) ) distkey(sr_item_sk) sortkey(sr_returned_date_sk); create table household_demographics ( hd_demo_sk integer not null, hd_income_band_sk integer , hd_buy_potential char(15) , hd_dep_count integer , hd_vehicle_count integer , primary key (hd_demo_sk) ) diststyle all; create table web_page ( wp_web_page_sk integer not null, wp_web_page_id char(16) not null, wp_rec_start_date date, wp_rec_end_date date, wp_creation_date_sk integer , wp_access_date_sk integer , wp_autogen_flag char(1) , wp_customer_sk integer , wp_url varchar(100) , wp_type char(50) , wp_char_count integer , wp_link_count integer , wp_image_count integer , wp_max_ad_count integer , primary key (wp_web_page_sk) ) diststyle all; create table promotion ( p_promo_sk integer not null, p_promo_id char(16) not null, p_start_date_sk integer , p_end_date_sk integer , p_item_sk integer , p_cost decimal(15,2) , p_response_target integer , p_promo_name char(50) , p_channel_dmail char(1) , p_channel_email char(1) , p_channel_catalog char(1) , p_channel_tv char(1) , p_channel_radio char(1) , p_channel_press char(1) , p_channel_event char(1) , p_channel_demo char(1) , p_channel_details varchar(100) , p_purpose char(15) , p_discount_active char(1) , primary key (p_promo_sk) ) diststyle all; create table catalog_page ( cp_catalog_page_sk integer not null, cp_catalog_page_id char(16) not null, cp_start_date_sk integer , cp_end_date_sk integer , cp_department varchar(50) , cp_catalog_number integer , cp_catalog_page_number integer , cp_description varchar(100) , cp_type varchar(100) , primary key (cp_catalog_page_sk) ) diststyle all; create table inventory ( inv_date_sk int4 not null , inv_item_sk int4 not null , inv_warehouse_sk int4 not null , inv_quantity_on_hand int4 ,primary key (inv_date_sk, inv_item_sk, inv_warehouse_sk) ) distkey(inv_item_sk) sortkey(inv_date_sk); create table catalog_returns ( cr_returned_date_sk int4 , cr_returned_time_sk int4 , cr_item_sk int4 not null , cr_refunded_customer_sk int4 , cr_refunded_cdemo_sk int4 , cr_refunded_hdemo_sk int4 , cr_refunded_addr_sk int4 , cr_returning_customer_sk int4 , cr_returning_cdemo_sk int4 , cr_returning_hdemo_sk int4 , cr_returning_addr_sk int4 , cr_call_center_sk int4 , cr_catalog_page_sk int4 , cr_ship_mode_sk int4 , cr_warehouse_sk int4 , cr_reason_sk int4 , cr_order_number int8 not null, cr_return_quantity int4 , cr_return_amount numeric(7,2) , cr_return_tax numeric(7,2) , cr_return_amt_inc_tax numeric(7,2) , cr_fee numeric(7,2) , cr_return_ship_cost numeric(7,2) , cr_refunded_cash numeric(7,2) , cr_reversed_charge numeric(7,2) , cr_store_credit numeric(7,2) , cr_net_loss numeric(7,2) ,primary key (cr_item_sk, cr_order_number) ) distkey(cr_item_sk) sortkey(cr_returned_date_sk); create table web_returns ( wr_returned_date_sk int4 , wr_returned_time_sk int4 , wr_item_sk int4 not null , wr_refunded_customer_sk int4 , wr_refunded_cdemo_sk int4 , wr_refunded_hdemo_sk int4 , wr_refunded_addr_sk int4 , wr_returning_customer_sk int4 , wr_returning_cdemo_sk int4 , wr_returning_hdemo_sk int4 , wr_returning_addr_sk int4 , wr_web_page_sk int4 , wr_reason_sk int4 , wr_order_number int8 not null, wr_return_quantity int4 , wr_return_amt numeric(7,2) , wr_return_tax numeric(7,2) , wr_return_amt_inc_tax numeric(7,2) , wr_fee numeric(7,2) , wr_return_ship_cost numeric(7,2) , wr_refunded_cash numeric(7,2) , wr_reversed_charge numeric(7,2) , wr_account_credit numeric(7,2) , wr_net_loss numeric(7,2) ,primary key (wr_item_sk, wr_order_number) ) distkey(wr_order_number) sortkey(wr_returned_date_sk); create table web_sales ( ws_sold_date_sk int4 , ws_sold_time_sk int4 , ws_ship_date_sk int4 , ws_item_sk int4 not null , ws_bill_customer_sk int4 , ws_bill_cdemo_sk int4 , ws_bill_hdemo_sk int4 , ws_bill_addr_sk int4 , ws_ship_customer_sk int4 , ws_ship_cdemo_sk int4 , ws_ship_hdemo_sk int4 , ws_ship_addr_sk int4 , ws_web_page_sk int4 , ws_web_site_sk int4 , ws_ship_mode_sk int4 , ws_warehouse_sk int4 , ws_promo_sk int4 , ws_order_number int8 not null, ws_quantity int4 , ws_wholesale_cost numeric(7,2) , ws_list_price numeric(7,2) , ws_sales_price numeric(7,2) , ws_ext_discount_amt numeric(7,2) , ws_ext_sales_price numeric(7,2) , ws_ext_wholesale_cost numeric(7,2) , ws_ext_list_price numeric(7,2) , ws_ext_tax numeric(7,2) , ws_coupon_amt numeric(7,2) , ws_ext_ship_cost numeric(7,2) , ws_net_paid numeric(7,2) , ws_net_paid_inc_tax numeric(7,2) , ws_net_paid_inc_ship numeric(7,2) , ws_net_paid_inc_ship_tax numeric(7,2) , ws_net_profit numeric(7,2) ,primary key (ws_item_sk, ws_order_number) ) distkey(ws_order_number) sortkey(ws_sold_date_sk); create table catalog_sales ( cs_sold_date_sk int4 , cs_sold_time_sk int4 , cs_ship_date_sk int4 , cs_bill_customer_sk int4 , cs_bill_cdemo_sk int4 , cs_bill_hdemo_sk int4 , cs_bill_addr_sk int4 , cs_ship_customer_sk int4 , cs_ship_cdemo_sk int4 , cs_ship_hdemo_sk int4 , cs_ship_addr_sk int4 , cs_call_center_sk int4 , cs_catalog_page_sk int4 , cs_ship_mode_sk int4 , cs_warehouse_sk int4 , cs_item_sk int4 not null , cs_promo_sk int4 , cs_order_number int8 not null , cs_quantity int4 , cs_wholesale_cost numeric(7,2) , cs_list_price numeric(7,2) , cs_sales_price numeric(7,2) , cs_ext_discount_amt numeric(7,2) , cs_ext_sales_price numeric(7,2) , cs_ext_wholesale_cost numeric(7,2) , cs_ext_list_price numeric(7,2) , cs_ext_tax numeric(7,2) , cs_coupon_amt numeric(7,2) , cs_ext_ship_cost numeric(7,2) , cs_net_paid numeric(7,2) , cs_net_paid_inc_tax numeric(7,2) , cs_net_paid_inc_ship numeric(7,2) , cs_net_paid_inc_ship_tax numeric(7,2) , cs_net_profit numeric(7,2) ,primary key (cs_item_sk, cs_order_number) ) distkey(cs_item_sk) sortkey(cs_sold_date_sk); create table store_sales ( ss_sold_date_sk int4 , ss_sold_time_sk int4 , ss_item_sk int4 not null , ss_customer_sk int4 , ss_cdemo_sk int4 , ss_hdemo_sk int4 , ss_addr_sk int4 , ss_store_sk int4 , ss_promo_sk int4 , ss_ticket_number int8 not null, ss_quantity int4 , ss_wholesale_cost numeric(7,2) , ss_list_price numeric(7,2) , ss_sales_price numeric(7,2) , ss_ext_discount_amt numeric(7,2) , ss_ext_sales_price numeric(7,2) , ss_ext_wholesale_cost numeric(7,2) , ss_ext_list_price numeric(7,2) , ss_ext_tax numeric(7,2) , ss_coupon_amt numeric(7,2) , ss_net_paid numeric(7,2) , ss_net_paid_inc_tax numeric(7,2) , ss_net_profit numeric(7,2) ,primary key (ss_item_sk, ss_ticket_number) ) distkey(ss_item_sk) sortkey(ss_sold_date_sk); /* To load the sample data, you must provide authentication for your cluster to access Amazon S3 on your behalf. You can provide either role-based authentication or key-based authentication. Text files needed to load test data under s3://redshift-downloads/TPC-DS/2.13/10TB are publicly available. Any valid credentials should have read access. The COPY commands include a placeholder for the aws_access_key_id and aws_secret_access_key. User must update the credentials clause below with valid credentials or the command will fail. For more information check samples in https://docs.aws.amazon.com/redshift/latest/gsg/rs-gsg-create-sample-db.html */ copy call_center from 's3://redshift-downloads/TPC-DS/2.13/10TB/call_center/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy catalog_page from 's3://redshift-downloads/TPC-DS/2.13/10TB/catalog_page/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy catalog_returns from 's3://redshift-downloads/TPC-DS/2.13/10TB/catalog_returns/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy catalog_sales from 's3://redshift-downloads/TPC-DS/2.13/10TB/catalog_sales/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy customer_address from 's3://redshift-downloads/TPC-DS/2.13/10TB/customer_address/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy customer_demographics from 's3://redshift-downloads/TPC-DS/2.13/10TB/customer_demographics/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy customer from 's3://redshift-downloads/TPC-DS/2.13/10TB/customer/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy date_dim from 's3://redshift-downloads/TPC-DS/2.13/10TB/date_dim/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy household_demographics from 's3://redshift-downloads/TPC-DS/2.13/10TB/household_demographics/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy income_band from 's3://redshift-downloads/TPC-DS/2.13/10TB/income_band/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy inventory from 's3://redshift-downloads/TPC-DS/2.13/10TB/inventory/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy item from 's3://redshift-downloads/TPC-DS/2.13/10TB/item/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy promotion from 's3://redshift-downloads/TPC-DS/2.13/10TB/promotion/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy reason from 's3://redshift-downloads/TPC-DS/2.13/10TB/reason/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy ship_mode from 's3://redshift-downloads/TPC-DS/2.13/10TB/ship_mode/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy store from 's3://redshift-downloads/TPC-DS/2.13/10TB/store/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy store_returns from 's3://redshift-downloads/TPC-DS/2.13/10TB/store_returns/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy store_sales from 's3://redshift-downloads/TPC-DS/2.13/10TB/store_sales/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1'; copy time_dim from 's3://redshift-downloads/TPC-DS/2.13/10TB/time_dim/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy warehouse from 's3://redshift-downloads/TPC-DS/2.13/10TB/warehouse/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy web_page from 's3://redshift-downloads/TPC-DS/2.13/10TB/web_page/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy web_returns from 's3://redshift-downloads/TPC-DS/2.13/10TB/web_returns/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy web_sales from 's3://redshift-downloads/TPC-DS/2.13/10TB/web_sales/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; copy web_site from 's3://redshift-downloads/TPC-DS/2.13/10TB/web_site/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID>;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' EMPTYASNULL region 'us-east-1' ; select count(*) from call_center; -- 54 select count(*) from catalog_page; -- 40000 select count(*) from catalog_returns; -- 1440033112 select count(*) from catalog_sales; -- 14399964710 select count(*) from customer; -- 65000000 select count(*) from customer_address; -- 32500000 select count(*) from customer_demographics; -- 1920800 select count(*) from date_dim; -- 73049 select count(*) from household_demographics; -- 7200 select count(*) from income_band; -- 20 select count(*) from inventory; -- 1311525000 select count(*) from item; -- 402000 select count(*) from promotion; -- 2000 select count(*) from reason; -- 70 select count(*) from ship_mode; -- 20 select count(*) from store; -- 1500 select count(*) from store_returns; -- 2879356097 select count(*) from store_sales; -- 28801286459 select count(*) from time_dim; -- 86400 select count(*) from warehouse; -- 25 select count(*) from web_page; -- 4002 select count(*) from web_returns; -- 720020485 select count(*) from web_sales; -- 7199963324 select count(*) from web_site; -- 78
the_stack
-- 2017-07-11T18:17:08.226 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_ElementGroup SET UIStyle='primary',Updated=TO_TIMESTAMP('2017-07-11 18:17:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=540546 ; -- 2017-07-11T18:17:39.798 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Section SET Name='Beschreibung',Updated=TO_TIMESTAMP('2017-07-11 18:17:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Section_ID=540233 ; -- 2017-07-11T18:17:51.091 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Section_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-07-11 18:17:51','YYYY-MM-DD HH24:MI:SS'),Name='Description' WHERE AD_UI_Section_ID=540233 AND AD_Language='en_US' ; -- 2017-07-11T18:18:39.524 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Section_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-07-11 18:18:39','YYYY-MM-DD HH24:MI:SS'),Name='' WHERE AD_UI_Section_ID=540233 AND AD_Language='en_US' ; -- 2017-07-11T18:18:45.219 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Section SET Name='',Updated=TO_TIMESTAMP('2017-07-11 18:18:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Section_ID=540233 ; -- 2017-07-11T18:19:01.065 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,184,540351,TO_TIMESTAMP('2017-07-11 18:19:00','YYYY-MM-DD HH24:MI:SS'),100,'Y','Beschreibung',30,TO_TIMESTAMP('2017-07-11 18:19:00','YYYY-MM-DD HH24:MI:SS'),100,'description') ; -- 2017-07-11T18:19:01.067 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_UI_Section_ID=540351 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2017-07-11T18:19:18.411 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Section_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-07-11 18:19:18','YYYY-MM-DD HH24:MI:SS'),Name='Description',Description='',IsTranslated='Y' WHERE AD_UI_Section_ID=540351 AND AD_Language='en_US' ; -- 2017-07-11T18:19:58.642 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=545055 ; -- 2017-07-11T18:19:58.664 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_Element WHERE AD_UI_Element_ID=545056 ; -- 2017-07-11T18:20:02.989 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_UI_ElementGroup WHERE AD_UI_ElementGroup_ID=540547 ; -- 2017-07-11T18:20:11.314 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,540477,540351,TO_TIMESTAMP('2017-07-11 18:20:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2017-07-11 18:20:11','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-11T18:20:20.486 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540477,540826,TO_TIMESTAMP('2017-07-11 18:20:20','YYYY-MM-DD HH24:MI:SS'),100,'Y','description',10,TO_TIMESTAMP('2017-07-11 18:20:20','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-11T18:20:37.086 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,1067,0,184,540826,546529,TO_TIMESTAMP('2017-07-11 18:20:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Beschreibung',10,0,0,TO_TIMESTAMP('2017-07-11 18:20:37','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-11T18:20:48.797 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,3080,0,184,540826,546530,TO_TIMESTAMP('2017-07-11 18:20:48','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Notiz',20,0,0,TO_TIMESTAMP('2017-07-11 18:20:48','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-07-11T18:21:41.535 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2017-07-11 18:21:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546529 ; -- 2017-07-11T18:21:42.875 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsAdvancedField='Y',Updated=TO_TIMESTAMP('2017-07-11 18:21:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=546530 ; -- 2017-07-11T18:23:28.171 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Name auf Rechnung',Updated=TO_TIMESTAMP('2017-07-11 18:23:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=543389 ; -- 2017-07-11T18:23:49.197 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Name='Name auf Rechnung', PrintName='Name auf Rechnung',Updated=TO_TIMESTAMP('2017-07-11 18:23:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=540650 ; -- 2017-07-11T18:23:49.201 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='Name_Invoice', Name='Name auf Rechnung', Description='Alphanumeric identifier of the entity', Help='The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.' WHERE AD_Element_ID=540650 ; -- 2017-07-11T18:23:49.212 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='Name_Invoice', Name='Name auf Rechnung', Description='Alphanumeric identifier of the entity', Help='The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.', AD_Element_ID=540650 WHERE UPPER(ColumnName)='NAME_INVOICE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-07-11T18:23:49.214 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='Name_Invoice', Name='Name auf Rechnung', Description='Alphanumeric identifier of the entity', Help='The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.' WHERE AD_Element_ID=540650 AND IsCentrallyMaintained='Y' ; -- 2017-07-11T18:23:49.215 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Name auf Rechnung', Description='Alphanumeric identifier of the entity', Help='The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=540650) AND IsCentrallyMaintained='Y' ; -- 2017-07-11T18:23:49.227 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Name auf Rechnung', Name='Name auf Rechnung' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=540650) ; -- 2017-07-11T18:23:57.683 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-07-11 18:23:57','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Element_ID=540650 AND AD_Language='en_GB' ; -- 2017-07-11T18:23:57.702 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ select update_TRL_Tables_On_AD_Element_TRL_Update(540650,'en_GB') ; -- 2017-07-11T18:38:18.403 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=10,Updated=TO_TIMESTAMP('2017-07-11 18:38:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545034 ; -- 2017-07-11T18:38:22.667 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=20,Updated=TO_TIMESTAMP('2017-07-11 18:38:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545036 ; -- 2017-07-11T18:38:26.539 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=30,Updated=TO_TIMESTAMP('2017-07-11 18:38:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545037 ; -- 2017-07-11T18:38:30.061 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=40,Updated=TO_TIMESTAMP('2017-07-11 18:38:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545038 ; -- 2017-07-11T18:38:34.756 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=50,Updated=TO_TIMESTAMP('2017-07-11 18:38:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545039 ; -- 2017-07-11T18:38:42.555 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=60,Updated=TO_TIMESTAMP('2017-07-11 18:38:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545035 ; -- 2017-07-11T18:38:45.060 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=70,Updated=TO_TIMESTAMP('2017-07-11 18:38:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545032 ; -- 2017-07-11T18:38:47.555 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=80,Updated=TO_TIMESTAMP('2017-07-11 18:38:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545031 ; -- 2017-07-11T18:38:50.102 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed='N',Updated=TO_TIMESTAMP('2017-07-11 18:38:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545033 ; -- 2017-07-11T18:39:35.416 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545033 ; -- 2017-07-11T18:39:35.418 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545034 ; -- 2017-07-11T18:39:35.420 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545036 ; -- 2017-07-11T18:39:35.422 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545037 ; -- 2017-07-11T18:39:35.424 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545038 ; -- 2017-07-11T18:39:35.425 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545039 ; -- 2017-07-11T18:39:35.427 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545035 ; -- 2017-07-11T18:39:35.428 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545032 ; -- 2017-07-11T18:39:35.429 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2017-07-11 18:39:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545031 ; -- 2017-07-11T18:39:57.316 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=10,Updated=TO_TIMESTAMP('2017-07-11 18:39:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545036 ; -- 2017-07-11T18:39:57.317 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=20,Updated=TO_TIMESTAMP('2017-07-11 18:39:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545039 ; -- 2017-07-11T18:39:57.317 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=30,Updated=TO_TIMESTAMP('2017-07-11 18:39:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545038 ; -- 2017-07-11T18:39:57.318 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=40,Updated=TO_TIMESTAMP('2017-07-11 18:39:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545037 ; -- 2017-07-11T18:39:57.319 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=50,Updated=TO_TIMESTAMP('2017-07-11 18:39:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545034 ; -- 2017-07-11T18:40:37.238 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET Name='Anteil',Updated=TO_TIMESTAMP('2017-07-11 18:40:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=545036 ; -- 2017-07-11T18:40:51.686 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Anteil',Updated=TO_TIMESTAMP('2017-07-11 18:40:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6949 ; -- 2017-07-11T18:41:23.384 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET Description='', Help='', Name='Anteil', PrintName='Anteil',Updated=TO_TIMESTAMP('2017-07-11 18:41:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=2004 ; -- 2017-07-11T18:41:23.385 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='Percentage', Name='Anteil', Description='', Help='' WHERE AD_Element_ID=2004 ; -- 2017-07-11T18:41:23.394 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='Percentage', Name='Anteil', Description='', Help='', AD_Element_ID=2004 WHERE UPPER(ColumnName)='PERCENTAGE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-07-11T18:41:23.395 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='Percentage', Name='Anteil', Description='', Help='' WHERE AD_Element_ID=2004 AND IsCentrallyMaintained='Y' ; -- 2017-07-11T18:41:23.396 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Anteil', Description='', Help='' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=2004) AND IsCentrallyMaintained='Y' ; -- 2017-07-11T18:41:23.409 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Anteil', Name='Anteil' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=2004) ;
the_stack
set nocount on go print '' RAISERROR ('-- DiagInfo --', 0, 1) WITH NOWAIT select 1001 as 'DiagVersion', '2015-01-09' as 'DiagDate' print '' go print 'Script Version = 1001' print '' go SET LANGUAGE us_english PRINT '-- Script and Environment Details --' PRINT 'Name Value' PRINT '------------------------ ---------------------------------------------------' PRINT 'Script Name Misc Pssdiag Info' PRINT 'Script File Name $File: MiscPssdiagInfo.sql $' PRINT 'Revision $Revision: 1 $ ($Change: ? $)' PRINT 'Last Modified $Date: 2015/01/26 12:04:00 EST $' PRINT 'Script Begin Time ' + CONVERT (varchar(30), GETDATE(), 126) PRINT 'Current Database ' + DB_NAME() PRINT '' GO create table #summary (PropertyName nvarchar(50) primary key, PropertyValue nvarchar(256)) insert into #summary values ('ProductVersion', cast (SERVERPROPERTY('ProductVersion') as nvarchar(max))) insert into #summary values ('MajorVersion', LEFT(CONVERT(SYSNAME,SERVERPROPERTY('ProductVersion')), CHARINDEX('.', CONVERT(SYSNAME,SERVERPROPERTY('ProductVersion')), 0)-1)) insert into #summary values ('IsClustered', cast (SERVERPROPERTY('IsClustered') as nvarchar(max))) insert into #summary values ('Edition', cast (SERVERPROPERTY('Edition') as nvarchar(max))) insert into #summary values ('InstanceName', cast (SERVERPROPERTY('InstanceName') as nvarchar(max))) insert into #summary values ('SQLServerName', @@SERVERNAME) insert into #summary values ('MachineName', cast (SERVERPROPERTY('MachineName') as nvarchar(max))) insert into #summary values ('ProcessID', cast (SERVERPROPERTY('ProcessID') as nvarchar(max))) insert into #summary values ('ResourceVersion', cast (SERVERPROPERTY('ResourceVersion') as nvarchar(max))) insert into #summary values ('ServerName', cast (SERVERPROPERTY('ServerName') as nvarchar(max))) insert into #summary values ('ComputerNamePhysicalNetBIOS', cast (SERVERPROPERTY('ComputerNamePhysicalNetBIOS') as nvarchar(max))) insert into #summary values ('BuildClrVersion', cast (SERVERPROPERTY('BuildClrVersion') as nvarchar(max))) insert into #summary values ('IsFullTextInstalled', cast (SERVERPROPERTY('IsFullTextInstalled') as nvarchar(max))) insert into #summary values ('IsIntegratedSecurityOnly', cast (SERVERPROPERTY('IsIntegratedSecurityOnly') as nvarchar(max))) insert into #summary values ('ProductLevel', cast (SERVERPROPERTY('ProductLevel') as nvarchar(max))) insert into #summary values ('suser_name()', cast (SUSER_NAME() as nvarchar(max))) insert into #summary select 'number of visible schedulers', count (*) 'cnt' from sys.dm_os_schedulers where status = 'VISIBLE ONLINE' insert into #summary select 'number of visible numa nodes', count (distinct parent_node_id) 'cnt' from sys.dm_os_schedulers where status = 'VISIBLE ONLINE' insert into #summary select 'cpu_count', cpu_count from sys.dm_os_sys_info insert into #summary select 'hyperthread_ratio', hyperthread_ratio from sys.dm_os_sys_info insert into #summary select 'machine start time', convert(varchar(23),dateadd(SECOND, -ms_ticks/1000, GETDATE()),121) from sys.dm_os_sys_info insert into #summary select 'number of tempdb data files', count (*) 'cnt' from master.sys.master_files where database_id = 2 and [type] = 0 insert into #summary select 'number of active profiler traces',count(*) 'cnt' from ::fn_trace_getinfo(0) where property = 5 and convert(tinyint,value) = 1 insert into #summary select 'suser_name() default database name',default_database_name from sys.server_principals where name = SUSER_NAME() insert into #summary select 'VISIBLEONLINE_SCHEDULER_COUNT' PropertyName, count (*) PropertValue from sys.dm_os_schedulers where status='VISIBLE ONLINE' insert into #summary select 'UTCOffset_in_Hours' PropertyName, cast( datediff (MINUTE, getutcdate(), getdate()) / 60.0 as decimal(10,2)) PropertyValue declare @cpu_ticks bigint select @cpu_ticks = cpu_ticks from sys.dm_os_sys_info waitfor delay '0:0:2' select @cpu_ticks = cpu_ticks - @cpu_ticks from sys.dm_os_sys_info insert into #summary values ('cpu_ticks_per_sec', @cpu_ticks / 2 ) PRINT '' go --removing xp_instance_regread calls & related variables as a part of issue #149 DECLARE @value NVARCHAR(256) DECLARE @pos INT --get windows info from dmv SELECT @value = windows_release FROM sys.dm_os_windows_info SET @pos = CHARINDEX(N'.', @value) IF @pos != 0 BEGIN INSERT INTO #summary VALUES ('operating system version major',SUBSTRING(@value, 1, @pos-1)) INSERT INTO #summary VALUES ('operating system version minor',SUBSTRING(@value, @pos+1, LEN(@value))) --inserting NULL to keep same #summary structure INSERT INTO #summary VALUES ('operating system version build', NULL) INSERT INTO #summary VALUES ('operating system', NULL) INSERT INTO #summary VALUES ('operating system install date',NULL) END --inserting NULL to keep same #summary structure INSERT INTO #summary VALUES ('registry SystemManufacturer', NULL) INSERT INTO #summary VALUES ('registry SystemProductName', NULL) INSERT INTO #summary VALUES ('registry ActivePowerScheme (default)', NULL) INSERT INTO #summary VALUES ('registry ActivePowerScheme', NULL) --inserting OS Edition and Build from @@Version INSERT INTO #summary VALUES ('OS Edition and Build from @@Version', REPLACE(LTRIM(SUBSTRING(@@VERSION,CHARINDEX(' on ',@@VERSION)+3,100)),CHAR(10),'')) IF (@@MICROSOFTVERSION >= 167773760) --10.0.1600 begin exec sp_executesql N'insert into #summary select ''sqlserver_start_time'', convert(varchar(23),sqlserver_start_time,121) from sys.dm_os_sys_info' exec sp_executesql N'insert into #summary select ''resource governor enabled'', is_enabled from sys.resource_governor_configuration' insert into #summary values ('FilestreamShareName', cast (SERVERPROPERTY('FilestreamShareName') as nvarchar(max))) insert into #summary values ('FilestreamConfiguredLevel', cast (SERVERPROPERTY('FilestreamConfiguredLevel') as nvarchar(max))) insert into #summary values ('FilestreamEffectiveLevel', cast (SERVERPROPERTY('FilestreamEffectiveLevel') as nvarchar(max))) insert into #summary select 'number of active extended event traces',count(*) as 'cnt' from sys.dm_xe_sessions end IF (@@MICROSOFTVERSION >= 171050560) --10.50.1600 begin exec sp_executesql N'insert into #summary select ''possibly running in virtual machine'', virtual_machine_type from sys.dm_os_sys_info' end IF (@@MICROSOFTVERSION >= 184551476) --11.0.2100 begin exec sp_executesql N'insert into #summary select ''physical_memory_kb'', physical_memory_kb from sys.dm_os_sys_info' insert into #summary values ('HadrManagerStatus', cast (SERVERPROPERTY('HadrManagerStatus') as nvarchar(max))) insert into #summary values ('IsHadrEnabled', cast (SERVERPROPERTY('IsHadrEnabled') as nvarchar(max))) end IF (@@MICROSOFTVERSION >= 201328592) --12.0.2000 begin insert into #summary values ('IsLocalDB', cast (SERVERPROPERTY('IsLocalDB') as nvarchar(max))) insert into #summary values ('IsXTPSupported', cast (SERVERPROPERTY('IsXTPSupported') as nvarchar(max))) end RAISERROR ('--ServerProperty--', 0, 1) WITH NOWAIT select * from #summary order by PropertyName drop table #summary print '' GO --changing xp_instance_regenumvalues to dmv access as a part of issue #149 declare @startup table (ArgsName nvarchar(10), ArgsValue nvarchar(max)) insert into @startup SELECT sReg.value_name, CAST(sReg.value_data AS nvarchar(max)) FROM sys.dm_server_registry AS sReg WHERE sReg.value_name LIKE N'SQLArg%'; RAISERROR ('--Startup Parameters--', 0, 1) WITH NOWAIT select * from @startup go print '' create table #traceflg (TraceFlag int, Status int, Global int, Session int) insert into #traceflg exec ('dbcc tracestatus (-1)') print '' RAISERROR ('--traceflags--', 0, 1) WITH NOWAIT select * from #traceflg drop table #traceflg go print '' RAISERROR ('--sys.dm_os_schedulers--', 0, 1) WITH NOWAIT select * from sys.dm_os_schedulers go IF (@@MICROSOFTVERSION >= 167773760 --10.0.1600 and @@MICROSOFTVERSION < 171048960) --10.50.0.0 begin print '' RAISERROR ('--sys.dm_os_nodes--', 0, 1) WITH NOWAIT exec sp_executesql N'select node_id, memory_object_address, memory_clerk_address, io_completion_worker_address, memory_node_id, cpu_affinity_mask, online_scheduler_count, idle_scheduler_count active_worker_count, avg_load_balance, timer_task_affinity_mask, permanent_task_affinity_mask, resource_monitor_state, node_state_desc from sys.dm_os_nodes' end go IF (@@MICROSOFTVERSION >= 171048960) --10.50.0.0 begin print '' RAISERROR ('--sys.dm_os_nodes--', 0, 1) WITH NOWAIT exec sp_executesql N'select node_id, memory_object_address, memory_clerk_address, io_completion_worker_address, memory_node_id, cpu_affinity_mask, online_scheduler_count, idle_scheduler_count active_worker_count, avg_load_balance, timer_task_affinity_mask, permanent_task_affinity_mask, resource_monitor_state, online_scheduler_mask, processor_group, node_state_desc from sys.dm_os_nodes' end go print '' RAISERROR ('--dm_os_sys_info--', 0, 1) WITH NOWAIT select * from sys.dm_os_sys_info go if cast (SERVERPROPERTY('IsClustered') as int) = 1 begin print '' RAISERROR ('--fn_virtualservernodes--', 0, 1) WITH NOWAIT SELECT * FROM fn_virtualservernodes() end go print '' RAISERROR ('--sys.configurations--', 0, 1) WITH NOWAIT select configuration_id, convert(int,value) as 'value', convert(int,value_in_use) as 'value_in_use', convert(int,minimum) as 'minimum', convert(int,maximum) as 'maximum', convert(int,is_dynamic) as 'is_dynamic', convert(int,is_advanced) as 'is_advanced', name from sys.configurations order by name go print '' RAISERROR ('--database files--', 0, 1) WITH NOWAIT select database_id, [file_id], file_guid, [type], LEFT(type_desc,10) as 'type_desc', data_space_id, [state], LEFT(state_desc,16) as 'state_desc', size, max_size, growth, is_media_read_only, is_read_only, is_sparse, is_percent_growth, is_name_reserved, create_lsn, drop_lsn, read_only_lsn, read_write_lsn, differential_base_lsn, differential_base_guid, differential_base_time, redo_start_lsn, redo_start_fork_guid, redo_target_lsn, redo_target_fork_guid, backup_lsn, db_name(database_id) as 'Database_name', name, physical_name from master.sys.master_files order by database_id, type, file_id print '' go print '' RAISERROR ('--sys.databases_ex--', 0, 1) WITH NOWAIT select cast(DATABASEPROPERTYEX (name,'IsAutoCreateStatistics') as int) 'IsAutoCreateStatistics', cast( DATABASEPROPERTYEX (name,'IsAutoUpdateStatistics') as int) 'IsAutoUpdateStatistics', cast (DATABASEPROPERTYEX (name,'IsAutoCreateStatisticsIncremental') as int) 'IsAutoCreateStatisticsIncremental', * from sys.databases go print '' RAISERROR ('-- Windows Group Default Databases other than master --', 0, 1) WITH NOWAIT select name,default_database_name from sys.server_principals where [type] = 'G' and is_disabled = 0 and default_database_name != 'master' go print '' RAISERROR ('-- sys.database_mirroring --', 0, 1) WITH NOWAIT IF (@@MICROSOFTVERSION >= 167772160) --10.0.0 begin exec sp_executesql N'select database_id, mirroring_guid, mirroring_state, mirroring_role, mirroring_role_sequence, mirroring_safety_level, mirroring_safety_sequence, mirroring_witness_state, mirroring_failover_lsn, mirroring_end_of_log_lsn, mirroring_replication_lsn, mirroring_connection_timeout, mirroring_redo_queue, db_name(database_id) as ''database_name'', mirroring_partner_name, mirroring_partner_instance, mirroring_witness_name from sys.database_mirroring where mirroring_guid IS NOT NULL' end else begin select database_id, mirroring_guid, mirroring_state, mirroring_role, mirroring_role_sequence, mirroring_safety_level, mirroring_safety_sequence, mirroring_witness_state, mirroring_failover_lsn, mirroring_connection_timeout, mirroring_redo_queue, db_name(database_id) as 'database_name', mirroring_partner_name, mirroring_partner_instance, mirroring_witness_name from sys.database_mirroring where mirroring_guid IS NOT NULL end go IF @@MICROSOFTVERSION >= 184551476 --11.0.2100 begin print '' RAISERROR ('--Hadron Configuration--', 0, 1) WITH NOWAIT SELECT ag.name AS ag_name, ar.replica_server_name , ar_state.is_local AS is_ag_replica_local, ag_replica_role_desc = CASE WHEN ar_state.role_desc IS NULL THEN N'<unknown>' ELSE ar_state.role_desc END, ag_replica_operational_state_desc = CASE WHEN ar_state.operational_state_desc IS NULL THEN N'<unknown>' ELSE ar_state.operational_state_desc END, ag_replica_connected_state_desc = CASE WHEN ar_state.connected_state_desc IS NULL THEN CASE WHEN ar_state.is_local = 1 THEN N'CONNECTED' ELSE N'<unknown>' END ELSE ar_state.connected_state_desc END --ar.secondary_role_allow_read_desc FROM sys.availability_groups AS ag JOIN sys.availability_replicas AS ar ON ag.group_id = ar.group_id JOIN sys.dm_hadr_availability_replica_states AS ar_state ON ar.replica_id = ar_state.replica_id; print '' RAISERROR ('--sys.availability_groups--', 0, 1) WITH NOWAIT select * from sys.availability_groups print '' RAISERROR ('--sys.dm_hadr_availability_group_states--', 0, 1) WITH NOWAIT select * from sys.dm_hadr_availability_group_states print '' RAISERROR ('--sys.dm_hadr_availability_replica_states--', 0, 1) WITH NOWAIT select * from sys.dm_hadr_availability_replica_states print '' RAISERROR ('--sys.availability_replicas--', 0, 1) WITH NOWAIT select * from sys.availability_replicas print '' RAISERROR ('--sys.dm_hadr_database_replica_cluster_states--', 0, 1) WITH NOWAIT select * from sys.dm_hadr_database_replica_cluster_states print '' RAISERROR ('--sys.availability_group_listeners--', 0, 1) WITH NOWAIT select * from sys.availability_group_listeners print '' RAISERROR ('--sys.dm_hadr_cluster_members--', 0, 1) WITH NOWAIT select * from sys.dm_hadr_cluster_members end go print '-- sys.change_tracking_databases --' select * from sys.change_tracking_databases print '' print '-- sys.dm_database_encryption_keys --' select database_id, encryption_state from sys.dm_database_encryption_keys print '' go IF @@MICROSOFTVERSION >= 251658240 --15.0.2000 begin print '-- sys.dm_tran_persistent_version_store_stats --' select * From sys.dm_tran_persistent_version_store_stats print '' end go /* --windows version from @@version declare @pos int set @pos = CHARINDEX(N' on ',@@VERSION) print substring(@@VERSION, @pos + 4, LEN(@@VERSION)) */ print '--profiler trace summary--' SELECT traceid, property, CONVERT (varchar(1024), value) AS value FROM :: fn_trace_getinfo(default) go --we need the space for import print '' print '--trace event details--' select trace_id, status, case when row_number = 1 then path else NULL end as path, case when row_number = 1 then max_size else NULL end as max_size, case when row_number = 1 then start_time else NULL end as start_time, case when row_number = 1 then stop_time else NULL end as stop_time, max_files, is_rowset, is_rollover, is_shutdown, is_default, buffer_count, buffer_size, last_event_time, event_count, trace_event_id, trace_event_name, trace_column_id, trace_column_name, expensive_event from (SELECT t.id AS trace_id, row_number() over (partition by t.id order by te.trace_event_id, tc.trace_column_id) as row_number, t.status, t.path, t.max_size, t.start_time, t.stop_time, t.max_files, t.is_rowset, t.is_rollover, t.is_shutdown, t.is_default, t.buffer_count, t.buffer_size, t.last_event_time, t.event_count, te.trace_event_id, te.name AS trace_event_name, tc.trace_column_id, tc.name AS trace_column_name, case when te.trace_event_id in (23, 24, 40, 41, 44, 45, 51, 52, 54, 68, 96, 97, 98, 113, 114, 122, 146, 180) then cast(1 as bit) else cast(0 as bit) end as expensive_event FROM sys.traces t CROSS apply ::fn_trace_geteventinfo(t .id) AS e JOIN sys.trace_events te ON te.trace_event_id = e.eventid JOIN sys.trace_columns tc ON e.columnid = trace_column_id) as x go print '' print '--XEvent Session Details--' SELECT convert(nvarchar(128), sess.NAME) as 'session_name', convert(nvarchar(128), event_name) as event_name, CASE WHEN xemap.trace_event_id IN ( 23, 24, 40, 41,44, 45, 51, 52,54, 68, 96, 97,98, 113, 114, 122,146, 180 ) THEN Cast(1 AS BIT) ELSE Cast(0 AS BIT) END AS expensive_event FROM sys.dm_xe_sessions sess INNER JOIN sys.dm_xe_session_events evt ON sess.address = evt.event_session_address INNER JOIN sys.trace_xe_event_map xemap ON evt.event_name = xemap.xe_event_name collate database_default print '' go
the_stack
CREATE TABLE brintest_bloom (byteacol bytea, charcol "char", namecol name, int8col bigint, int2col smallint, int4col integer, textcol text, oidcol oid, float4col real, float8col double precision, macaddrcol macaddr, inetcol inet, cidrcol cidr, bpcharcol character, datecol date, timecol time without time zone, timestampcol timestamp without time zone, timestamptzcol timestamp with time zone, intervalcol interval, timetzcol time with time zone, numericcol numeric, uuidcol uuid, lsncol pg_lsn ) WITH (fillfactor=10); INSERT INTO brintest_bloom SELECT repeat(stringu1, 8)::bytea, substr(stringu1, 1, 1)::"char", stringu1::name, 142857 * tenthous, thousand, twothousand, repeat(stringu1, 8), unique1::oid, (four + 1.0)/(hundred+1), odd::float8 / (tenthous + 1), format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr, inet '10.2.3.4/24' + tenthous, cidr '10.2.3/24' + tenthous, substr(stringu1, 1, 1)::bpchar, date '1995-08-15' + tenthous, time '01:20:30' + thousand * interval '18.5 second', timestamp '1942-07-23 03:05:09' + tenthous * interval '36.38 hours', timestamptz '1972-10-10 03:00' + thousand * interval '1 hour', justify_days(justify_hours(tenthous * interval '12 minutes')), timetz '01:30:20+02' + hundred * interval '15 seconds', tenthous::numeric(36,30) * fivethous * even / (hundred + 1), format('%s%s-%s-%s-%s-%s%s%s', to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'))::uuid, format('%s/%s%s', odd, even, tenthous)::pg_lsn FROM tenk1 ORDER BY unique2 LIMIT 100; -- throw in some NULL's and different values INSERT INTO brintest_bloom (inetcol, cidrcol) SELECT inet 'fe80::6e40:8ff:fea9:8c46' + tenthous, cidr 'fe80::6e40:8ff:fea9:8c46' + tenthous FROM tenk1 ORDER BY thousand, tenthous LIMIT 25; -- test bloom specific index options -- ndistinct must be >= -1.0 CREATE INDEX brinidx_bloom ON brintest_bloom USING brin ( byteacol bytea_bloom_ops(n_distinct_per_range = -1.1) ); -- false_positive_rate must be between 0.0001 and 0.25 CREATE INDEX brinidx_bloom ON brintest_bloom USING brin ( byteacol bytea_bloom_ops(false_positive_rate = 0.00009) ); CREATE INDEX brinidx_bloom ON brintest_bloom USING brin ( byteacol bytea_bloom_ops(false_positive_rate = 0.26) ); CREATE INDEX brinidx_bloom ON brintest_bloom USING brin ( byteacol bytea_bloom_ops, charcol char_bloom_ops, namecol name_bloom_ops, int8col int8_bloom_ops, int2col int2_bloom_ops, int4col int4_bloom_ops, textcol text_bloom_ops, oidcol oid_bloom_ops, float4col float4_bloom_ops, float8col float8_bloom_ops, macaddrcol macaddr_bloom_ops, inetcol inet_bloom_ops, cidrcol inet_bloom_ops, bpcharcol bpchar_bloom_ops, datecol date_bloom_ops, timecol time_bloom_ops, timestampcol timestamp_bloom_ops, timestamptzcol timestamptz_bloom_ops, intervalcol interval_bloom_ops, timetzcol timetz_bloom_ops, numericcol numeric_bloom_ops, uuidcol uuid_bloom_ops, lsncol pg_lsn_bloom_ops ) with (pages_per_range = 1); CREATE TABLE brinopers_bloom (colname name, typ text, op text[], value text[], matches int[], check (cardinality(op) = cardinality(value)), check (cardinality(op) = cardinality(matches))); INSERT INTO brinopers_bloom VALUES ('byteacol', 'bytea', '{=}', '{BNAAAABNAAAABNAAAABNAAAABNAAAABNAAAABNAAAABNAAAA}', '{1}'), ('charcol', '"char"', '{=}', '{M}', '{6}'), ('namecol', 'name', '{=}', '{MAAAAA}', '{2}'), ('int2col', 'int2', '{=}', '{800}', '{1}'), ('int4col', 'int4', '{=}', '{800}', '{1}'), ('int8col', 'int8', '{=}', '{1257141600}', '{1}'), ('textcol', 'text', '{=}', '{BNAAAABNAAAABNAAAABNAAAABNAAAABNAAAABNAAAABNAAAA}', '{1}'), ('oidcol', 'oid', '{=}', '{8800}', '{1}'), ('float4col', 'float4', '{=}', '{1}', '{4}'), ('float8col', 'float8', '{=}', '{0}', '{1}'), ('macaddrcol', 'macaddr', '{=}', '{2c:00:2d:00:16:00}', '{2}'), ('inetcol', 'inet', '{=}', '{10.2.14.231/24}', '{1}'), ('inetcol', 'cidr', '{=}', '{fe80::6e40:8ff:fea9:8c46}', '{1}'), ('cidrcol', 'inet', '{=}', '{10.2.14/24}', '{2}'), ('cidrcol', 'inet', '{=}', '{fe80::6e40:8ff:fea9:8c46}', '{1}'), ('cidrcol', 'cidr', '{=}', '{10.2.14/24}', '{2}'), ('cidrcol', 'cidr', '{=}', '{fe80::6e40:8ff:fea9:8c46}', '{1}'), ('bpcharcol', 'bpchar', '{=}', '{W}', '{6}'), ('datecol', 'date', '{=}', '{2009-12-01}', '{1}'), ('timecol', 'time', '{=}', '{02:28:57}', '{1}'), ('timestampcol', 'timestamp', '{=}', '{1964-03-24 19:26:45}', '{1}'), ('timestamptzcol', 'timestamptz', '{=}', '{1972-10-19 09:00:00-07}', '{1}'), ('intervalcol', 'interval', '{=}', '{1 mons 13 days 12:24}', '{1}'), ('timetzcol', 'timetz', '{=}', '{01:35:50+02}', '{2}'), ('numericcol', 'numeric', '{=}', '{2268164.347826086956521739130434782609}', '{1}'), ('uuidcol', 'uuid', '{=}', '{52225222-5222-5222-5222-522252225222}', '{1}'), ('lsncol', 'pg_lsn', '{=, IS, IS NOT}', '{44/455222, NULL, NULL}', '{1, 25, 100}'); DO $x$ DECLARE r record; r2 record; cond text; idx_ctids tid[]; ss_ctids tid[]; count int; plan_ok bool; plan_line text; BEGIN FOR r IN SELECT colname, oper, typ, value[ordinality], matches[ordinality] FROM brinopers_bloom, unnest(op) WITH ORDINALITY AS oper LOOP -- prepare the condition IF r.value IS NULL THEN cond := format('%I %s %L', r.colname, r.oper, r.value); ELSE cond := format('%I %s %L::%s', r.colname, r.oper, r.value, r.typ); END IF; -- run the query using the brin index SET enable_seqscan = 0; SET enable_bitmapscan = 1; plan_ok := false; FOR plan_line IN EXECUTE format($y$EXPLAIN SELECT array_agg(ctid) FROM brintest_bloom WHERE %s $y$, cond) LOOP IF plan_line LIKE '%Bitmap Heap Scan on brintest_bloom%' THEN plan_ok := true; END IF; END LOOP; IF NOT plan_ok THEN RAISE WARNING 'did not get bitmap indexscan plan for %', r; END IF; EXECUTE format($y$SELECT array_agg(ctid) FROM brintest_bloom WHERE %s $y$, cond) INTO idx_ctids; -- run the query using a seqscan SET enable_seqscan = 1; SET enable_bitmapscan = 0; plan_ok := false; FOR plan_line IN EXECUTE format($y$EXPLAIN SELECT array_agg(ctid) FROM brintest_bloom WHERE %s $y$, cond) LOOP IF plan_line LIKE '%Seq Scan on brintest_bloom%' THEN plan_ok := true; END IF; END LOOP; IF NOT plan_ok THEN RAISE WARNING 'did not get seqscan plan for %', r; END IF; EXECUTE format($y$SELECT array_agg(ctid) FROM brintest_bloom WHERE %s $y$, cond) INTO ss_ctids; -- make sure both return the same results count := array_length(idx_ctids, 1); IF NOT (count = array_length(ss_ctids, 1) AND idx_ctids @> ss_ctids AND idx_ctids <@ ss_ctids) THEN -- report the results of each scan to make the differences obvious RAISE WARNING 'something not right in %: count %', r, count; SET enable_seqscan = 1; SET enable_bitmapscan = 0; FOR r2 IN EXECUTE 'SELECT ' || r.colname || ' FROM brintest_bloom WHERE ' || cond LOOP RAISE NOTICE 'seqscan: %', r2; END LOOP; SET enable_seqscan = 0; SET enable_bitmapscan = 1; FOR r2 IN EXECUTE 'SELECT ' || r.colname || ' FROM brintest_bloom WHERE ' || cond LOOP RAISE NOTICE 'bitmapscan: %', r2; END LOOP; END IF; -- make sure we found expected number of matches IF count != r.matches THEN RAISE WARNING 'unexpected number of results % for %', count, r; END IF; END LOOP; END; $x$; RESET enable_seqscan; RESET enable_bitmapscan; INSERT INTO brintest_bloom SELECT repeat(stringu1, 42)::bytea, substr(stringu1, 1, 1)::"char", stringu1::name, 142857 * tenthous, thousand, twothousand, repeat(stringu1, 42), unique1::oid, (four + 1.0)/(hundred+1), odd::float8 / (tenthous + 1), format('%s:00:%s:00:%s:00', to_hex(odd), to_hex(even), to_hex(hundred))::macaddr, inet '10.2.3.4' + tenthous, cidr '10.2.3/24' + tenthous, substr(stringu1, 1, 1)::bpchar, date '1995-08-15' + tenthous, time '01:20:30' + thousand * interval '18.5 second', timestamp '1942-07-23 03:05:09' + tenthous * interval '36.38 hours', timestamptz '1972-10-10 03:00' + thousand * interval '1 hour', justify_days(justify_hours(tenthous * interval '12 minutes')), timetz '01:30:20' + hundred * interval '15 seconds', tenthous::numeric(36,30) * fivethous * even / (hundred + 1), format('%s%s-%s-%s-%s-%s%s%s', to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'), to_char(tenthous, 'FM0000'))::uuid, format('%s/%s%s', odd, even, tenthous)::pg_lsn FROM tenk1 ORDER BY unique2 LIMIT 5 OFFSET 5; SELECT brin_desummarize_range('brinidx_bloom', 0); VACUUM brintest_bloom; -- force a summarization cycle in brinidx UPDATE brintest_bloom SET int8col = int8col * int4col; UPDATE brintest_bloom SET textcol = '' WHERE textcol IS NOT NULL; -- Tests for brin_summarize_new_values SELECT brin_summarize_new_values('brintest_bloom'); -- error, not an index SELECT brin_summarize_new_values('tenk1_unique1'); -- error, not a BRIN index SELECT brin_summarize_new_values('brinidx_bloom'); -- ok, no change expected -- Tests for brin_desummarize_range SELECT brin_desummarize_range('brinidx_bloom', -1); -- error, invalid range SELECT brin_desummarize_range('brinidx_bloom', 0); SELECT brin_desummarize_range('brinidx_bloom', 0); SELECT brin_desummarize_range('brinidx_bloom', 100000000); -- Test brin_summarize_range CREATE TABLE brin_summarize_bloom ( value int ) WITH (fillfactor=10, autovacuum_enabled=false); CREATE INDEX brin_summarize_bloom_idx ON brin_summarize_bloom USING brin (value) WITH (pages_per_range=2); -- Fill a few pages DO $$ DECLARE curtid tid; BEGIN LOOP INSERT INTO brin_summarize_bloom VALUES (1) RETURNING ctid INTO curtid; EXIT WHEN curtid > tid '(2, 0)'; END LOOP; END; $$; -- summarize one range SELECT brin_summarize_range('brin_summarize_bloom_idx', 0); -- nothing: already summarized SELECT brin_summarize_range('brin_summarize_bloom_idx', 1); -- summarize one range SELECT brin_summarize_range('brin_summarize_bloom_idx', 2); -- nothing: page doesn't exist in table SELECT brin_summarize_range('brin_summarize_bloom_idx', 4294967295); -- invalid block number values SELECT brin_summarize_range('brin_summarize_bloom_idx', -1); SELECT brin_summarize_range('brin_summarize_bloom_idx', 4294967296); -- test brin cost estimates behave sanely based on correlation of values CREATE TABLE brin_test_bloom (a INT, b INT); INSERT INTO brin_test_bloom SELECT x/100,x%100 FROM generate_series(1,10000) x(x); CREATE INDEX brin_test_bloom_a_idx ON brin_test_bloom USING brin (a) WITH (pages_per_range = 2); CREATE INDEX brin_test_bloom_b_idx ON brin_test_bloom USING brin (b) WITH (pages_per_range = 2); VACUUM ANALYZE brin_test_bloom; -- Ensure brin index is used when columns are perfectly correlated EXPLAIN (COSTS OFF) SELECT * FROM brin_test_bloom WHERE a = 1; -- Ensure brin index is not used when values are not correlated EXPLAIN (COSTS OFF) SELECT * FROM brin_test_bloom WHERE b = 1;
the_stack
--TODO: Find a way to nicely generalize landcover --CREATE TABLE IF NOT EXISTS landcover_grouped_gen2 AS ( -- SELECT osm_id, ST_Simplify((ST_Dump(geometry)).geom, 600) AS geometry, landuse, "natural", wetland -- FROM ( -- SELECT max(osm_id) AS osm_id, ST_Union(ST_Buffer(geometry, 600)) AS geometry, landuse, "natural", wetland -- FROM osm_landcover_polygon_gen1 -- GROUP BY LabelGrid(geometry, 15000000), landuse, "natural", wetland -- ) AS grouped_measurements --); --CREATE INDEX IF NOT EXISTS landcover_grouped_gen2_geometry_idx ON landcover_grouped_gen2 USING gist(geometry); CREATE OR REPLACE FUNCTION landcover_class(subclass varchar) RETURNS text AS $$ SELECT CASE %%FIELD_MAPPING: class %% END; $$ LANGUAGE SQL IMMUTABLE -- STRICT PARALLEL SAFE; -- ne_50m_antarctic_ice_shelves_polys -- etldoc: ne_50m_antarctic_ice_shelves_polys -> ne_50m_antarctic_ice_shelves_polys_gen_z4 DROP MATERIALIZED VIEW IF EXISTS ne_50m_antarctic_ice_shelves_polys_gen_z4 CASCADE; CREATE MATERIALIZED VIEW ne_50m_antarctic_ice_shelves_polys_gen_z4 AS ( SELECT ST_Simplify(geometry, ZRes(6)) as geometry, 'ice_shelf'::text AS subclass FROM ne_50m_antarctic_ice_shelves_polys ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_50m_antarctic_ice_shelves_polys_gen_z4_idx ON ne_50m_antarctic_ice_shelves_polys_gen_z4 USING gist (geometry); -- ne_110m_glaciated_areas -- etldoc: ne_110m_glaciated_areas -> ne_110m_glaciated_areas_gen_z1 DROP MATERIALIZED VIEW IF EXISTS ne_110m_glaciated_areas_gen_z1 CASCADE; CREATE MATERIALIZED VIEW ne_110m_glaciated_areas_gen_z1 AS ( SELECT ST_Simplify(geometry, ZRes(3)) as geometry, 'glacier'::text AS subclass FROM ne_110m_glaciated_areas ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_110m_glaciated_areas_gen_z1_idx ON ne_110m_glaciated_areas_gen_z1 USING gist (geometry); -- etldoc: ne_110m_glaciated_areas_gen_z1 -> ne_110m_glaciated_areas_gen_z0 DROP MATERIALIZED VIEW IF EXISTS ne_110m_glaciated_areas_gen_z0 CASCADE; CREATE MATERIALIZED VIEW ne_110m_glaciated_areas_gen_z0 AS ( SELECT ST_Simplify(geometry, ZRes(2)) as geometry, subclass FROM ne_110m_glaciated_areas_gen_z1 ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_110m_glaciated_areas_gen_z0_idx ON ne_110m_glaciated_areas_gen_z0 USING gist (geometry); -- etldoc: ne_50m_antarctic_ice_shelves_polys_gen_z4 -> ne_50m_antarctic_ice_shelves_polys_gen_z3 DROP MATERIALIZED VIEW IF EXISTS ne_50m_antarctic_ice_shelves_polys_gen_z3 CASCADE; CREATE MATERIALIZED VIEW ne_50m_antarctic_ice_shelves_polys_gen_z3 AS ( SELECT ST_Simplify(geometry, ZRes(5)) as geometry, subclass FROM ne_50m_antarctic_ice_shelves_polys_gen_z4 ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_50m_antarctic_ice_shelves_polys_gen_z3_idx ON ne_50m_antarctic_ice_shelves_polys_gen_z3 USING gist (geometry); -- etldoc: ne_50m_antarctic_ice_shelves_polys_gen_z3 -> ne_50m_antarctic_ice_shelves_polys_gen_z2 DROP MATERIALIZED VIEW IF EXISTS ne_50m_antarctic_ice_shelves_polys_gen_z2 CASCADE; CREATE MATERIALIZED VIEW ne_50m_antarctic_ice_shelves_polys_gen_z2 AS ( SELECT ST_Simplify(geometry, ZRes(4)) as geometry, subclass FROM ne_50m_antarctic_ice_shelves_polys_gen_z3 ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_50m_antarctic_ice_shelves_polys_gen_z2_idx ON ne_50m_antarctic_ice_shelves_polys_gen_z2 USING gist (geometry); -- ne_50m_glaciated_areas -- etldoc: ne_50m_glaciated_areas -> ne_50m_glaciated_areas_gen_z4 DROP MATERIALIZED VIEW IF EXISTS ne_50m_glaciated_areas_gen_z4 CASCADE; CREATE MATERIALIZED VIEW ne_50m_glaciated_areas_gen_z4 AS ( SELECT ST_Simplify(geometry, ZRes(6)) as geometry, 'glacier'::text AS subclass FROM ne_50m_glaciated_areas ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_50m_glaciated_areas_gen_z4_idx ON ne_50m_glaciated_areas_gen_z4 USING gist (geometry); -- etldoc: ne_50m_glaciated_areas_gen_z4 -> ne_50m_glaciated_areas_gen_z3 DROP MATERIALIZED VIEW IF EXISTS ne_50m_glaciated_areas_gen_z3 CASCADE; CREATE MATERIALIZED VIEW ne_50m_glaciated_areas_gen_z3 AS ( SELECT ST_Simplify(geometry, ZRes(5)) as geometry, subclass FROM ne_50m_glaciated_areas_gen_z4 ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_50m_glaciated_areas_gen_z3_idx ON ne_50m_glaciated_areas_gen_z3 USING gist (geometry); -- etldoc: ne_50m_glaciated_areas_gen_z3 -> ne_50m_glaciated_areas_gen_z2 DROP MATERIALIZED VIEW IF EXISTS ne_50m_glaciated_areas_gen_z2 CASCADE; CREATE MATERIALIZED VIEW ne_50m_glaciated_areas_gen_z2 AS ( SELECT ST_Simplify(geometry, ZRes(4)) as geometry, subclass FROM ne_50m_glaciated_areas_gen_z3 ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_50m_glaciated_areas_gen_z2_idx ON ne_50m_glaciated_areas_gen_z2 USING gist (geometry); -- ne_10m_glaciated_areas -- etldoc: ne_10m_glaciated_areas -> ne_10m_glaciated_areas_gen_z6 DROP MATERIALIZED VIEW IF EXISTS ne_10m_glaciated_areas_gen_z6 CASCADE; CREATE MATERIALIZED VIEW ne_10m_glaciated_areas_gen_z6 AS ( SELECT ST_Simplify(geometry, ZRes(8)) as geometry, 'glacier'::text AS subclass FROM ne_10m_glaciated_areas ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_10m_glaciated_areas_gen_z6_idx ON ne_10m_glaciated_areas_gen_z6 USING gist (geometry); -- etldoc: ne_10m_glaciated_areas_gen_z6 -> ne_10m_glaciated_areas_gen_z5 DROP MATERIALIZED VIEW IF EXISTS ne_10m_glaciated_areas_gen_z5 CASCADE; CREATE MATERIALIZED VIEW ne_10m_glaciated_areas_gen_z5 AS ( SELECT ST_Simplify(geometry, ZRes(7)) as geometry, subclass FROM ne_10m_glaciated_areas_gen_z6 ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_10m_glaciated_areas_gen_z5_idx ON ne_10m_glaciated_areas_gen_z5 USING gist (geometry); -- ne_10m_antarctic_ice_shelves_polys -- etldoc: ne_10m_antarctic_ice_shelves_polys -> ne_10m_antarctic_ice_shelves_polys_gen_z6 DROP MATERIALIZED VIEW IF EXISTS ne_10m_antarctic_ice_shelves_polys_gen_z6 CASCADE; CREATE MATERIALIZED VIEW ne_10m_antarctic_ice_shelves_polys_gen_z6 AS ( SELECT ST_Simplify(geometry, ZRes(8)) as geometry, 'ice_shelf'::text AS subclass FROM ne_10m_antarctic_ice_shelves_polys ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_10m_antarctic_ice_shelves_polys_gen_z6_idx ON ne_10m_antarctic_ice_shelves_polys_gen_z6 USING gist (geometry); -- etldoc: ne_10m_antarctic_ice_shelves_polys_gen_z6 -> ne_10m_antarctic_ice_shelves_polys_gen_z5 DROP MATERIALIZED VIEW IF EXISTS ne_10m_antarctic_ice_shelves_polys_gen_z5 CASCADE; CREATE MATERIALIZED VIEW ne_10m_antarctic_ice_shelves_polys_gen_z5 AS ( SELECT ST_Simplify(geometry, ZRes(7)) as geometry, subclass FROM ne_10m_antarctic_ice_shelves_polys_gen_z6 ) /* DELAY_MATERIALIZED_VIEW_CREATION */ ; CREATE INDEX IF NOT EXISTS ne_10m_antarctic_ice_shelves_polys_gen_z5_idx ON ne_10m_antarctic_ice_shelves_polys_gen_z5 USING gist (geometry); -- etldoc: ne_110m_glaciated_areas_gen_z0 -> landcover_z0 CREATE OR REPLACE VIEW landcover_z0 AS ( SELECT geometry, subclass FROM ne_110m_glaciated_areas_gen_z0 ); -- etldoc: ne_110m_glaciated_areas_gen_z1 -> landcover_z1 CREATE OR REPLACE VIEW landcover_z1 AS ( SELECT geometry, subclass FROM ne_110m_glaciated_areas_gen_z1 ); CREATE OR REPLACE VIEW landcover_z2 AS ( -- etldoc: ne_50m_glaciated_areas_gen_z2 -> landcover_z2 SELECT geometry, subclass FROM ne_50m_glaciated_areas_gen_z2 UNION ALL -- etldoc: ne_50m_antarctic_ice_shelves_polys_gen_z2 -> landcover_z2 SELECT geometry, subclass FROM ne_50m_antarctic_ice_shelves_polys_gen_z2 ); CREATE OR REPLACE VIEW landcover_z3 AS ( -- etldoc: ne_50m_glaciated_areas_gen_z3 -> landcover_z3 SELECT geometry, subclass FROM ne_50m_glaciated_areas_gen_z3 UNION ALL -- etldoc: ne_50m_antarctic_ice_shelves_polys_gen_z3 -> landcover_z3 SELECT geometry, subclass FROM ne_50m_antarctic_ice_shelves_polys_gen_z3 ); CREATE OR REPLACE VIEW landcover_z4 AS ( -- etldoc: ne_50m_glaciated_areas_gen_z4 -> landcover_z4 SELECT geometry, subclass FROM ne_50m_glaciated_areas_gen_z4 UNION ALL -- etldoc: ne_50m_antarctic_ice_shelves_polys_gen_z4 -> landcover_z4 SELECT geometry, subclass FROM ne_50m_antarctic_ice_shelves_polys_gen_z4 ); CREATE OR REPLACE VIEW landcover_z5 AS ( -- etldoc: ne_10m_glaciated_areas_gen_z5 -> landcover_z5 SELECT geometry, subclass FROM ne_10m_glaciated_areas_gen_z5 UNION ALL -- etldoc: ne_10m_antarctic_ice_shelves_polys_gen_z5 -> landcover_z5 SELECT geometry, subclass FROM ne_10m_antarctic_ice_shelves_polys_gen_z5 ); CREATE OR REPLACE VIEW landcover_z6 AS ( -- etldoc: ne_10m_glaciated_areas_gen_z6 -> landcover_z6 SELECT geometry, subclass FROM ne_10m_glaciated_areas_gen_z6 UNION ALL -- etldoc: ne_10m_antarctic_ice_shelves_polys_gen_z6 -> landcover_z6 SELECT geometry, subclass FROM ne_10m_antarctic_ice_shelves_polys_gen_z6 ); -- etldoc: layer_landcover[shape=record fillcolor=lightpink, style="rounded, filled", label="layer_landcover | <z0> z0 | <z1> z1 | <z2> z2 | <z3> z3 | <z4> z4 | <z5> z5 | <z6> z6 |<z7> z7 |<z8> z8 |<z9> z9 |<z10> z10 |<z11> z11 |<z12> z12|<z13> z13|<z14_> z14+" ] ; CREATE OR REPLACE FUNCTION layer_landcover(bbox geometry, zoom_level int) RETURNS TABLE ( geometry geometry, class text, subclass text ) AS $$ SELECT geometry, landcover_class(subclass) AS class, subclass FROM ( -- etldoc: landcover_z0 -> layer_landcover:z0 SELECT geometry, subclass FROM landcover_z0 WHERE zoom_level = 0 AND geometry && bbox UNION ALL -- etldoc: landcover_z1 -> layer_landcover:z1 SELECT geometry, subclass FROM landcover_z1 WHERE zoom_level = 1 AND geometry && bbox UNION ALL -- etldoc: landcover_z2 -> layer_landcover:z2 SELECT geometry, subclass FROM landcover_z2 WHERE zoom_level = 2 AND geometry && bbox UNION ALL -- etldoc: landcover_z3 -> layer_landcover:z3 SELECT geometry, subclass FROM landcover_z3 WHERE zoom_level = 3 AND geometry && bbox UNION ALL -- etldoc: landcover_z4 -> layer_landcover:z4 SELECT geometry, subclass FROM landcover_z4 WHERE zoom_level = 4 AND geometry && bbox UNION ALL -- etldoc: landcover_z5 -> layer_landcover:z5 SELECT geometry, subclass FROM landcover_z5 WHERE zoom_level = 5 AND geometry && bbox UNION ALL -- etldoc: landcover_z6 -> layer_landcover:z6 SELECT geometry, subclass FROM landcover_z6 WHERE zoom_level = 6 AND geometry && bbox UNION ALL -- etldoc: osm_landcover_gen_z7 -> layer_landcover:z7 SELECT geometry, subclass FROM osm_landcover_gen_z7 WHERE zoom_level = 7 AND geometry && bbox UNION ALL -- etldoc: osm_landcover_gen_z8 -> layer_landcover:z8 SELECT geometry, subclass FROM osm_landcover_gen_z8 WHERE zoom_level = 8 AND geometry && bbox UNION ALL -- etldoc: osm_landcover_gen_z9 -> layer_landcover:z9 SELECT geometry, subclass FROM osm_landcover_gen_z9 WHERE zoom_level = 9 AND geometry && bbox UNION ALL -- etldoc: osm_landcover_gen_z10 -> layer_landcover:z10 SELECT geometry, subclass FROM osm_landcover_gen_z10 WHERE zoom_level = 10 AND geometry && bbox UNION ALL -- etldoc: osm_landcover_gen_z11 -> layer_landcover:z11 SELECT geometry, subclass FROM osm_landcover_gen_z11 WHERE zoom_level = 11 AND geometry && bbox UNION ALL -- etldoc: osm_landcover_gen_z12 -> layer_landcover:z12 SELECT geometry, subclass FROM osm_landcover_gen_z12 WHERE zoom_level = 12 AND geometry && bbox UNION ALL -- etldoc: osm_landcover_gen_z13 -> layer_landcover:z13 SELECT geometry, subclass FROM osm_landcover_gen_z13 WHERE zoom_level = 13 AND geometry && bbox UNION ALL -- etldoc: osm_landcover_polygon -> layer_landcover:z14_ SELECT geometry, subclass FROM osm_landcover_polygon WHERE zoom_level >= 14 AND geometry && bbox ) AS zoom_levels; $$ LANGUAGE SQL STABLE -- STRICT PARALLEL SAFE;
the_stack
-- 2018-09-14T17:09:45.072 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,Description,EntityType,InternalName,IsActive,IsCreateNew,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy,WEBUI_NameBrowse) VALUES ('W',0,541139,0,540078,TO_TIMESTAMP('2018-09-14 17:09:44','YYYY-MM-DD HH24:MI:SS'),100,'Define which email server should be used in which context','de.metas.swat','_EMail_Server_Routing','Y','N','N','N','N','EMail Server Routing',TO_TIMESTAMP('2018-09-14 17:09:44','YYYY-MM-DD HH24:MI:SS'),100,'EMail Server Routing') ; -- 2018-09-14T17:09:45.082 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name,WEBUI_NameBrowse,WEBUI_NameNew,WEBUI_NameNewBreadcrumb, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name,t.WEBUI_NameBrowse,t.WEBUI_NameNew,t.WEBUI_NameNewBreadcrumb, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=541139 AND NOT EXISTS (SELECT 1 FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) ; -- 2018-09-14T17:09:45.084 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', now(), 100, now(), 100,t.AD_Tree_ID, 541139, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.AD_Table_ID=116 AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=541139) ; -- 2018-09-14T17:09:45.732 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=540277, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=540209 AND AD_Tree_ID=10 ; -- 2018-09-14T17:09:45.733 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=540277, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=540203 AND AD_Tree_ID=10 ; -- 2018-09-14T17:09:45.734 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=540277, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=541139 AND AD_Tree_ID=10 ; -- 2018-09-14T17:09:57.410 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=541134, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=541139 AND AD_Tree_ID=10 ; -- 2018-09-14T17:09:57.411 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=541134, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=541132 AND AD_Tree_ID=10 ; -- 2018-09-14T17:09:57.412 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=541134, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=541133 AND AD_Tree_ID=10 ; -- 2018-09-14T17:14:21.651 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy,Value) VALUES (0,0,540231,540896,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'main') ; -- 2018-09-14T17:14:21.653 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Section_Trl (AD_Language,AD_UI_Section_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_UI_Section_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_UI_Section t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_UI_Section_ID=540896 AND NOT EXISTS (SELECT 1 FROM AD_UI_Section_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_UI_Section_ID=t.AD_UI_Section_ID) ; -- 2018-09-14T17:14:21.691 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,541168,540896,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Y',10,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.720 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Column (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_Section_ID,Created,CreatedBy,IsActive,SeqNo,Updated,UpdatedBy) VALUES (0,0,541169,540896,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Y',20,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.757 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,UIStyle,Updated,UpdatedBy) VALUES (0,0,541168,541873,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','default',10,'primary',TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.809 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,545251,0,540231,541873,553801,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Mandant für diese Installation.','Ein Mandant ist eine Firma oder eine juristische Person. Sie können keine Daten über Mandanten hinweg verwenden. .','Y','N','Y','Y','N','Mandant',10,10,0,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.840 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,545253,0,540231,541873,553802,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Organisatorische Einheit des Mandanten','Eine Organisation ist ein Bereich ihres Mandanten - z.B. Laden oder Abteilung. Sie können Daten über Organisationen hinweg gemeinsam verwenden.','Y','N','Y','Y','N','Sektion',20,20,0,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.870 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,545254,0,540231,541873,553803,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Prozess oder Bericht','das Feld "Prozess" bezeichnet einen einzelnen Prozess oder Bericht im System.','Y','N','Y','Y','N','Prozess',30,30,0,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.900 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,545252,0,540231,541873,553804,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','Y','N','Custom Type',40,40,0,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.933 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,556927,0,540231,541873,553805,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'','','Y','N','Y','Y','N','Dokument Basis Typ',50,50,0,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.964 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,Description,Help,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,556928,0,540231,541873,553806,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Document Sub Type','The Doc Sub Type indicates the type of order this document refers to. The selection made here will determine which documents will be generated when an order is processed and which documents must be generated manually or in batches. <br> The following outlines this process.<br> Doc Sub Type of <b>Standard Order</b> will generate just the <b>Order</b> document when the order is processed. <br> The <b>Delivery Note</b>, <b>Invoice</b> and <b>Receipt</b> must be generated via other processes. <br> Doc Sub Type of <b>Warehouse Order</b> will generate the <b>Order</b> and <b>Delivery Note</b>. <br> The <b>Invoice</b> and <b>Receipt</b> must be generated via other processes.<br> Doc Sub Type of <b>Credit Order</b> will generate the <b>Order</b>, <b>Delivery Note</b> and <b>Invoice</b>. <br> The <b>Reciept</b> must be generated via other processes.<br> Doc Sub Type of <b>POS</b> (Point of Sale) will generate all document','Y','N','Y','Y','N','Doc Sub Type',60,60,0,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:21.996 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,545249,0,540231,541873,553807,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','Y','N','Mail Box',70,70,0,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:14:22.026 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,557001,0,540231,541873,553808,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','Y','N','Column User To',80,80,0,TO_TIMESTAMP('2018-09-14 17:14:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:16:57.746 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,541169,541874,TO_TIMESTAMP('2018-09-14 17:16:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','flags',10,TO_TIMESTAMP('2018-09-14 17:16:57','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:17:01.640 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,541169,541875,TO_TIMESTAMP('2018-09-14 17:17:01','YYYY-MM-DD HH24:MI:SS'),100,'Y','org',20,TO_TIMESTAMP('2018-09-14 17:17:01','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:17:25.083 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsAllowFiltering,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,IsMultiLine,MultiLine_LinesCount,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,545244,0,540231,541874,553809,'F',TO_TIMESTAMP('2018-09-14 17:17:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','Y','N','N','N',0,'Aktiv',10,0,0,TO_TIMESTAMP('2018-09-14 17:17:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T17:17:52.138 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541875, SeqNo=10,Updated=TO_TIMESTAMP('2018-09-14 17:17:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553802 ; -- 2018-09-14T17:18:00.563 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541875, SeqNo=20,Updated=TO_TIMESTAMP('2018-09-14 17:18:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553801 ; -- 2018-09-14T17:18:53.762 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=10,Updated=TO_TIMESTAMP('2018-09-14 17:18:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553807 ; -- 2018-09-14T17:19:04.657 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=20,Updated=TO_TIMESTAMP('2018-09-14 17:19:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553803 ; -- 2018-09-14T17:19:07.739 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=30,Updated=TO_TIMESTAMP('2018-09-14 17:19:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553804 ; -- 2018-09-14T17:19:15.948 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=40,Updated=TO_TIMESTAMP('2018-09-14 17:19:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553805 ; -- 2018-09-14T17:19:18.637 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=50,Updated=TO_TIMESTAMP('2018-09-14 17:19:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553806 ; -- 2018-09-14T17:19:21.554 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET SeqNo=60,Updated=TO_TIMESTAMP('2018-09-14 17:19:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553808 ; -- 2018-09-14T17:21:36.261 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=10,Updated=TO_TIMESTAMP('2018-09-14 17:21:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553807 ; -- 2018-09-14T17:21:36.268 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=20,Updated=TO_TIMESTAMP('2018-09-14 17:21:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553803 ; -- 2018-09-14T17:21:36.273 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=30,Updated=TO_TIMESTAMP('2018-09-14 17:21:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553809 ; -- 2018-09-14T17:21:36.278 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayed_SideList='Y', SeqNo_SideList=40,Updated=TO_TIMESTAMP('2018-09-14 17:21:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553802 ; -- 2018-09-14T17:21:56.998 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2018-09-14 17:21:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553801 ; -- 2018-09-14T17:21:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=10,Updated=TO_TIMESTAMP('2018-09-14 17:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553807 ; -- 2018-09-14T17:21:57.002 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=20,Updated=TO_TIMESTAMP('2018-09-14 17:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553803 ; -- 2018-09-14T17:21:57.004 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2018-09-14 17:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553804 ; -- 2018-09-14T17:21:57.006 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=40,Updated=TO_TIMESTAMP('2018-09-14 17:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553805 ; -- 2018-09-14T17:21:57.008 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=50,Updated=TO_TIMESTAMP('2018-09-14 17:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553806 ; -- 2018-09-14T17:21:57.010 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=60,Updated=TO_TIMESTAMP('2018-09-14 17:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553809 ; -- 2018-09-14T17:21:57.011 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=70,Updated=TO_TIMESTAMP('2018-09-14 17:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553808 ; -- 2018-09-14T17:21:57.014 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2018-09-14 17:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553802 ; -- 2018-09-14T17:24:02.871 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Individueller Typ',Updated=TO_TIMESTAMP('2018-09-14 17:24:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=545252 ; -- 2018-09-14T17:24:31.930 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Sub Belegart',Updated=TO_TIMESTAMP('2018-09-14 17:24:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556928 ; -- 2018-09-14T17:25:10.888 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Spalte Nutzer nach',Updated=TO_TIMESTAMP('2018-09-14 17:25:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=557001 ; -- 2018-09-14T17:25:34.548 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-09-14 17:25:34','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Process',Description='',Help='' WHERE AD_Field_ID=545254 AND AD_Language='en_US' ; -- 2018-09-14T17:25:39.189 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-09-14 17:25:39','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=545252 AND AD_Language='en_US' ; -- 2018-09-14T17:25:44.306 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-09-14 17:25:44','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=556927 AND AD_Language='nl_NL' ; -- 2018-09-14T17:25:50.629 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-09-14 17:25:50','YYYY-MM-DD HH24:MI:SS') WHERE AD_Field_ID=556928 AND AD_Language='nl_NL' ; -- 2018-09-14T17:25:53.531 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-09-14 17:25:53','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=556928 AND AD_Language='en_US' ; -- 2018-09-14T17:26:02.746 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-09-14 17:26:02','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=545249 AND AD_Language='en_US' ; -- 2018-09-14T17:26:10.847 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-09-14 17:26:10','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=557001 AND AD_Language='en_US' ; -- 2018-09-14T17:26:36.336 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2018-09-14 17:26:36','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=545250 AND AD_Language='en_US' ; -- 2018-09-14T18:08:58.004 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,541168,541879,TO_TIMESTAMP('2018-09-14 18:08:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','matching',20,TO_TIMESTAMP('2018-09-14 18:08:57','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2018-09-14T18:09:13.872 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541879, SeqNo=10,Updated=TO_TIMESTAMP('2018-09-14 18:09:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553803 ; -- 2018-09-14T18:09:21.386 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541879, SeqNo=20,Updated=TO_TIMESTAMP('2018-09-14 18:09:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553805 ; -- 2018-09-14T18:09:27.309 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET AD_UI_ElementGroup_ID=541879, SeqNo=30,Updated=TO_TIMESTAMP('2018-09-14 18:09:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=553806 ;
the_stack
-- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,554286,556857,0,540725,TO_TIMESTAMP('2016-03-31 16:41:45','YYYY-MM-DD HH24:MI:SS'),100,'Bestellte Menge (TU)',10,'de.metas.procurement','Die "Bestellte Menge" bezeichnet die Menge einer Ware, die bestellt wurde.','Y','Y','Y','N','N','N','N','N','Bestellte Menge (TU)',TO_TIMESTAMP('2016-03-31 16:41:45','YYYY-MM-DD HH24:MI:SS'),100) ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556857 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,554287,556858,0,540725,TO_TIMESTAMP('2016-03-31 16:41:45','YYYY-MM-DD HH24:MI:SS'),100,10,'de.metas.procurement','Y','Y','Y','N','N','N','N','N','Zusagbar (TU)',TO_TIMESTAMP('2016-03-31 16:41:45','YYYY-MM-DD HH24:MI:SS'),100) ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556858 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,554288,556859,0,540725,TO_TIMESTAMP('2016-03-31 16:41:45','YYYY-MM-DD HH24:MI:SS'),100,10,'de.metas.procurement','Y','Y','Y','N','N','N','N','N','Quantity to Order (TU)',TO_TIMESTAMP('2016-03-31 16:41:45','YYYY-MM-DD HH24:MI:SS'),100) ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556859 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,554310,556860,0,540725,TO_TIMESTAMP('2016-03-31 16:41:45','YYYY-MM-DD HH24:MI:SS'),100,10,'de.metas.procurement','Y','Y','Y','N','N','N','N','N','Abrechnungssatz',TO_TIMESTAMP('2016-03-31 16:41:45','YYYY-MM-DD HH24:MI:SS'),100) ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556860 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2016-03-31 16:41:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556860 ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2016-03-31 16:41:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556857 ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2016-03-31 16:41:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556858 ; -- 31.03.2016 16:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2016-03-31 16:41:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859 ; -- 31.03.2016 16:42 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2016-03-31 16:42:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556860 ; -- 31.03.2016 16:42 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2016-03-31 16:42:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556857 ; -- 31.03.2016 16:42 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2016-03-31 16:42:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556858 ; -- 31.03.2016 16:42 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2016-03-31 16:42:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859 ; -- 31.03.2016 16:48 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543060,0,'QtyOrdered_TU_NextWeek',TO_TIMESTAMP('2016-03-31 16:48:20','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.procurement','Y','Bestellte Menge TU (next week)','Beauftragte Menge TU (next week)',TO_TIMESTAMP('2016-03-31 16:48:20','YYYY-MM-DD HH24:MI:SS'),100) ; -- 31.03.2016 16:48 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543060 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 31.03.2016 16:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='QtyOrdered_TU_ThisWeek', Name='Bestellte Menge TU (this week)', PrintName='Beauftragte Menge TU (this week)',Updated=TO_TIMESTAMP('2016-03-31 16:49:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543025 ; -- 31.03.2016 16:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=543025 ; -- 31.03.2016 16:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='QtyOrdered_TU_ThisWeek', Name='Bestellte Menge TU (this week)', Description=NULL, Help=NULL WHERE AD_Element_ID=543025 ; -- 31.03.2016 16:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='QtyOrdered_TU_ThisWeek', Name='Bestellte Menge TU (this week)', Description=NULL, Help=NULL, AD_Element_ID=543025 WHERE UPPER(ColumnName)='QTYORDERED_TU_THISWEEK' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 31.03.2016 16:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='QtyOrdered_TU_ThisWeek', Name='Bestellte Menge TU (this week)', Description=NULL, Help=NULL WHERE AD_Element_ID=543025 AND IsCentrallyMaintained='Y' ; -- 31.03.2016 16:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Bestellte Menge TU (this week)', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543025) AND IsCentrallyMaintained='Y' ; -- 31.03.2016 16:49 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Beauftragte Menge TU (this week)', Name='Bestellte Menge TU (this week)' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=543025) ; -- 31.03.2016 16:50 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543061,0,'QtyPromised_TU_NextWeek',TO_TIMESTAMP('2016-03-31 16:50:11','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.procurement','Y','Zusagbar TU (nächste Woche)','Zusagbar TU (nächste Woche)',TO_TIMESTAMP('2016-03-31 16:50:11','YYYY-MM-DD HH24:MI:SS'),100) ; -- 31.03.2016 16:50 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543061 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 31.03.2016 16:50 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnSQL='COALESCE((de_metas_procurement.getPMM_PurchaseCandidate_Weekly(PMM_PurchaseCandidate)).QtyOrdered_TU, 0)',Updated=TO_TIMESTAMP('2016-03-31 16:50:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=554175 ; -- 31.03.2016 16:51 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=543060, ColumnName='QtyOrdered_TU_NextWeek', ColumnSQL='COALESCE((de_metas_procurement.getPMM_PurchaseCandidate_Weekly(PMM_PurchaseCandidate, +1)).QtyOrdered_TU, 0)', Description=NULL, Help=NULL, Name='Bestellte Menge TU (next week)',Updated=TO_TIMESTAMP('2016-03-31 16:51:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=554176 ; -- 31.03.2016 16:51 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=554176 ; -- 31.03.2016 16:51 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Bestellte Menge TU (next week)', Description=NULL, Help=NULL WHERE AD_Column_ID=554176 AND IsCentrallyMaintained='Y' ; -- 31.03.2016 16:52 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=543061, ColumnName='QtyPromised_TU_NextWeek', ColumnSQL='COALESCE((de_metas_procurement.getPMM_PurchaseCandidate_Weekly(PMM_PurchaseCandidate, +1)).QtyPromised_TU, 0)', Description=NULL, Help=NULL, Name='Zusagbar TU (nächste Woche)',Updated=TO_TIMESTAMP('2016-03-31 16:52:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=554178 ; -- 31.03.2016 16:52 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=554178 ; -- 31.03.2016 16:52 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Zusagbar TU (nächste Woche)', Description=NULL, Help=NULL WHERE AD_Column_ID=554178 AND IsCentrallyMaintained='Y' ; -- 31.03.2016 16:54 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543062,0,'QtyPromised_TU_ThisWeek',TO_TIMESTAMP('2016-03-31 16:54:54','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.procurement','Y','Zusagbar TU (diese Woche)','Zusagbar TU (diese Woche)',TO_TIMESTAMP('2016-03-31 16:54:54','YYYY-MM-DD HH24:MI:SS'),100) ; -- 31.03.2016 16:54 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543062 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 31.03.2016 16:55 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=543062, ColumnName='QtyPromised_TU_ThisWeek', ColumnSQL='COALESCE((de_metas_procurement.getPMM_PurchaseCandidate_Weekly(PMM_PurchaseCandidate)).QtyPromised_TU, 0)', Description=NULL, Help=NULL, Name='Zusagbar TU (diese Woche)',Updated=TO_TIMESTAMP('2016-03-31 16:55:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=554177 ; -- 31.03.2016 16:55 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=554177 ; -- 31.03.2016 16:55 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Zusagbar TU (diese Woche)', Description=NULL, Help=NULL WHERE AD_Column_ID=554177 AND IsCentrallyMaintained='Y' ; -- 31.03.2016 16:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2016-03-31 16:56:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556658 ; -- 31.03.2016 16:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2016-03-31 16:56:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556655 ; -- 31.03.2016 16:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2016-03-31 16:56:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556659 ; -- 31.03.2016 16:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80,Updated=TO_TIMESTAMP('2016-03-31 16:56:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556858 ; -- 31.03.2016 16:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120,Updated=TO_TIMESTAMP('2016-03-31 16:56:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859 ; -- 31.03.2016 16:56 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160,Updated=TO_TIMESTAMP('2016-03-31 16:56:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556857 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2016-03-31 16:57:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556655 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2016-03-31 16:57:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556658 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2016-03-31 16:57:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556659 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=160,Updated=TO_TIMESTAMP('2016-03-31 16:57:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556857 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2016-03-31 16:57:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556858 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=120,Updated=TO_TIMESTAMP('2016-03-31 16:57:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2016-03-31 16:57:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556858 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2016-03-31 16:57:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556798 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120,Updated=TO_TIMESTAMP('2016-03-31 16:57:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556857 ; -- 31.03.2016 16:57 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160,Updated=TO_TIMESTAMP('2016-03-31 16:57:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859 ; -- 31.03.2016 16:58 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=120,Updated=TO_TIMESTAMP('2016-03-31 16:58:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556857 ; -- 31.03.2016 16:58 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=160,Updated=TO_TIMESTAMP('2016-03-31 16:58:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859 ; -- 31.03.2016 16:59 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2016-03-31 16:59:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556857 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2016-03-31 17:00:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556799 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=150,Updated=TO_TIMESTAMP('2016-03-31 17:00:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160,Updated=TO_TIMESTAMP('2016-03-31 17:00:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556692 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=170,Updated=TO_TIMESTAMP('2016-03-31 17:00:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556695 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=180,Updated=TO_TIMESTAMP('2016-03-31 17:00:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556668 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2016-03-31 17:00:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556799 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=150,Updated=TO_TIMESTAMP('2016-03-31 17:00:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556859 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=160,Updated=TO_TIMESTAMP('2016-03-31 17:00:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556692 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=170,Updated=TO_TIMESTAMP('2016-03-31 17:00:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556695 ; -- 31.03.2016 17:00 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=180,Updated=TO_TIMESTAMP('2016-03-31 17:00:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556668 ; -- 31.03.2016 17:37 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,554289,556861,0,540726,TO_TIMESTAMP('2016-03-31 17:37:11','YYYY-MM-DD HH24:MI:SS'),100,'Bestellte Menge (TU)',10,'de.metas.procurement','Die "Bestellte Menge" bezeichnet die Menge einer Ware, die bestellt wurde.','Y','Y','Y','N','N','N','N','N','Bestellte Menge (TU)',TO_TIMESTAMP('2016-03-31 17:37:11','YYYY-MM-DD HH24:MI:SS'),100) ; -- 31.03.2016 17:37 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556861 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 31.03.2016 17:37 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30,Updated=TO_TIMESTAMP('2016-03-31 17:37:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556861 ; -- 31.03.2016 17:37 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=30,Updated=TO_TIMESTAMP('2016-03-31 17:37:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556861 ; -- 31.03.2016 17:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2016-03-31 17:38:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556667 ; -- 31.03.2016 17:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2016-03-31 17:38:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556861 ; -- 31.03.2016 17:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2016-03-31 17:38:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556861 ; -- 31.03.2016 17:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2016-03-31 17:38:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556666 ;
the_stack
-- 2017-09-11T13:09:22.800 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543413,0,'ContractStartDate',TO_TIMESTAMP('2017-09-11 13:09:22','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.contracts.subscription','Y','Contract Start Date','Contract Start Date',TO_TIMESTAMP('2017-09-11 13:09:22','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T13:09:22.812 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543413 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2017-09-11T13:09:43.199 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543414,0,'ContractEndDate',TO_TIMESTAMP('2017-09-11 13:09:43','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.contracts.subscription','Y','Contract End Date','Contract End Date',TO_TIMESTAMP('2017-09-11 13:09:43','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T13:09:43.204 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543414 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2017-09-11T13:10:19.383 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET EntityType='de.metas.flatrate',Updated=TO_TIMESTAMP('2017-09-11 13:10:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543413 ; -- 2017-09-11T13:10:57.067 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET EntityType='de.metas.flatrate',Updated=TO_TIMESTAMP('2017-09-11 13:10:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543414 ; -- 2017-09-11T15:21:41.356 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557139,543413,0,15,540320,'N','ContractStartDate',TO_TIMESTAMP('2017-09-11 15:21:41','YYYY-MM-DD HH24:MI:SS'),100,'N','de.metas.flatrate',7,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Contract Start Date',0,0,TO_TIMESTAMP('2017-09-11 15:21:41','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-09-11T15:21:41.360 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557139 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-09-11T15:21:53.472 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557140,543414,0,15,540320,'N','ContractEndDate',TO_TIMESTAMP('2017-09-11 15:21:53','YYYY-MM-DD HH24:MI:SS'),100,'N','de.metas.flatrate',7,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Contract End Date',0,0,TO_TIMESTAMP('2017-09-11 15:21:53','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-09-11T15:21:53.476 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557140 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-09-11T15:23:52.885 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,557139,559885,0,540340,0,TO_TIMESTAMP('2017-09-11 15:23:52','YYYY-MM-DD HH24:MI:SS'),100,0,'de.metas.flatrate',0,'Y','Y','Y','Y','N','N','N','N','N','Contract Start Date',450,440,0,1,1,TO_TIMESTAMP('2017-09-11 15:23:52','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T15:23:52.888 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=559885 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-09-11T15:24:11.759 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,557140,559886,0,540340,0,TO_TIMESTAMP('2017-09-11 15:24:11','YYYY-MM-DD HH24:MI:SS'),100,0,'de.metas.flatrate',0,'Y','Y','Y','Y','N','N','N','N','N','Contract End Date',450,440,0,1,1,TO_TIMESTAMP('2017-09-11 15:24:11','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T15:24:11.761 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=559886 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-09-11T15:24:21.735 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2017-09-11 15:24:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559885 ; -- 2017-09-11T16:54:00.633 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='MasterEndDate', Name='Master End Date', PrintName='Master End Date',Updated=TO_TIMESTAMP('2017-09-11 16:54:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543414 ; -- 2017-09-11T16:54:00.636 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='MasterEndDate', Name='Master End Date', Description=NULL, Help=NULL WHERE AD_Element_ID=543414 ; -- 2017-09-11T16:54:00.648 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='MasterEndDate', Name='Master End Date', Description=NULL, Help=NULL, AD_Element_ID=543414 WHERE UPPER(ColumnName)='MASTERENDDATE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-09-11T16:54:00.653 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='MasterEndDate', Name='Master End Date', Description=NULL, Help=NULL WHERE AD_Element_ID=543414 AND IsCentrallyMaintained='Y' ; -- 2017-09-11T16:54:00.654 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Master End Date', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543414) AND IsCentrallyMaintained='Y' ; -- 2017-09-11T16:54:00.667 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Master End Date', Name='Master End Date' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=543414) ; -- 2017-09-11T16:54:10.824 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('c_flatrate_term','ALTER TABLE public.C_Flatrate_Term ADD COLUMN MasterEndDate TIMESTAMP WITHOUT TIME ZONE') ; -- 2017-09-11T16:54:43.436 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='MasterStartDate', Name='Master Start Date', PrintName='Master Start Date',Updated=TO_TIMESTAMP('2017-09-11 16:54:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543413 ; -- 2017-09-11T16:54:43.439 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='MasterStartDate', Name='Master Start Date', Description=NULL, Help=NULL WHERE AD_Element_ID=543413 ; -- 2017-09-11T16:54:43.451 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='MasterStartDate', Name='Master Start Date', Description=NULL, Help=NULL, AD_Element_ID=543413 WHERE UPPER(ColumnName)='MASTERSTARTDATE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-09-11T16:54:43.452 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='MasterStartDate', Name='Master Start Date', Description=NULL, Help=NULL WHERE AD_Element_ID=543413 AND IsCentrallyMaintained='Y' ; -- 2017-09-11T16:54:43.453 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Master Start Date', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543413) AND IsCentrallyMaintained='Y' ; -- 2017-09-11T16:54:43.467 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Master Start Date', Name='Master Start Date' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=543413) ; -- 2017-09-11T16:54:48.973 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('c_flatrate_term','ALTER TABLE public.C_Flatrate_Term ADD COLUMN MasterStartDate TIMESTAMP WITHOUT TIME ZONE') ; --------------------- -- 2017-09-11T16:58:25.882 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,557139,559887,0,540859,0,TO_TIMESTAMP('2017-09-11 16:58:25','YYYY-MM-DD HH24:MI:SS'),100,0,'de.metas.flatrate',0,'Y','Y','Y','Y','N','N','N','N','N','Master Start Date',450,440,0,1,1,TO_TIMESTAMP('2017-09-11 16:58:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T16:58:25.888 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=559887 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-09-11T16:58:46.610 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,557140,559888,0,540859,0,TO_TIMESTAMP('2017-09-11 16:58:46','YYYY-MM-DD HH24:MI:SS'),100,0,'de.metas.flatrate',0,'Y','Y','Y','Y','N','N','N','N','N','Master End Date',450,440,0,1,1,TO_TIMESTAMP('2017-09-11 16:58:46','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T16:58:46.612 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=559888 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-09-11T16:58:54.113 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2017-09-11 16:58:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559887 ; ------------------------------ --- WEB ui ------------------- -- 2017-09-11T17:08:26.031 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_ElementGroup (AD_Client_ID,AD_Org_ID,AD_UI_Column_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540630,541132,TO_TIMESTAMP('2017-09-11 17:08:25','YYYY-MM-DD HH24:MI:SS'),100,'Y','master',30,TO_TIMESTAMP('2017-09-11 17:08:25','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T17:10:47.444 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,559887,0,540859,548400,541132,TO_TIMESTAMP('2017-09-11 17:10:47','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Master Start Date',10,0,0,TO_TIMESTAMP('2017-09-11 17:10:47','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T17:11:39.806 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_Element_ID,AD_UI_ElementGroup_ID,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayed_SideList,IsDisplayedGrid,Name,SeqNo,SeqNo_SideList,SeqNoGrid,Updated,UpdatedBy) VALUES (0,559888,0,540859,548401,541132,TO_TIMESTAMP('2017-09-11 17:11:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Master End Date',20,0,0,TO_TIMESTAMP('2017-09-11 17:11:39','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T17:12:33.549 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('i_flatrate_term','ALTER TABLE public.I_Flatrate_Term ADD COLUMN MasterStartDate TIMESTAMP WITHOUT TIME ZONE') ; -- 2017-09-11T17:12:39.282 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('i_flatrate_term','ALTER TABLE public.I_Flatrate_Term ADD COLUMN MasterEndDate TIMESTAMP WITHOUT TIME ZONE') ; -- 2017-09-11T17:22:53.280 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2017-09-11 17:22:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559887 ; -- 2017-09-11T17:22:55.514 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2017-09-11 17:22:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559888 ; -- 2017-09-11T17:23:21.649 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_FieldGroup (AD_Client_ID,AD_FieldGroup_ID,AD_Org_ID,Created,CreatedBy,EntityType,FieldGroupType,IsActive,IsCollapsedByDefault,Name,Updated,UpdatedBy) VALUES (0,540088,0,TO_TIMESTAMP('2017-09-11 17:23:21','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.flatrate','L','Y','N','Master',TO_TIMESTAMP('2017-09-11 17:23:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-11T17:23:21.653 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_FieldGroup_Trl (AD_Language,AD_FieldGroup_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_FieldGroup_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_FieldGroup t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_FieldGroup_ID=540088 AND NOT EXISTS (SELECT 1 FROM AD_FieldGroup_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_FieldGroup_ID=t.AD_FieldGroup_ID) ; -- 2017-09-11T17:24:28.212 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET AD_FieldGroup_ID=540088,Updated=TO_TIMESTAMP('2017-09-11 17:24:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559887 ; -- 2017-09-11T17:24:41.617 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET AD_FieldGroup_ID=540088,Updated=TO_TIMESTAMP('2017-09-11 17:24:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559888 ; -- 2017-09-11T17:24:43.794 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2017-09-11 17:24:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559888 ; -------------- -- 2017-09-12T11:23:32.597 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557144,543413,0,15,540836,'N','MasterStartDate',TO_TIMESTAMP('2017-09-12 11:23:32','YYYY-MM-DD HH24:MI:SS'),100,'N','de.metas.flatrate',7,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Master Start Date',0,0,TO_TIMESTAMP('2017-09-12 11:23:32','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-09-12T11:23:32.602 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557144 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-09-12T11:23:40.146 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557145,543414,0,15,540836,'N','MasterEndDate',TO_TIMESTAMP('2017-09-12 11:23:40','YYYY-MM-DD HH24:MI:SS'),100,'N','de.metas.flatrate',7,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Master End Date',0,0,TO_TIMESTAMP('2017-09-12 11:23:40','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-09-12T11:23:40.150 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557145 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-09-12T11:24:16.794 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,557144,559897,0,540858,0,TO_TIMESTAMP('2017-09-12 11:24:16','YYYY-MM-DD HH24:MI:SS'),100,0,'de.metas.flatrate',0,'Y','Y','Y','Y','N','N','N','N','N','Master Start Date',200,200,0,1,1,TO_TIMESTAMP('2017-09-12 11:24:16','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-12T11:24:16.798 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=559897 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-09-12T11:24:33.620 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,ColumnDisplayLength,Created,CreatedBy,DisplayLength,EntityType,IncludedTabHeight,IsActive,IsCentrallyMaintained,IsDisplayed,IsDisplayedGrid,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SeqNoGrid,SortNo,SpanX,SpanY,Updated,UpdatedBy) VALUES (0,557145,559898,0,540858,0,TO_TIMESTAMP('2017-09-12 11:24:33','YYYY-MM-DD HH24:MI:SS'),100,0,'de.metas.flatrate',0,'Y','Y','Y','Y','N','N','N','N','N','Master End Date',210,210,0,1,1,TO_TIMESTAMP('2017-09-12 11:24:33','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-12T11:24:33.624 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=559898 AND NOT EXISTS (SELECT 1 FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 2017-09-12T11:25:19.025 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataFormat,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,557144,540010,540120,0,TO_TIMESTAMP('2017-09-12 11:25:18','YYYY-MM-DD HH24:MI:SS'),100,'yyyy-MM-dd','D','.','N',0,'Y','Master Start Date',80,0,TO_TIMESTAMP('2017-09-12 11:25:18','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-12T11:25:33.438 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataFormat,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,557145,540010,540121,0,TO_TIMESTAMP('2017-09-12 11:25:33','YYYY-MM-DD HH24:MI:SS'),100,'yyyy-MM-dd','D','.','N',0,'Y','Master End Date',90,9,TO_TIMESTAMP('2017-09-12 11:25:33','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-09-12T11:28:01.666 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_ImpFormat_Row SET StartNo=8,Updated=TO_TIMESTAMP('2017-09-12 11:28:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ImpFormat_Row_ID=540120 ; -- 2017-09-12T11:30:53.320 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=140,Updated=TO_TIMESTAMP('2017-09-12 11:30:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559897 ; -- 2017-09-12T11:30:53.333 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=150,Updated=TO_TIMESTAMP('2017-09-12 11:30:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559898 ; -- 2017-09-12T11:31:00.975 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2017-09-12 11:31:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=559898 ;
the_stack
-- 25.08.2015 17:03 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process SET IsActive='N',Updated=TO_TIMESTAMP('2015-08-25 17:03:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=53161 ; -- 25.08.2015 17:03 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Description=NULL, IsActive='N', Name='Initial Client Setup Process',Updated=TO_TIMESTAMP('2015-08-25 17:03:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53202 ; -- 25.08.2015 18:16 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,CopyFromProcess,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsReport,IsServerProcess,LockWaitTimeout,Name,RefreshAllAfterExecution,ShowHelp,Statistic_Count,Statistic_Seconds,Type,Updated,UpdatedBy,Value) VALUES ('4',0,0,540604,'N',TO_TIMESTAMP('2015-08-25 18:16:51','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.fresh','Y','N','N','N','N','N',0,'Client Quick Setup ','N','Y',0,0,'Java',TO_TIMESTAMP('2015-08-25 18:16:51','YYYY-MM-DD HH24:MI:SS'),100,'AD_Client_Setup') ; -- 25.08.2015 18:16 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=540604 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) ; -- 25.08.2015 18:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,540648,0,540604,540749,10,'Companyname',TO_TIMESTAMP('2015-08-25 18:18:12','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.fresh',0,'Y','N','Y','N','Y','N','Firmenname',10,TO_TIMESTAMP('2015-08-25 18:18:12','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 18:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540749 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 18:19 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,202,0,540604,540750,21,'C_Location_ID',TO_TIMESTAMP('2015-08-25 18:19:56','YYYY-MM-DD HH24:MI:SS'),100,'-1','Adresse oder Anschrift','de.metas.fresh',0,'Das Feld "Adresse" definiert die Adressangaben eines Standortes.','Y','N','Y','N','Y','N','Anschrift',20,TO_TIMESTAMP('2015-08-25 18:19:56','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 18:19 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540750 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 18:20 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,53909,0,540604,540751,32,'Logo_ID',TO_TIMESTAMP('2015-08-25 18:20:28','YYYY-MM-DD HH24:MI:SS'),100,'-1','de.metas.fresh',0,'Y','N','Y','N','Y','N','Logo',30,TO_TIMESTAMP('2015-08-25 18:20:28','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 18:20 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540751 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 18:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Reference_Value_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,109,0,540604,540752,18,327,'AD_Language',TO_TIMESTAMP('2015-08-25 18:22:13','YYYY-MM-DD HH24:MI:SS'),100,'Sprache für diesen Eintrag','de.metas.fresh',0,'Definiert die Sprache für Anzeige und Aufbereitung','Y','N','Y','N','Y','N','Sprache',40,TO_TIMESTAMP('2015-08-25 18:22:13','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 18:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540752 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 18:23 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,193,0,540604,540753,18,'C_Currency_ID',TO_TIMESTAMP('2015-08-25 18:23:04','YYYY-MM-DD HH24:MI:SS'),100,'Die Währung für diesen Eintrag','de.metas.fresh',0,'Bezeichnet die auf Dokumenten oder Berichten verwendete Währung','Y','N','Y','N','Y','N','Währung',50,TO_TIMESTAMP('2015-08-25 18:23:04','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 18:23 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540753 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 18:24 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process SET Classname='de.metas.endcustomer.mf15.process.AD_Client_Setup',Updated=TO_TIMESTAMP('2015-08-25 18:24:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=540604 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Created,CreatedBy,EntityType,InternalName,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('P',0,540644,0,540604,TO_TIMESTAMP('2015-08-25 18:36:36','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.fresh','AD_Client_Setup','Y','N','N','N','Client Quick Setup ',TO_TIMESTAMP('2015-08-25 18:36:36','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=540644 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', now(), 100, now(), 100,t.AD_Tree_ID, 540644, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.AD_Table_ID=116 AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=540644) ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=261 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=53202 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=225 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=148 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=529 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=397 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=532 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=53084 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=540277 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=540644 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=261 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=53202 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=540644 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=225 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=148 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=529 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=397 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=532 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=53084 AND AD_Tree_ID=10 ; -- 25.08.2015 18:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=540277 AND AD_Tree_ID=10 ; -- 25.08.2015 21:21 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process SET Name='Initial Setup Wizard',Updated=TO_TIMESTAMP('2015-08-25 21:21:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=540604 ; -- 25.08.2015 21:21 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Trl SET IsTranslated='N' WHERE AD_Process_ID=540604 ; -- 25.08.2015 21:21 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Description=NULL, IsActive='Y', Name='Initial Setup Wizard',Updated=TO_TIMESTAMP('2015-08-25 21:21:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=540644 ; -- 25.08.2015 21:21 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=540644 ; -- 25.08.2015 21:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,540398,0,540604,540754,10,'Firstname',TO_TIMESTAMP('2015-08-25 21:22:10','YYYY-MM-DD HH24:MI:SS'),100,'Vorname','de.metas.fresh',0,'Y','N','Y','N','Y','N','Vorname',60,TO_TIMESTAMP('2015-08-25 21:22:10','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 21:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540754 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 21:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,540399,0,540604,540755,10,'Lastname',TO_TIMESTAMP('2015-08-25 21:22:27','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.fresh',0,'Y','N','Y','N','Y','N','Nachname',70,TO_TIMESTAMP('2015-08-25 21:22:27','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 21:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540755 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 21:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,840,0,540604,540756,10,'AccountNo',TO_TIMESTAMP('2015-08-25 21:22:55','YYYY-MM-DD HH24:MI:SS'),100,'Kontonummer','de.metas.fresh',0,'The Account Number indicates the Number assigned to this bank account. ','Y','N','Y','N','N','N','Konto-Nr.',80,TO_TIMESTAMP('2015-08-25 21:22:55','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 21:22 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540756 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 21:23 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,2664,0,540604,540757,10,'IBAN',TO_TIMESTAMP('2015-08-25 21:23:05','YYYY-MM-DD HH24:MI:SS'),100,'International Bank Account Number','de.metas.fresh',0,'If your bank provides an International Bank Account Number, enter it here Details ISO 13616 and http://www.ecbs.org. The account number has the maximum length of 22 characters (without spaces). The IBAN is often printed with a apace after 4 characters. Do not enter the spaces in Adempiere.','Y','N','Y','N','N','N','IBAN',90,TO_TIMESTAMP('2015-08-25 21:23:05','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 21:23 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540757 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 21:23 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,835,0,540604,540758,30,'C_Bank_ID',TO_TIMESTAMP('2015-08-25 21:23:22','YYYY-MM-DD HH24:MI:SS'),100,'Bank','de.metas.fresh',0,'"Bank" ist die eindeutige Identifizierung einer Bank für diese Organisation oder für eien Geschäftspartner mit dem die Organisation interagiert.','Y','N','Y','N','Y','N','Bank',100,TO_TIMESTAMP('2015-08-25 21:23:22','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 21:23 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540758 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 25.08.2015 21:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,502388,0,540604,540759,10,'VATaxID',TO_TIMESTAMP('2015-08-25 21:28:21','YYYY-MM-DD HH24:MI:SS'),100,'de.metas.fresh',0,'Y','N','Y','N','Y','N','Umsatzsteuer-ID',55,TO_TIMESTAMP('2015-08-25 21:28:21','YYYY-MM-DD HH24:MI:SS'),100) ; -- 25.08.2015 21:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540759 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 26.08.2015 16:29 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process SET Classname='de.metas.fresh.setup.process.AD_Client_Setup',Updated=TO_TIMESTAMP('2015-08-26 16:29:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=540604 ;
the_stack
DROP VIEW IF EXISTS "de.metas.fresh".OrderBy_ProductGroup_V; CREATE OR REPLACE VIEW "de.metas.fresh".OrderBy_ProductGroup_V AS SELECT p.M_Product_ID, p.Name AS OrderBy_ProductName, CASE WHEN pc.Name ilike 'Früchte' THEN '02_Fruits' WHEN pc.Name ilike 'Kartoffeln' THEN '03_Potatos' ELSE '01_Rest' END AS OrderBy_ProductGroup FROM M_Product p JOIN M_Product_Category pc ON pc.M_Product_Category_ID=p.M_Product_Category_ID ; COMMENT ON VIEW "de.metas.fresh".OrderBy_ProductGroup_V IS 'see task 08924' ; --- Fresh_QtyOnHand_Line_OnUpdate -------------------------------- --table might even not yet exist with this name --DROP TRIGGER IF EXISTS Fresh_QtyOnHand_Line_OnUpdate_Trigger ON Fresh_QtyOnHand_Line; DROP FUNCTION IF EXISTS "de.metas.fresh".Fresh_QtyOnHand_Line_OnUpdate() CASCADE; CREATE OR REPLACE FUNCTION "de.metas.fresh".Fresh_QtyOnHand_Line_OnUpdate() RETURNS trigger AS $BODY$ DECLARE v_DateDoc DATE; BEGIN -- -- Update DateDoc from header -- NOTE: we are updating it only if it's null because else, the Java BL will take care if (NEW.DateDoc IS NULL) then select h.DateDoc into NEW.DateDoc from Fresh_QtyOnHand h where h.Fresh_QtyOnHand_ID=NEW.Fresh_QtyOnHand_ID; -- NEW.DateDoc := v_DateDoc; end if; -- -- Update ASIKey if (NEW.M_AttributeSetInstance_ID is not null) then NEW.ASIKey := COALESCE(generateHUStorageASIKey(NEW.M_AttributeSetInstance_ID), '-'); else NEW.ASIKey := '-'; end if; return NEW; END; $BODY$ LANGUAGE plpgsql VOLATILE COST 100; ALTER FUNCTION "de.metas.fresh".Fresh_QtyOnHand_Line_OnUpdate() OWNER TO adempiere; CREATE TRIGGER Fresh_QtyOnHand_Line_OnUpdate_Trigger BEFORE INSERT OR UPDATE ON Fresh_QtyOnHand_Line FOR EACH ROW EXECUTE PROCEDURE "de.metas.fresh".Fresh_QtyOnHand_Line_OnUpdate(); --- PP_Product_Bom_And_Component ------------------------------ DROP VIEW IF EXISTS "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V; DROP VIEW IF EXISTS "de.metas.fresh".PP_Product_Bom_And_Component; CREATE OR REPLACE VIEW "de.metas.fresh".PP_Product_Bom_And_Component AS SELECT -- bom (header) stuff b.PP_Product_Bom_ID, b.M_Product_ID AS b_M_Product_ID, b_p.Value as b_p_Value, b_p.Name as b_p_Name, b.M_AttributeSetInstance_ID AS b_M_AttributeSetInstance_ID, "de.metas.dimension".DIM_Get_GroupName('MRP_Product_Info_ASI_Values', GenerateHUStorageASIKey(b.M_AttributeSetInstance_ID)) AS b_M_AttributeSetGroupNames, -- bomline stuff bl_p.M_Product_ID AS bl_M_Product_ID, bl_p.Value as bl_p_Value, bl_p.Name as bl_p_Name, bl.M_AttributeSetInstance_ID AS bl_M_AttributeSetInstance_ID, bl.QtyBatch, bl.QtyBom, bl_p.IsPurchased, -- factors to calculate the required qty of the package/component product (including UOM conversion!) for a given qty of the BOM product CASE WHEN bl.IsQtyPercentage='Y' THEN bl.QtyBatch/100 ELSE bl.QtyBom END AS bl_Factor_BOM, CASE WHEN bl.IsQtyPercentage='Y' THEN COALESCE(conv_b_bl.MultiplyRate,1) ELSE 1 END AS bl_Factor_b_To_bl, conv_bl_p.MultiplyRate AS bl_Factor_bl_To_Product FROM PP_Product_Bom b JOIN M_Product b_p ON b_p.M_Product_ID=b.M_Product_ID JOIN PP_Product_BomLine bl ON bl.PP_Product_Bom_ID=b.PP_Product_Bom_ID JOIN M_Product bl_p ON bl_p.M_Product_ID=bl.M_Product_ID -- UOM conversion from the bom's UOM (e.g. Stk) to the UOM of the bom-line (e.g. Kg) LEFT JOIN C_UOM_Conversion_V conv_b_bl ON conv_b_bl.M_Product_ID=b.M_Product_ID AND conv_b_bl.C_UOM_From_ID=b.C_UOM_ID AND conv_b_bl.C_UOM_To_ID=bl.C_UOM_ID -- UOM conversion from the bom-line's UOM (e.g. mm) to the UOM of the bom-line's product (e.g. Rolle) JOIN C_UOM_Conversion_V conv_bl_p ON conv_bl_p.M_Product_ID=bl.M_Product_ID AND conv_bl_p.C_UOM_From_ID=COALESCE(bl.C_UOM_ID, bl_p.C_UOM_ID) -- cover the case that bomline-uom is empty AND conv_bl_p.C_UOM_To_ID=bl_p.C_UOM_ID WHERE true AND b.IsActive='Y' AND bl.IsActive='Y' AND bl_p.IsActive='Y' AND bl.ComponentType IN ('CO','PK') -- AND b_p.Value='P000787'-- "AB Alicesalat 250g";"Alicesalat, endproduct", Stk -- AND bl_p.Value='P000328' --Frisee, purchased, raw matrerial, kg ; COMMENT ON VIEW "de.metas.fresh".PP_Product_Bom_And_Component IS 'task 08682: added this view in the attempt to make the view MRP_ProductInfo_Poor_Mans_MRP_V more "tidy". But note that the view is also used in the view M_Product_ID_M_AttributeSetInstance_ID_V.' ; --- MRP_ProductInfo_Poor_Mans_MRP_V (function) ------------------------------- CREATE OR REPLACE FUNCTION "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V( IN M_Product_ID numeric, IN M_AttributesetInstance_ID numeric) RETURNS TABLE ( pp_product_bom_id numeric(10,0), b_m_product_id numeric(10,0), b_p_value character varying(40), b_p_name character varying(255), b_m_attributesetinstance_id numeric(10,0), b_m_attributesetgroupnames character varying[], bl_m_product_id numeric(10,0), bl_p_value character varying(40), bl_p_name character varying(255), bl_m_attributesetinstance_id numeric(10,0), qtybatch numeric, qtybom numeric, ispurchased character(1), bl_factor_bom numeric, bl_factor_b_to_bl numeric, bl_factor_bl_to_product numeric, factor_recursive numeric, search_depth integer, path numeric(10,0)[], cycle boolean ) AS $BODY$ WITH RECURSIVE PP_Product_Bom_Recursive AS ( -- Begin at the upmost bom SELECT *, (bl_Factor_BOM * bl_Factor_b_To_bl * bl_Factor_bl_To_Product) AS Factor_Recursive, 1 as search_depth, ARRAY[PP_Product_Bom_ID] as path, false as cycle FROM "de.metas.fresh".PP_Product_Bom_And_Component WHERE b_M_Product_ID=$1 AND b_M_AttributeSetInstance_ID=COALESCE($2, b_M_AttributeSetInstance_ID) UNION ALL -- TBH I don't yet fully understand what I'm doing here :-$, but it works SELECT r.PP_Product_Bom_ID, b.b_M_Product_ID, b.b_p_Value, b.b_p_Name, b.b_M_AttributeSetInstance_ID, "de.metas.dimension".DIM_Get_GroupName('MRP_Product_Info_ASI_Values', GenerateHUStorageASIKey(b.b_M_AttributeSetInstance_ID)), r.bl_M_Product_ID, r.bl_p_Value, r.bl_p_Name, r.bl_M_AttributeSetInstance_ID, r.QtyBatch, r.QtyBom, r.IsPurchased, r.bl_Factor_BOM, r.bl_Factor_b_To_bl, r.bl_Factor_bl_To_Product, (b.bl_Factor_BOM * b.bl_Factor_b_To_bl * b.bl_Factor_bl_To_Product) * Factor_Recursive, search_depth+1, (b.PP_Product_Bom_ID|| path)::numeric(10,0)[], -- example "{1000002,2002017,2002387}" b.PP_Product_Bom_ID = ANY(path) FROM "de.metas.fresh".PP_Product_Bom_And_Component b, PP_Product_Bom_Recursive r -- this is the recursive relf-reference WHERE true -- select the BOM which has a line-product that is the recursive result's BOM ("main") product AND b.bl_M_Product_ID=r.b_M_Product_ID AND COALESCE(GenerateHUStorageASIKey(b.b_M_AttributeSetInstance_ID),'')=COALESCE(GenerateHUStorageASIKey(r.bl_M_AttributeSetInstance_ID),'') -- just a precaution to avoid too deep searches (perf) AND r.search_depth < 6 AND NOT cycle ) SELECT * FROM PP_Product_Bom_Recursive WHERE true -- AND b_M_Product_ID=2000070 -- AB Apero Gemüse mit Sauce 350g -- AND bl_p_M_Product_ID=2000816 -- P001678_Karotten Stäbli Halbfabrikat -- AND bl_p_M_Product_ID=2001416 -- P000367 Karotten gross gewaschen ; $BODY$ LANGUAGE sql STABLE; COMMENT ON FUNCTION "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V(numeric, numeric) IS 'Returns BOM related information about the raw materials of the given M_Product_ID and M_AttributesetInstance_ID. M_AttributesetInstance_ID may also be null in order not to filter by M_AttributesetInstance_ID' ; --- X_MRP_ProductInfo_Detail_Update_Poor_Mans_MRP(date, nummeric, numeric) -------------------------------- DROP FUNCTION IF EXISTS "de.metas.fresh".X_MRP_ProductInfo_Detail_Update_Poor_Mans_MRP(date, numeric, numeric); CREATE OR REPLACE FUNCTION "de.metas.fresh".X_MRP_ProductInfo_Detail_Update_Poor_Mans_MRP(IN DateFrom date, IN M_Product_ID numeric, IN M_AttributesetInstance_ID numeric) RETURNS VOID AS $BODY$ UPDATE X_MRP_ProductInfo_Detail_MV SET fresh_qtymrp=0 WHERE DateGeneral::date = $1 AND M_Product_ID = $2 AND ASIKey = GenerateHUStorageASIKey($3,'') ; UPDATE X_MRP_ProductInfo_Detail_MV mv SET fresh_qtymrp = CEIL(Poor_Mans_MRP_Purchase_Qty), IsFallback='N' FROM ( -- to get our data, -- join the "end-product" mv line with the poor man's MRP record's end-product (b_m_Product_ID) column, and multiply the "end-product" mv's QtyOrdered_Sale_OnDate with the BOM-line's factor -- that way way get the Qtys needed for the raw materials SELECT COALESCE(v_exact.bl_M_Product_ID, v_fallback.bl_M_Product_ID) as bl_M_Product_ID, GenerateHUStorageASIKey(COALESCE(v_exact.b_M_AttributeSetInstance_ID, v_fallback.b_M_AttributeSetInstance_ID),'') as ASIKey, mv2.DateGeneral, SUM(mv2.QtyOrdered_Sale_OnDate * COALESCE(v_exact.Factor_Recursive, v_fallback.Factor_Recursive)) as Poor_Mans_MRP_Purchase_Qty FROM X_MRP_ProductInfo_Detail_MV mv2 -- join the "end-product" mv line with the poor man's MRP record's end-product (b_m_Product_ID) LEFT JOIN "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V($2,$3) v_exact ON mv2.M_Product_ID=v_exact.b_m_Product_ID AND mv2.ASIKey = GenerateHUStorageASIKey(v_exact.b_M_AttributeSetInstance_ID,'') AND v_exact.IsPurchased='Y' LEFT JOIN "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V($2,$3) v_fallback ON mv2.M_Product_ID=v_fallback.b_m_Product_ID AND v_exact.bl_m_Product_ID IS NULL -- it is important to only join v_fallback, if there was no _vevact to be found. Otherwise we would join one v_fallback for each bomline-product AND GenerateHUStorageASIKey(v_fallback.b_M_AttributeSetInstance_ID,'')='' AND v_fallback.IsPurchased='Y' WHERE true AND COALESCE(v_exact.IsPurchased,v_fallback.IsPurchased)='Y' AND mv2.IsFallback='N' -- we can exclude endproducts of fallback records, because they don't have a reserved qty, so they don't contribute to any raw material's Poor_Mans_MRP_Purchase_Qty AND mv2.DateGeneral::date = $1 AND mv2.M_Product_ID = $2 AND mv2.ASIKey = GenerateHUStorageASIKey($3,'') GROUP BY COALESCE(v_exact.bl_M_Product_ID, v_fallback.bl_M_Product_ID), GenerateHUStorageASIKey(COALESCE(v_exact.b_M_AttributeSetInstance_ID, v_fallback.b_M_AttributeSetInstance_ID),''), mv2.DateGeneral ) data WHERE true AND data.bl_M_Product_ID = mv.M_Product_ID AND data.ASIKey = mv.ASIKey AND data.DateGeneral=mv.DateGeneral -- AND mv.IsFallback='N' there is no reason not to update records that were supplemented by X_MRP_ProductInfo_Detail_Fallback_V ; $BODY$ LANGUAGE sql VOLATILE; --- MRP_ProductInfo_Poor_Mans_MRP_V (view), for the date range function ------------------------------ DROP VIEW IF EXISTS "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V; CREATE OR REPLACE VIEW "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V AS WITH RECURSIVE PP_Product_Bom_Recursive AS ( -- Begin at the upmost bom SELECT *, (bl_Factor_BOM * bl_Factor_b_To_bl * bl_Factor_bl_To_Product) AS Factor_Recursive, 1 as search_depth, ARRAY[PP_Product_Bom_ID] as path, false as cycle FROM "de.metas.fresh".PP_Product_Bom_And_Component UNION ALL -- TBH I don't yet fully understand what I'm doing here :-$, but it works SELECT r.PP_Product_Bom_ID, b.b_M_Product_ID, b.b_p_Value, b.b_p_Name, b.b_M_AttributeSetInstance_ID, "de.metas.dimension".DIM_Get_GroupName('MRP_Product_Info_ASI_Values', GenerateHUStorageASIKey(b.b_M_AttributeSetInstance_ID)), r.bl_M_Product_ID, r.bl_p_Value, r.bl_p_Name, r.bl_M_AttributeSetInstance_ID, r.QtyBatch, r.QtyBom, r.IsPurchased, r.bl_Factor_BOM, r.bl_Factor_b_To_bl, r.bl_Factor_bl_To_Product, (b.bl_Factor_BOM * b.bl_Factor_b_To_bl * b.bl_Factor_bl_To_Product) * Factor_Recursive, search_depth+1, (b.PP_Product_Bom_ID|| path)::numeric(10,0)[], -- example "{1000002,2002017,2002387}" b.PP_Product_Bom_ID = ANY(path) FROM "de.metas.fresh".PP_Product_Bom_And_Component b, PP_Product_Bom_Recursive r -- this is the recursive relf-reference WHERE true -- select the BOM which has a line-product that is the recursive result's BOM ("main") product AND b.bl_M_Product_ID=r.b_M_Product_ID AND COALESCE(GenerateHUStorageASIKey(b.b_M_AttributeSetInstance_ID),'')=COALESCE(GenerateHUStorageASIKey(r.bl_M_AttributeSetInstance_ID),'') -- just a precaution to avoid too deep searches (perf) AND r.search_depth < 6 AND NOT cycle ) SELECT * FROM PP_Product_Bom_Recursive WHERE true -- AND b_M_Product_ID=2000070 -- AB Apero Gem�se mit Sauce 350g -- AND bl_p_M_Product_ID=2000816 -- St�bli Halbfabrikat -- AND bl_p_M_Product_ID=2001416 -- Karotten gross gewaschen ; COMMENT ON VIEW "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V IS 'task 08682: first attempt to use recursive SQL. The goal is to find the raw materials for end products. For an endproduct (b_M_Product_ID) the view selects its raw materials, and a factor (Factor_Recursive). The query works over multiple levels of PP_Product_BOMs and bom-lines '; --- X_MRP_ProductInfo_Detail_Update_Poor_Mans_MRP(date, date) -------------------------------- DROP FUNCTION IF EXISTS "de.metas.fresh".X_MRP_ProductInfo_Detail_Update_Poor_Mans_MRP(date, date); CREATE OR REPLACE FUNCTION "de.metas.fresh".X_MRP_ProductInfo_Detail_Update_Poor_Mans_MRP(IN DateFrom date, IN DateTo date) RETURNS VOID AS $BODY$ UPDATE X_MRP_ProductInfo_Detail_MV SET fresh_qtymrp=0 WHERE DateGeneral::date >= $1 AND DateGeneral::date <= $2 ; UPDATE X_MRP_ProductInfo_Detail_MV mv SET fresh_qtymrp = CEIL(Poor_Mans_MRP_Purchase_Qty), IsFallback='N' FROM ( -- to get our data, -- join the "end-product" mv line with the poor man's MRP record's end-product (b_m_Product_ID) column, and multiply the "end-product" mv's QtyOrdered_Sale_OnDate with the BOM-line's factor -- that way way get the Qtys needed for the raw materials SELECT COALESCE(v_exact.bl_M_Product_ID, v_fallback.bl_M_Product_ID) as bl_M_Product_ID, GenerateHUStorageASIKey(COALESCE(v_exact.b_M_AttributeSetInstance_ID, v_fallback.b_M_AttributeSetInstance_ID),'') as ASIKey, mv2.DateGeneral, SUM(mv2.QtyOrdered_Sale_OnDate * COALESCE(v_exact.Factor_Recursive, v_fallback.Factor_Recursive)) as Poor_Mans_MRP_Purchase_Qty FROM X_MRP_ProductInfo_Detail_MV mv2 -- join the "end-product" mv line with the poor man's MRP record's end-product (b_m_Product_ID) LEFT JOIN "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V v_exact ON mv2.M_Product_ID=v_exact.b_m_Product_ID AND mv2.ASIKey = GenerateHUStorageASIKey(v_exact.b_M_AttributeSetInstance_ID,'') AND v_exact.IsPurchased='Y' LEFT JOIN "de.metas.fresh".MRP_ProductInfo_Poor_Mans_MRP_V v_fallback ON mv2.M_Product_ID=v_fallback.b_m_Product_ID AND v_exact.bl_m_Product_ID IS NULL -- it is important to only join v_fallback, if there was no _vevact to be found. Otherwise we would join one v_fallback for each bomline-product AND GenerateHUStorageASIKey(v_fallback.b_M_AttributeSetInstance_ID,'')='' AND v_fallback.IsPurchased='Y' WHERE true AND COALESCE(v_exact.IsPurchased,v_fallback.IsPurchased)='Y' AND mv2.IsFallback='N' -- we can exclude endproducts of fallback records, because they don't have a reserved qty, so they don't contribute to any raw material's Poor_Mans_MRP_Purchase_Qty GROUP BY COALESCE(v_exact.bl_M_Product_ID, v_fallback.bl_M_Product_ID), GenerateHUStorageASIKey(COALESCE(v_exact.b_M_AttributeSetInstance_ID, v_fallback.b_M_AttributeSetInstance_ID),''), mv2.DateGeneral ) data WHERE true AND data.bl_M_Product_ID = mv.M_Product_ID AND data.ASIKey = mv.ASIKey AND data.DateGeneral=mv.DateGeneral -- AND mv.IsFallback='N' there is no reason not to update records that were supplemented by X_MRP_ProductInfo_Detail_Fallback_V AND mv.DateGeneral::date >= $1 AND mv.DateGeneral::date <= $2 ; $BODY$ LANGUAGE sql VOLATILE; --- M_Product_ID_M_AttributeSetInstance_ID_V ------------------------------------ DROP VIEW IF EXISTS "de.metas.fresh".M_Product_ID_M_AttributeSetInstance_ID_V; CREATE OR REPLACE VIEW "de.metas.fresh".M_Product_ID_M_AttributeSetInstance_ID_V AS SELECT M_Product_ID, M_AttributeSetInstance_ID, DateGeneral FROM ( SELECT t.M_Product_ID, t.M_AttributeSetInstance_ID, t.MovementDate::date as DateGeneral, 'M_Transaction' as source FROM M_Transaction t UNION SELECT ol.M_Product_ID, ol.M_AttributeSetInstance_ID, COALESCE( sched.PreparationDate_Override, sched.PreparationDate, -- task 08931: the user works with PreparationDate instead of DatePromised o.PreparationDate, -- fallback in case the schedule does not exist yet o.DatePromised -- fallback in case of orders created by the system (e.g. EDI) and missing proper tour planning master data )::Date AS DateGeneral, 'C_OrderLine' FROM C_Order o JOIN C_OrderLine ol ON ol.C_Order_ID=o.C_Order_ID LEFT JOIN M_ShipmentSchedule sched ON sched.C_OrderLine_ID=ol.C_OrderLine_ID AND sched.IsActive='Y' WHERE o.DocStatus IN ('CO', 'CL') UNION SELECT qohl.M_Product_ID, qohl.M_AttributeSetInstance_ID, qoh.DateDoc::date, 'Fresh_QtyOnHand_Line' FROM Fresh_QtyOnHand qoh JOIN Fresh_QtyOnHand_Line qohl ON qoh.fresh_qtyonhand_id = qohl.Fresh_qtyonhand_id WHERE qoh.Processed='Y' -- UNION -- SELECT mrp.bl_M_Product_ID, mrp.bl_M_AttributeSetInstance_ID, NULL:date -- FROM "de.metas.Fresh".PP_Product_Bom_And_Component mrp ) data WHERE true AND M_Product_ID IS NOT NULL -- AND M_Product_ID=(select M_Product_ID from M_Product where Value='P000037') -- AND DateGeneral::date='2015-04-09'::date GROUP BY M_Product_ID, M_AttributeSetInstance_ID, DateGeneral; COMMENT ON VIEW "de.metas.fresh".M_Product_ID_M_AttributeSetInstance_ID_V IS 'Used in X_MRP_ProductInfo_Detail_V to enumerate all the products and ASIs for which we need numbers. Note: i tried changing this view into an SQL function with dateFrom and dateTo as where-clause paramters, but it didn''t bring any gain in X_MRP_ProductInfo_Detail_V.' ; --- RV_C_OrderLine_QtyOrderedReservedPromised_OnDate_V ------------------------------------ DROP VIEW IF EXISTS "de.metas.fresh".RV_C_OrderLine_QtyOrderedReservedPromised_OnDate_V; CREATE OR REPLACE VIEW "de.metas.fresh".RV_C_OrderLine_QtyOrderedReservedPromised_OnDate_V AS SELECT M_Product_ID, DateGeneral::Date, M_AttributeSetInstance_ID, SUM(QtyReserved_Sale) AS QtyReserved_Sale, SUM(QtyReserved_Purchase) AS QtyReserved_Purchase, SUM(QtyReserved_Purchase) - SUM(QtyReserved_Sale) as QtyPromised, SUM(QtyOrdered_Sale) AS QtyOrdered_Sale FROM ( SELECT COALESCE( sched.PreparationDate_Override, sched.PreparationDate, -- task 08931: the user needs to plan with PreparationDate instead of DatePromised o.PreparationDate, -- fallback in case the schedule does not exist yet o.DatePromised -- fallback in case of orders created by the system (e.g. EDI) and missing proper tour planning master data ) AS DateGeneral, ol.M_Product_ID, ol.M_AttributeSetInstance_ID, CASE WHEN o.IsSOTrx='Y' THEN COALESCE(ol.QtyReserved,0) ELSE 0 END AS QtyReserved_Sale, CASE WHEN o.IsSOTrx='N' THEN COALESCE(ol.QtyReserved,0) ELSE 0 END AS QtyReserved_Purchase, CASE WHEN o.IsSOTrx='Y' THEN COALESCE(ol.QtyOrdered,0) ELSE 0 END AS QtyOrdered_Sale FROM C_Order o JOIN C_OrderLine ol ON ol.C_Order_ID=o.C_Order_ID AND ol.IsActive='Y' AND ol.IsHUStorageDisabled='N' LEFT JOIN M_ShipmentSchedule sched ON sched.C_OrderLine_ID=ol.C_OrderLine_ID AND sched.IsActive='Y' WHERE true AND o.IsActive='Y' AND o.DocStatus IN ('CO', 'CL') ) data GROUP BY DateGeneral, M_Product_ID, M_AttributeSetInstance_ID ; --- RV_HU_QtyMaterialentnahme_OnDate ------------------------------------ DROP VIEW IF EXISTS "de.metas.fresh".RV_HU_QtyMaterialentnahme_OnDate; CREATE OR REPLACE VIEW "de.metas.fresh".RV_HU_QtyMaterialentnahme_OnDate AS SELECT COALESCE(SUM(t.MovementQty), 0) AS QtyMaterialentnahme, TRUNC(t.MovementDate,'DD') as Updated_Date, t.M_Product_ID, t.M_AttributeSetInstance_ID FROM M_Transaction t inner join M_Locator loc on loc.M_Locator_ID=t.M_Locator_ID and loc.M_Warehouse_ID=( select COALESCE(value::integer, -1) from AD_SysConfig where Name='de.metas.handlingunits.client.terminal.inventory.model.InventoryHUEditorModel#DirectMove_Warehouse_ID' and IsActive='Y' order by AD_Client_ID desc, AD_Org_ID desc limit 1) GROUP BY TRUNC(t.MovementDate,'DD'), t.M_Product_ID, t.M_AttributeSetInstance_ID ; COMMENT ON VIEW "de.metas.fresh".RV_HU_QtyMaterialentnahme_OnDate IS 'Task 08476: Despite the name this view is based on M_Transaction, but not that said M_Transactions are created for certain HUs selected by the user. In the user''s context, the whole use-cate/workflow is called "Materialentnahme"'; --- M_Transaction_update_X_Fresh_QtyOnHand_OnDate() --------------------------- DROP TRIGGER IF EXISTS M_Transaction_update_X_Fresh_QtyOnHand_OnDate_INSERT_trigger ON M_Transaction; DROP TRIGGER IF EXISTS M_Transaction_update_X_Fresh_QtyOnHand_OnDate_DELETE_trigger ON M_Transaction; DROP FUNCTION IF EXISTS "de.metas.fresh".M_Transaction_update_X_Fresh_QtyOnHand_OnDate(); CREATE OR REPLACE FUNCTION "de.metas.fresh".m_transaction_update_x_Fresh_qtyonhand_ondate() RETURNS trigger AS $BODY$ DECLARE v_M_Product_ID NUMERIC(10); v_M_AttributeSetInstance_ID NUMERIC(10); v_Date DATE; v_Qty NUMERIC; v_Record RECORD; BEGIN IF (TG_OP='INSERT') THEN v_M_Product_ID := NEW.M_Product_ID; v_M_AttributeSetInstance_ID := NEW.M_AttributeSetInstance_ID; v_Date := NEW.MovementDate; v_Qty := NEW.MovementQty; v_Record := NEW; ELSIF (TG_OP='DELETE') THEN v_M_Product_ID := OLD.M_Product_ID; v_M_AttributeSetInstance_ID := OLD.M_AttributeSetInstance_ID; v_Date := OLD.MovementDate; v_Qty := OLD.MovementQty * -1; v_Record := OLD; ELSE RAISE EXCEPTION 'Trigger operation not supported'; END IF; LOOP -- first try to update the key UPDATE "de.metas.fresh".X_Fresh_QtyOnHand_OnDate t SET Qty=Qty+v_Qty WHERE t.M_Product_ID=v_M_Product_ID AND t.M_AttributeSetInstance_ID=v_M_AttributeSetInstance_ID AND t.MovementDate=v_Date; IF found THEN RETURN v_Record; END IF; -- not there, so try to insert the key -- if someone else inserts the same key concurrently, -- we could get a unique-key failure BEGIN INSERT INTO "de.metas.fresh".X_Fresh_QtyOnHand_OnDate(M_Product_ID, M_AttributeSetInstance_ID, MovementDate, Qty) VALUES (v_M_Product_ID, v_M_AttributeSetInstance_ID, v_Date, v_Qty); RETURN v_Record; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; END; $BODY$ LANGUAGE plpgsql VOLATILE COST 100; ALTER FUNCTION "de.metas.fresh".m_transaction_update_x_Fresh_qtyonhand_ondate() OWNER TO adempiere; COMMENT ON FUNCTION "de.metas.fresh".m_transaction_update_x_Fresh_qtyonhand_ondate() IS 'the function is VOLATILE because it is called from a trigger function and to avoid the error "ERROR: UPDATE is not allowed in a non-volatile function'; DROP TRIGGER IF EXISTS M_Transaction_update_X_Fresh_QtyOnHand_OnDate_INSERT_trigger ON M_Transaction; CREATE TRIGGER M_Transaction_update_X_Fresh_QtyOnHand_OnDate_INSERT_trigger AFTER INSERT ON M_Transaction FOR EACH ROW WHEN (NEW.MovementType IN ('C-', 'C+', 'V-', 'V+')) EXECUTE PROCEDURE "de.metas.fresh".M_Transaction_update_X_Fresh_QtyOnHand_OnDate(); -- DROP TRIGGER IF EXISTS M_Transaction_update_X_Fresh_QtyOnHand_OnDate_DELETE_trigger ON M_Transaction; CREATE TRIGGER M_Transaction_update_X_Fresh_QtyOnHand_OnDate_DELETE_trigger AFTER DELETE ON M_Transaction FOR EACH ROW WHEN (OLD.MovementType IN ('C-', 'C+', 'V-', 'V+')) EXECUTE PROCEDURE "de.metas.fresh".M_Transaction_update_X_Fresh_QtyOnHand_OnDate();
the_stack
--1. ingredient INSERT INTO relationship_to_concept (concept_code_1, vocabulary_id_1, concept_id_2, precedence, mapping_type) SELECT DISTINCT dcs.concept_code, 'AMT', concept_id_2, precedence, mapping_type FROM ingredient_mapped im JOIN drug_concept_stage dcs ON dcs.concept_name = coalesce(im.new_name, im.name) WHERE dcs.concept_class_id = 'Ingredient' AND NOT exists( SELECT 1 FROM relationship_to_concept rtc WHERE rtc.concept_code_1 = dcs.concept_code ) AND im.concept_id_2 NOT IN (0, 17) AND im.concept_id_2 IS NOT NULL ; --2. brand name rtc INSERT INTO relationship_to_concept (concept_code_1, vocabulary_id_1, concept_id_2, precedence, mapping_type) SELECT DISTINCT dcs.concept_code, 'AMT', concept_id_2, precedence, mapping_type FROM brand_name_mapped bnm JOIN drug_concept_stage dcs ON dcs.concept_name = coalesce(bnm.new_name, bnm.name) WHERE dcs.concept_class_id = 'Brand Name' AND NOT exists( SELECT 1 FROM relationship_to_concept rtc WHERE rtc.concept_code_1 = dcs.concept_code ) AND bnm.concept_id_2 NOT IN (0, 17) AND bnm.concept_id_2 IS NOT NULL ; --3. supplier rtc INSERT INTO relationship_to_concept (concept_code_1, vocabulary_id_1, concept_id_2, precedence, mapping_type) SELECT DISTINCT dcs.concept_code, 'AMT', concept_id_2, precedence, mapping_type FROM supplier_mapped sm JOIN drug_concept_stage dcs ON dcs.concept_name = coalesce(sm.new_name, sm.name) WHERE dcs.concept_class_id = 'Supplier' AND NOT exists( SELECT 1 FROM relationship_to_concept rtc WHERE rtc.concept_code_1 = dcs.concept_code ) AND sm.concept_id_2 NOT IN (0, 17) AND sm.concept_id_2 IS NOT NULL ; --4. dose form rtc INSERT INTO relationship_to_concept (concept_code_1, vocabulary_id_1, concept_id_2, precedence, mapping_type) SELECT DISTINCT dcs.concept_code, /*dcs.concept_name,*/ 'AMT', concept_id_2, precedence, mapping_type FROM dose_form_mapped dfm LEFT JOIN drug_concept_stage dcs ON dcs.concept_name = coalesce(dfm.new_name, dfm.name) WHERE dcs.concept_class_id = 'Dose Form' AND NOT exists( SELECT 1 FROM relationship_to_concept rtc WHERE rtc.concept_code_1 = dcs.concept_code ) AND dfm.concept_id_2 NOT IN (0, 17) AND dfm.concept_id_2 IS NOT NULL ; --5. unit rtc INSERT INTO relationship_to_concept (concept_code_1, vocabulary_id_1, concept_id_2, precedence, conversion_factor, mapping_type) SELECT DISTINCT dcs.concept_code, 'AMT', concept_id_2, precedence, conversion_factor, mapping_type FROM unit_mapped um JOIN drug_concept_stage dcs ON dcs.concept_name = coalesce(um.new_name, um.name) WHERE dcs.concept_class_id = 'Unit' AND NOT exists( SELECT 1 FROM relationship_to_concept rtc WHERE rtc.concept_code_1 = dcs.concept_code ) AND um.concept_id_2 NOT IN (0, 17) AND um.concept_id_2 IS NOT NULL ; --delete deprecated concepts (mainly wrong BN) DELETE FROM drug_concept_stage WHERE concept_code IN ( SELECT concept_code_1 FROM relationship_to_concept JOIN concept c ON concept_id_2 = c.concept_id AND c.invalid_reason = 'D' AND concept_class_id != 'Ingredient' AND c.vocabulary_id = 'RxNorm Extension' AND concept_id_2 NOT IN (43252204, 43252218) ); DELETE FROM internal_relationship_stage WHERE concept_code_2 IN ( SELECT concept_code_1 FROM relationship_to_concept JOIN concept c ON concept_id_2 = c.concept_id AND c.invalid_reason = 'D' AND concept_class_id != 'Ingredient' AND c.vocabulary_id = 'RxNorm Extension' AND concept_id_2 NOT IN (43252204, 43252218) ); DELETE FROM relationship_to_concept WHERE concept_code_1 IN ( SELECT concept_code_1 FROM relationship_to_concept JOIN concept c ON concept_id_2 = c.concept_id AND c.invalid_reason = 'D' AND concept_class_id != 'Ingredient' AND c.vocabulary_id = 'RxNorm Extension' AND concept_id_2 NOT IN (43252204, 43252218) ); --remove concepts without relations DELETE FROM drug_concept_stage WHERE concept_code IN ( SELECT a.concept_code FROM drug_concept_stage a LEFT JOIN internal_relationship_stage b ON a.concept_code = b.concept_code_2 WHERE a.concept_class_id = 'Brand Name' AND b.concept_code_1 IS NULL UNION ALL SELECT a.concept_code FROM drug_concept_stage a LEFT JOIN internal_relationship_stage b ON a.concept_code = b.concept_code_2 WHERE a.concept_class_id = 'Dose Form' AND b.concept_code_1 IS NULL ); --updating ingredients that create duplicates after mapping to rxnorm DROP TABLE IF EXISTS ds_sum_2; CREATE TEMP TABLE ds_sum_2 AS WITH a AS ( SELECT DISTINCT ds.*, rc.concept_id_2 FROM ds_stage ds JOIN ds_stage ds2 ON ds.drug_concept_code = ds2.drug_concept_code AND ds.ingredient_concept_code != ds2.ingredient_concept_code JOIN relationship_to_concept rc ON ds.ingredient_concept_code = rc.concept_code_1 JOIN relationship_to_concept rc2 ON ds2.ingredient_concept_code = rc2.concept_code_1 WHERE rc.concept_id_2 = rc2.concept_id_2 ) SELECT DISTINCT drug_concept_code, max(ingredient_concept_code) OVER (PARTITION BY drug_concept_code,concept_id_2) AS ingredient_concept_code, box_size, sum(amount_value) OVER (PARTITION BY drug_concept_code) AS amount_value, amount_unit, sum(numerator_value) OVER (PARTITION BY drug_concept_code,concept_id_2) AS numerator_value, numerator_unit, denominator_value, denominator_unit FROM a UNION SELECT drug_concept_code, ingredient_concept_code, box_size, NULL AS amount_value, NULL AS amount_unit, NULL AS numerator_value, NULL AS numerator_unit, NULL AS denominator_value, NULL AS denominator_unit FROM a WHERE (drug_concept_code, ingredient_concept_code) NOT IN ( SELECT drug_concept_code, max(ingredient_concept_code) FROM a GROUP BY drug_concept_code ); DELETE FROM ds_stage WHERE (drug_concept_code, ingredient_concept_code) IN ( SELECT drug_concept_code, ingredient_concept_code FROM ds_sum_2 ); INSERT INTO ds_stage (drug_concept_code, ingredient_concept_code, box_size, amount_value, amount_unit, numerator_value, numerator_unit, denominator_value, denominator_unit) SELECT DISTINCT drug_concept_code, ingredient_concept_code, box_size, amount_value, amount_unit, numerator_value, numerator_unit, denominator_value, denominator_unit FROM ds_sum_2 WHERE coalesce(amount_value, numerator_value) IS NOT NULL; --delete relationship to ingredients that we removed DELETE FROM internal_relationship_stage WHERE (concept_code_1, concept_code_2) IN ( SELECT drug_concept_code, ingredient_concept_code FROM ds_sum_2 WHERE coalesce(amount_value, numerator_value) IS NULL ); -- resolve w/w v/v conflicts for different ingredients in the same drug UPDATE ds_stage SET denominator_unit = 'Ml', numerator_value = 0.77 WHERE drug_concept_code IN ('1258241000168101', '1258231000168105') AND ingredient_concept_code = '31199011000036100' -- ethanol AND numerator_value = 700; UPDATE ds_stage SET denominator_unit = 'Ml' WHERE drug_concept_code IN ('1384271000168102', '1384281000168104', '1384291000168101', '1384301000168100', '1384311000168102', '1384321000168109', '1384331000168107', '1384341000168103', '1384351000168101', '1384361000168104', '1384371000168105', '1384381000168108') AND ingredient_concept_code = '1934011000036108' -- chlorhexidine gluconate AND denominator_unit = 'G'; --deleting drug forms DELETE FROM ds_stage WHERE drug_concept_code IN ( SELECT drug_concept_code FROM ds_stage WHERE coalesce(amount_value, numerator_value, -1) = -1 ); --add water INSERT INTO ds_stage (drug_concept_code, ingredient_concept_code, numerator_value, numerator_unit, denominator_unit) SELECT concept_name, '11295', 1000, 'Mg', 'Ml' FROM drug_concept_stage dcs JOIN ( SELECT concept_code_1 FROM internal_relationship_stage JOIN drug_concept_stage ON concept_code_2 = concept_code AND concept_class_id = 'Supplier' LEFT JOIN ds_stage ON drug_concept_code = concept_code_1 WHERE drug_concept_code IS NULL UNION SELECT concept_code_1 FROM internal_relationship_stage JOIN drug_concept_stage ON concept_code_2 = concept_code AND concept_class_id = 'Supplier' WHERE concept_code_1 NOT IN ( SELECT concept_code_1 FROM internal_relationship_stage JOIN drug_concept_stage ON concept_code_2 = concept_code AND concept_class_id = 'Dose Form' ) ) s ON s.concept_code_1 = dcs.concept_code WHERE dcs.concept_class_id = 'Drug Product' AND invalid_reason IS NULL AND concept_name LIKE 'water%'; --adding missing relations from ds_stage INSERT INTO internal_relationship_stage (concept_code_1, concept_code_2) SELECT DISTINCT drug_concept_code, ingredient_concept_code FROM ds_stage WHERE (drug_concept_code, ingredient_concept_code) NOT IN ( SELECT concept_code_1, concept_code_2 FROM internal_relationship_stage ); --generate mapping review DROP TABLE IF EXISTS mapping_review; CREATE TABLE mapping_review AS SELECT DISTINCT dcs.concept_class_id AS source_concept_calss_id, coalesce(dcsb.concept_name, dcs.concept_name) AS name, mapped.new_name AS new_name, dcs.concept_code as concept_code_1, rtc.concept_id_2, rtc.precedence, rtc.mapping_type, rtc.conversion_factor, c.* FROM drug_concept_stage dcs LEFT JOIN relationship_to_concept rtc ON dcs.concept_code = rtc.concept_code_1 LEFT JOIN concept c ON rtc.concept_id_2 = c.concept_id LEFT JOIN ( SELECT name, new_name, concept_id_2, precedence, NULL::float AS conversion_factor, mapping_type FROM ingredient_mapped UNION SELECT name, new_name, concept_id_2, precedence, NULL::float AS conversion_factor, mapping_type FROM brand_name_mapped UNION SELECT name, new_name, concept_id_2, precedence, NULL::float AS conversion_factor, mapping_type FROM supplier_mapped UNION SELECT name, new_name, concept_id_2, precedence, NULL::float AS conversion_factor, mapping_type FROM dose_form_mapped UNION SELECT name, new_name, concept_id_2, precedence, conversion_factor, mapping_type FROM unit_mapped ) AS mapped ON lower(coalesce(mapped.new_name, mapped.name)) = lower(dcs.concept_name) LEFT JOIN drug_concept_stage_backup dcsb ON dcs.concept_code = dcsb.concept_code WHERE dcs.concept_class_id IN ('Ingredient', 'Brand Name', 'Supplier', 'Dose Form', 'Unit') ; --== remove to be created concepts from mapped tables ==-- DO $_$ BEGIN --formatter:off DELETE FROM ingredient_mapped WHERE concept_id_2 IS NULL; DELETE FROM brand_name_mapped WHERE concept_id_2 IS NULL; DELETE FROM dose_form_mapped WHERE concept_id_2 IS NULL; DELETE FROM supplier_mapped WHERE concept_id_2 IS NULL; DELETE FROM unit_mapped WHERE concept_id_2 IS NULL; --formatter:on END; $_$; --create mapping_review, non_drug, pc_stage, relationship_to_concept backup DO $body$ DECLARE update text; BEGIN SELECT latest_update INTO update FROM vocabulary WHERE vocabulary_id = 'AMT' LIMIT 1; EXECUTE format('drop table if exists %I; create table if not exists %I as select distinct * from mapping_review', 'mapping_review_backup_' || update, 'mapping_review_backup_' || update ); EXECUTE format('drop table if exists %I; create table if not exists %I as select distinct * from non_drug', 'non_drug_backup_' || update, 'non_drug_backup_' || update ); EXECUTE format('drop table if exists %I; create table if not exists %I as select distinct * from pc_stage', 'pc_stage_backup_' || update, 'pc_stage_backup_' || update); EXECUTE format('drop table if exists %I; create table if not exists %I as select * from relationship_to_concept', 'relationship_to_concept_backup_' || update, 'relationship_to_concept_backup_' || update); END $body$; -- Clean up tables DO $_$ BEGIN drop table if exists non_drug; drop table if exists supplier; drop table if exists supplier_2; drop table if exists unit; drop table if exists form; drop table if exists dcs_bn; drop table if exists drug_concept_stage_backup; drop table if exists ds_0; drop table if exists ds_0_1_1; drop table if exists ds_0_1_3; drop table if exists ds_0_1_4; drop table if exists ds_0_2_0; drop table if exists ds_0_2; drop table if exists ds_0_3; drop table if exists non_S_ing_to_S; drop table if exists non_S_form_to_S; drop table if exists non_S_bn_to_S; drop table if exists drug_to_supplier; drop table if exists supp_upd; DROP TABLE IF EXISTS irs_upd; DROP TABLE IF EXISTS irs_upd_2; DROP TABLE IF EXISTS ds_sum; DROP TABLE IF EXISTS pc_0_initial; DROP TABLE IF EXISTS pc_1_ampersand_sep; DROP TABLE IF EXISTS pc_1_comma_sep; DROP TABLE IF EXISTS pc_2_ampersand_sep_amount; DROP TABLE IF EXISTS pc_2_comma_sep_amount; DROP TABLE IF EXISTS pc_3_box_size; DROP TABLE IF EXISTS undetected_packs; DROP TABLE IF EXISTS pc_wrong; DROP TABLE IF EXISTS pc_identical_drugs; DROP TABLE IF EXISTS ampersand_sep_intersection_check; DROP TABLE IF EXISTS ampersand_sep_intersection_ambig; DROP TABLE IF EXISTS comma_sep_intersection_ambig; DROP TABLE IF EXISTS pc_2_comma_sep_amount_insertion; DROP TABLE IF EXISTS comma_sep_intersection_check; END; $_$; -- needed for BuildRxE to run ALTER TABLE relationship_to_concept DROP COLUMN mapping_type; -- insert valid vaccine concepts into crm TRUNCATE concept_relationship_manual; INSERT INTO concept_relationship_manual SELECT source_concept_code, concept_code, 'AMT', vocabulary_id, 'Maps to', CURRENT_DATE, '2099-12-31'::DATE, NULL FROM vaccines_to_map WHERE vocabulary_id ILIKE '%Rx%' AND standard_concept = 'S';
the_stack
-- 2017-10-05T18:39:31.358 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:39:31','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Fetched' WHERE AD_Field_ID=554348 AND AD_Language='en_US' ; -- 2017-10-05T18:39:55.056 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:39:55','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Preparation Date' WHERE AD_Field_ID=547678 AND AD_Language='en_US' ; -- 2017-10-05T18:40:02.570 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:40:02','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=547679 AND AD_Language='en_US' ; -- 2017-10-05T18:40:11.323 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:40:11','YYYY-MM-DD HH24:MI:SS'),Description='',Help='' WHERE AD_Field_ID=547680 AND AD_Language='en_US' ; -- 2017-10-05T18:40:18.866 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:40:18','YYYY-MM-DD HH24:MI:SS'),Description='',Help='' WHERE AD_Field_ID=547681 AND AD_Language='en_US' ; -- 2017-10-05T18:40:33.497 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:40:33','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Business Partner',Description='',Help='' WHERE AD_Field_ID=547682 AND AD_Language='en_US' ; -- 2017-10-05T18:40:53.770 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:40:53','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Delivery Time' WHERE AD_Field_ID=559477 AND AD_Language='en_US' ; -- 2017-10-05T18:41:34.835 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:41:34','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Manually',Description='',Help='' WHERE AD_Field_ID=547684 AND AD_Language='en_US' ; -- 2017-10-05T18:41:46.785 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:41:46','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Buffer (h)' WHERE AD_Field_ID=553952 AND AD_Language='en_US' ; -- 2017-10-05T18:42:02.386 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:42:02','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Location',Description='',Help='' WHERE AD_Field_ID=547686 AND AD_Language='en_US' ; -- 2017-10-05T18:42:07.914 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:42:07','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=547687 AND AD_Language='en_US' ; -- 2017-10-05T18:42:13.205 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:42:13','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=547688 AND AD_Language='en_US' ; -- 2017-10-05T18:42:24.835 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:42:24','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Processed',Description='',Help='' WHERE AD_Field_ID=554551 AND AD_Language='en_US' ; -- 2017-10-05T18:47:17.165 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Tab_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:47:17','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Transportline Allocation' WHERE AD_Tab_ID=540606 AND AD_Language='en_US' ; -- 2017-10-05T18:47:53.166 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:47:53','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Qty to Deliver' WHERE AD_Field_ID=554568 AND AD_Language='en_US' ; -- 2017-10-05T18:51:28.238 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:51:28','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Qty to Deliver (LU)' WHERE AD_Field_ID=554578 AND AD_Language='en_US' ; -- 2017-10-05T18:51:44.454 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:51:44','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Qty to Deliver (TU)' WHERE AD_Field_ID=554575 AND AD_Language='en_US' ; -- 2017-10-05T18:52:01.036 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:52:01','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Qty Ordered',Description='',Help='' WHERE AD_Field_ID=554567 AND AD_Language='en_US' ; -- 2017-10-05T18:52:20.419 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:52:20','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Qty Ordered (LU)',Description='Qty Ordered (LU)',Help='' WHERE AD_Field_ID=554574 AND AD_Language='en_US' ; -- 2017-10-05T18:52:42.996 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:52:42','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Qty Ordered (TU)',Description='Qty Ordered (TU)',Help='' WHERE AD_Field_ID=554573 AND AD_Language='en_US' ; -- 2017-10-05T18:53:00.837 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:53:00','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=554564 AND AD_Language='en_US' ; -- 2017-10-05T18:53:07.024 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:53:07','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y' WHERE AD_Field_ID=554565 AND AD_Language='en_US' ; -- 2017-10-05T18:53:26.375 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:53:26','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Shipped Qty',Description='Shipped Qty',Help='' WHERE AD_Field_ID=554569 AND AD_Language='en_US' ; -- 2017-10-05T18:53:43.653 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:53:43','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Shipped Qty (LU)',Description='Shipped Qty (LU)',Help='' WHERE AD_Field_ID=554577 AND AD_Language='en_US' ; -- 2017-10-05T18:54:11.743 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:54:11','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Shipped Qty (TU)',Description='Shipped Qty (TU)',Help='' WHERE AD_Field_ID=554576 AND AD_Language='en_US' ; -- 2017-10-05T18:54:29.242 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field_Trl SET UpdatedBy=100,Updated=TO_TIMESTAMP('2017-10-05 18:54:29','YYYY-MM-DD HH24:MI:SS'),IsTranslated='Y',Name='Product',Description='',Help='' WHERE AD_Field_ID=554570 AND AD_Language='en_US' ; -- 2017-10-05T18:55:25.235 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,554562,0,540606,540266,549005,'F',TO_TIMESTAMP('2017-10-05 18:55:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Sektion',10,0,0,TO_TIMESTAMP('2017-10-05 18:55:24','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-05T18:55:33.323 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_UI_Element (AD_Client_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,AD_UI_ElementGroup_ID,AD_UI_Element_ID,AD_UI_ElementType,Created,CreatedBy,IsActive,IsAdvancedField,IsDisplayed,IsDisplayedGrid,IsDisplayed_SideList,Name,SeqNo,SeqNoGrid,SeqNo_SideList,Updated,UpdatedBy) VALUES (0,554561,0,540606,540266,549006,'F',TO_TIMESTAMP('2017-10-05 18:55:33','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','Y','N','N','Mandant',20,0,0,TO_TIMESTAMP('2017-10-05 18:55:33','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-05T18:55:37.920 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2017-10-05 18:55:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=549005 ; -- 2017-10-05T18:55:57.160 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='M',Updated=TO_TIMESTAMP('2017-10-05 18:55:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=549005 ; -- 2017-10-05T18:56:00.406 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_Element SET WidgetSize='M',Updated=TO_TIMESTAMP('2017-10-05 18:56:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_Element_ID=549006 ; -- 2017-10-05T18:58:46.992 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_UI_ElementGroup SET UIStyle='primary',Updated=TO_TIMESTAMP('2017-10-05 18:58:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_UI_ElementGroup_ID=540266 ; -- 2017-10-05T18:59:03.259 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET SortNo=1.000000000000,Updated=TO_TIMESTAMP('2017-10-05 18:59:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=554570 ;
the_stack
-- 08.10.2015 16:15 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,Classname,CopyFromProcess,Created,CreatedBy,Description,EntityType,IsActive,IsBetaFunctionality,IsDirectPrint,IsOneInstanceOnly,IsReport,IsServerProcess,JasperReport,LockWaitTimeout,Name,RefreshAllAfterExecution,ShowHelp,Statistic_Count,Statistic_Seconds,Type,Updated,UpdatedBy,Value) VALUES ('3',0,0,540617,'org.compiere.report.ReportStarter','N',TO_TIMESTAMP('2015-10-08 16:14:58','YYYY-MM-DD HH24:MI:SS'),100,'Offene Posten Saldo (Jasper)','de.metas.fresh','Y','N','N','N','Y','N','@PREFIX@de/metas/reports/openitems_saldo/report.jasper',0,'Offene Posten Saldo (Jasper)','N','Y',0,0,'Java',TO_TIMESTAMP('2015-10-08 16:14:58','YYYY-MM-DD HH24:MI:SS'),100,'Offene Posten Saldo (Jasper)') ; -- 08.10.2015 16:15 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=540617 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) ; -- 08.10.2015 16:16 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,1106,0,540617,540806,20,'IsSOTrx',TO_TIMESTAMP('2015-10-08 16:16:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',NULL,'de.metas.fresh',0,NULL,'Y','N','Y','N','N','N','Verkaufs-Transaktion',10,TO_TIMESTAMP('2015-10-08 16:16:54','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.10.2015 16:16 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540806 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Process_ID,Created,CreatedBy,Description,EntityType,InternalName,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('R',0,540651,0,540617,TO_TIMESTAMP('2015-10-08 16:18:51','YYYY-MM-DD HH24:MI:SS'),100,'Offene Posten Saldo (Jasper)','de.metas.fresh','Offene Posten Saldo (Jasper)','Y','N','N','N','Offene Posten Saldo (Jasper)',TO_TIMESTAMP('2015-10-08 16:18:51','YYYY-MM-DD HH24:MI:SS'),100) ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=540651 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', now(), 100, now(), 100,t.AD_Tree_ID, 540651, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.AD_Table_ID=116 AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=540651) ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=0, Updated=now(), UpdatedBy=100 WHERE Node_ID=53324 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=1, Updated=now(), UpdatedBy=100 WHERE Node_ID=241 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=2, Updated=now(), UpdatedBy=100 WHERE Node_ID=288 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=3, Updated=now(), UpdatedBy=100 WHERE Node_ID=432 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=4, Updated=now(), UpdatedBy=100 WHERE Node_ID=243 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=5, Updated=now(), UpdatedBy=100 WHERE Node_ID=413 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=6, Updated=now(), UpdatedBy=100 WHERE Node_ID=538 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=7, Updated=now(), UpdatedBy=100 WHERE Node_ID=462 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=8, Updated=now(), UpdatedBy=100 WHERE Node_ID=505 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=9, Updated=now(), UpdatedBy=100 WHERE Node_ID=235 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=10, Updated=now(), UpdatedBy=100 WHERE Node_ID=511 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=11, Updated=now(), UpdatedBy=100 WHERE Node_ID=245 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=12, Updated=now(), UpdatedBy=100 WHERE Node_ID=251 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=13, Updated=now(), UpdatedBy=100 WHERE Node_ID=246 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=14, Updated=now(), UpdatedBy=100 WHERE Node_ID=509 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=15, Updated=now(), UpdatedBy=100 WHERE Node_ID=510 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=16, Updated=now(), UpdatedBy=100 WHERE Node_ID=496 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=17, Updated=now(), UpdatedBy=100 WHERE Node_ID=497 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=18, Updated=now(), UpdatedBy=100 WHERE Node_ID=304 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=19, Updated=now(), UpdatedBy=100 WHERE Node_ID=255 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=20, Updated=now(), UpdatedBy=100 WHERE Node_ID=286 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=21, Updated=now(), UpdatedBy=100 WHERE Node_ID=287 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=22, Updated=now(), UpdatedBy=100 WHERE Node_ID=438 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=23, Updated=now(), UpdatedBy=100 WHERE Node_ID=234 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=24, Updated=now(), UpdatedBy=100 WHERE Node_ID=244 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=25, Updated=now(), UpdatedBy=100 WHERE Node_ID=53190 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=26, Updated=now(), UpdatedBy=100 WHERE Node_ID=53187 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=27, Updated=now(), UpdatedBy=100 WHERE Node_ID=540642 AND AD_Tree_ID=10 ; -- 08.10.2015 16:18 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_TreeNodeMM SET Parent_ID=236, SeqNo=28, Updated=now(), UpdatedBy=100 WHERE Node_ID=540651 AND AD_Tree_ID=10 ; -- 08.10.2015 16:19 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET IsSOTrx='Y',Updated=TO_TIMESTAMP('2015-10-08 16:19:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=540651 ; -- 09.10.2015 12:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAutocomplete,IsCentrallyMaintained,IsEncrypted,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,0,540617,540807,15,'Reference_Date',TO_TIMESTAMP('2015-10-09 12:38:20','YYYY-MM-DD HH24:MI:SS'),100,'@#Date@','Referenzdatum zur Berechnung der Tage der Fälligkeit eines Postens','de.metas.fresh',0,'Y','N','Y','N','N','N','Stichtag',20,TO_TIMESTAMP('2015-10-09 12:38:20','YYYY-MM-DD HH24:MI:SS'),100) ; -- 09.10.2015 12:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=540807 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) ; -- 09.10.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process SET Description='Offene Posten Fibu (Jasper)', Name='Offene Posten Fibu (Jasper)', Value='Offene Posten Fibu (Jasper)',Updated=TO_TIMESTAMP('2015-10-09 14:10:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=540617 ; -- 09.10.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Trl SET IsTranslated='N' WHERE AD_Process_ID=540617 ; -- 09.10.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET Description='Offene Posten Fibu (Jasper)', IsActive='Y', Name='Offene Posten Fibu (Jasper)',Updated=TO_TIMESTAMP('2015-10-09 14:10:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=540651 ; -- 09.10.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=540651 ; -- 09.10.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process SET JasperReport='@PREFIX@de/metas/reports/openitems_fibu/report.jasper',Updated=TO_TIMESTAMP('2015-10-09 14:10:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=540617 ; -- 09.10.2015 14:10 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Menu SET InternalName='Offene Posten Fibu (Jasper)',Updated=TO_TIMESTAMP('2015-10-09 14:10:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=540651 ;
the_stack
LOAD 'pg_hint_plan'; SET pg_hint_plan.enable_hint TO on; SET pg_hint_plan.debug_print TO on; SET client_min_messages TO LOG; SET search_path TO public; \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-1-1 specified pattern of the object name ---- -- No. R-1-1-1 \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-1-2 \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1 t_1, s1.t2 t_2 WHERE t_1.c1 = t_2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-1-3 \o results/ut-R.tmpout /*+Rows(t_1 t_2 #1)*/ EXPLAIN SELECT * FROM s1.t1 t_1, s1.t2 t_2 WHERE t_1.c1 = t_2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-1-2 specified schema name in the hint option ---- -- No. R-1-2-1 \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-2-2 \o results/ut-R.tmpout /*+Rows(s1.t1 s1.t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-1-3 table doesn't exist in the hint option ---- -- No. R-1-3-1 \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-3-2 \o results/ut-R.tmpout /*+Rows(t3 t4 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-1-4 conflict table name ---- -- No. R-1-4-1 \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-4-2 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t1 #1)*/ EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(s1.t1 s2.t1 #1)*/ EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = s2t1.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 s2t1 #1)*/ EXPLAIN SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = s2t1.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-4-3 \o results/ut-R.tmpout EXPLAIN SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(st1 st2 #1)Rows(t1 t2 #1)*/ EXPLAIN SELECT *, (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-1-5 conflict table name ---- -- No. R-1-5-1 \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-5-2 \o results/ut-R.tmpout /*+Rows(t1 t1 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-5-3 \o results/ut-R.tmpout /*+(t1 t1)(t2 t2)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+(t1 t2 t1 t2)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-1-6 object type for the hint ---- -- No. R-1-6-1 \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-2 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-3 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-4 CREATE TEMP TABLE tm1 (LIKE s1.t1 INCLUDING ALL); \o results/ut-R.tmpout EXPLAIN SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-5 CREATE TEMP TABLE t_pg_class AS SELECT * from pg_class LIMIT 100; \o results/ut-R.tmpout EXPLAIN SELECT * FROM t_pg_class t1, t_pg_class t2 WHERE t1.oid = t2.oid; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM t_pg_class t1, t_pg_class t2 WHERE t1.oid = t2.oid; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-6 -- refer ut-fdw.sql -- No. R-1-6-7 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-8 \o results/ut-R.tmpout EXPLAIN SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(*VALUES* t2 #1)*/ EXPLAIN SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-9 \o results/ut-R.tmpout EXPLAIN WITH c1(c1) AS (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) SELECT * FROM s1.t1, c1 WHERE t1.c1 = c1.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)Rows(t1 c1 +1)*/ EXPLAIN WITH c1(c1) AS (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) SELECT * FROM s1.t1, c1 WHERE t1.c1 = c1.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-10 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(v1t1 v1t1_ #1)*/ EXPLAIN SELECT * FROM s1.v1 t1, s1.v1_ t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-6-11 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.c1 = (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1); \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)Rows(st1 st2 #1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.c1 = (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1); \o \! sql/maskout.sh results/ut-R.tmpout -- -- There are cases where difference in the measured value and predicted value -- depending upon the version of PostgreSQL -- \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 st2 #1)*/ EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-1-7 specified number of conditions ---- -- No. R-1-7-1 \o results/ut-R.tmpout /*+Rows(t1 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-7-2 \o results/ut-R.tmpout /*+Rows(t1 t2 1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-1-7-3 \o results/ut-R.tmpout /*+Rows(t1 t2 #notrows)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-2-1 some complexity query blocks ---- -- No. R-2-1-1 \o results/ut-R.tmpout /*+ Leading(bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) */ EXPLAIN SELECT max(bmt1.c1), ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ), ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 ; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1) Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1) Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1) */ EXPLAIN SELECT max(bmt1.c1), ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ), ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 ; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-1-2 \o results/ut-R.tmpout /*+ Leading(bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) Leading(b3t4 b3t1 b3t2 b3t3) MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4) */ EXPLAIN SELECT max(bmt1.c1), ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ), ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ), ( SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1 ) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 ; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) Leading(b3t4 b3t1 b3t2 b3t3) MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4) Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1) Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1) Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1) Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1) */ EXPLAIN SELECT max(bmt1.c1), ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ), ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ), ( SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1 ) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 ; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-1-3 \o results/ut-R.tmpout /*+ Leading(bmt4 bmt3 bmt2 bmt1) */ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt4 bmt3 bmt2 bmt1) Rows(bmt4 bmt3 #1)Rows(bmt4 bmt3 bmt2 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1) */ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-1-4 \o results/ut-R.tmpout /*+ Leading(bmt4 bmt3 bmt2 bmt1) */ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt4 bmt3 bmt2 bmt1) Rows(bmt4 bmt3 #1)Rows(bmt4 bmt3 bmt2 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1) */ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-1-5 \o results/ut-R.tmpout /*+ Leading(bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) */ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 <> ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) AND bmt1.c1 <> ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ); \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1) Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1) Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1) */ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 <> ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) AND bmt1.c1 <> ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) ; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-1-6 \o results/ut-R.tmpout /*+ Leading(bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) Leading(b3t4 b3t1 b3t2 b3t3) MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4) */ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 <> ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) AND bmt1.c1 <> ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) AND bmt1.c1 <> ( SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1 ) ; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) Leading(b3t4 b3t1 b3t2 b3t3) MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4) Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1) Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1) Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1) Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1) */ EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 <> ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) AND bmt1.c1 <> ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) AND bmt1.c1 <> ( SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1 ) ; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-1-7 \o results/ut-R.tmpout /*+ Leading(c2 c1 bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) MergeJoin(c2 c1)HashJoin(c2 c1 bmt1)NestLoop(c2 c1 bmt1 bmt2)MergeJoin(c2 c1 bmt1 bmt2 bmt3)HashJoin(c2 c1 bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) */ EXPLAIN WITH c1 (c1) AS ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) , c2 (c1) AS ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 , c1, c2 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 = c2.c1 ; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(c2 c1 bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) MergeJoin(c2 c1)HashJoin(c2 c1 bmt1)NestLoop(c2 c1 bmt1 bmt2)MergeJoin(c2 c1 bmt1 bmt2 bmt3)HashJoin(c2 c1 bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) Rows(c2 c1 #1)Rows(c2 c1 bmt1 #1)Rows(c2 c1 bmt1 bmt2 #1)Rows(c2 c1 bmt1 bmt2 bmt3 #1)Rows(c2 c1 bmt1 bmt2 bmt3 bmt4 #1) Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1) Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1) */ EXPLAIN WITH c1 (c1) AS ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) , c2 (c1) AS ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 , c1, c2 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 = c2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-1-8 \o results/ut-R.tmpout /*+ Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) Leading(b3t4 b3t1 b3t2 b3t3) MergeJoin(c3 c2)HashJoin(c3 c2 c1)NestLoop(c3 c2 c1 bmt1)MergeJoin(c3 c2 c1 bmt1 bmt2)HashJoin(c3 c2 c1 bmt1 bmt2 bmt3)NestLoop(c3 c2 c1 bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4) */ EXPLAIN WITH c1 (c1) AS ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) , c2 (c1) AS ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) , c3 (c1) AS ( SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1 ) SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 , c1, c2, c3 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 = c2.c1 AND bmt1.c1 = c3.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4) Leading(b1t2 b1t3 b1t4 b1t1) Leading(b2t3 b2t4 b2t1 b2t2) Leading(b3t4 b3t1 b3t2 b3t3) MergeJoin(c3 c2)HashJoin(c3 c2 c1)NestLoop(c3 c2 c1 bmt1)MergeJoin(c3 c2 c1 bmt1 bmt2)HashJoin(c3 c2 c1 bmt1 bmt2 bmt3)NestLoop(c3 c2 c1 bmt1 bmt2 bmt3 bmt4) MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1) MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2) MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4) Rows(c3 c2 #1)Rows(c3 c2 c1 #1)Rows(c3 c2 c1 bmt1 #1)Rows(c3 c2 c1 bmt1 bmt2 #1)Rows(c3 c2 c1 bmt1 bmt2 bmt3 #1)Rows(c3 c2 c1 bmt1 bmt2 bmt3 bmt4 #1) Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1) Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1) Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1) */ EXPLAIN WITH c1 (c1) AS ( SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) , c2 (c1) AS ( SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) , c3 (c1) AS ( SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1 ) SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 , c1, c2, c3 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 = c2.c1 AND bmt1.c1 = c3.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-2-2 the number of the tables per quiry block ---- -- No. R-2-2-1 \o results/ut-R.tmpout /*+ Leading(c1 bmt1) */ EXPLAIN WITH c1 (c1) AS ( SELECT b1t1.c1 FROM s1.t1 b1t1 WHERE b1t1.c1 = 1 ) SELECT bmt1.c1, ( SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1 ) FROM s1.t1 bmt1, c1 WHERE bmt1.c1 = 1 AND bmt1.c1 = c1.c1 AND bmt1.c1 <> ( SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1 ); \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(c1 bmt1) Rows(bmt1 c1 #1) Rows(b1t1 c1 #1) Rows(b2t1 c1 #1) Rows(b3t1 c1 #1) */ EXPLAIN WITH c1 (c1) AS ( SELECT b1t1.c1 FROM s1.t1 b1t1 WHERE b1t1.c1 = 1 ) SELECT bmt1.c1, ( SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1 ) FROM s1.t1 bmt1, c1 WHERE bmt1.c1 = 1 AND bmt1.c1 = c1.c1 AND bmt1.c1 <> ( SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1 ); \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-2-2 \o results/ut-R.tmpout /*+ Leading(c1 bmt2 bmt1) Leading(b1t2 b1t1) Leading(b2t2 b2t1) Leading(b3t2 b3t1) MergeJoin(c1 bmt2) HashJoin(c1 bmt1 bmt2) MergeJoin(b1t1 b1t2) MergeJoin(b2t1 b2t2) MergeJoin(b3t1 b3t2) */ EXPLAIN WITH c1 (c1) AS ( SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2 WHERE b1t1.c1 = b1t2.c1 ) SELECT bmt1.c1, ( SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2 WHERE b2t1.c1 = b2t2.c1 ) FROM s1.t1 bmt1, s1.t2 bmt2, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 <> ( SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.c1 = b3t2.c1 ); \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(c1 bmt2 bmt1) Leading(b1t2 b1t1) Leading(b2t2 b2t1) Leading(b3t2 b3t1) MergeJoin(c1 bmt2) HashJoin(c1 bmt1 bmt2) MergeJoin(b1t1 b1t2) MergeJoin(b2t1 b2t2) MergeJoin(b3t1 b3t2) Rows(c1 bmt2 #1) Rows(c1 bmt1 bmt2 #1) Rows(b1t1 b1t2 #1) Rows(b2t1 b2t2 #1) Rows(b3t1 b3t2 #1) */ EXPLAIN WITH c1 (c1) AS ( SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2 WHERE b1t1.c1 = b1t2.c1 ) SELECT bmt1.c1, ( SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2 WHERE b2t1.c1 = b2t2.c1 ) FROM s1.t1 bmt1, s1.t2 bmt2, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 <> ( SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.c1 = b3t2.c1 ) ; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-2-3 \o results/ut-R.tmpout /*+ Leading(c1 bmt4 bmt3 bmt2 bmt1) Leading(b1t4 b1t3 b1t2 b1t1) Leading(b2t4 b2t3 b2t2 b2t1) Leading(b3t4 b3t3 b3t2 b3t1) MergeJoin(c1 bmt4) HashJoin(c1 bmt4 bmt3) NestLoop(c1 bmt4 bmt3 bmt2) MergeJoin(c1 bmt4 bmt3 bmt2 bmt1) HashJoin(b1t4 b1t3) NestLoop(b1t4 b1t3 b1t2) MergeJoin(b1t4 b1t3 b1t2 b1t1) HashJoin(b2t4 b2t3) NestLoop(b2t4 b2t3 b2t2) MergeJoin(b2t4 b2t3 b2t2 b2t1) HashJoin(b3t4 b3t3) NestLoop(b3t4 b3t3 b3t2) MergeJoin(b3t4 b3t3 b3t2 b3t1) */ EXPLAIN WITH c1 (c1) AS ( SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) SELECT bmt1.c1, ( SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 <> ( SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1 ); \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(c1 bmt4 bmt3 bmt2 bmt1) Leading(b1t4 b1t3 b1t2 b1t1) Leading(b2t4 b2t3 b2t2 b2t1) Leading(b3t4 b3t3 b3t2 b3t1) MergeJoin(c1 bmt4) HashJoin(c1 bmt4 bmt3) NestLoop(c1 bmt4 bmt3 bmt2) MergeJoin(c1 bmt4 bmt3 bmt2 bmt1) HashJoin(b1t4 b1t3) NestLoop(b1t4 b1t3 b1t2) MergeJoin(b1t4 b1t3 b1t2 b1t1) HashJoin(b2t4 b2t3) NestLoop(b2t4 b2t3 b2t2) MergeJoin(b2t4 b2t3 b2t2 b2t1) HashJoin(b3t4 b3t3) NestLoop(b3t4 b3t3 b3t2) MergeJoin(b3t4 b3t3 b3t2 b3t1) Rows(c1 bmt4 #1) Rows(c1 bmt4 bmt3 #1) Rows(c1 bmt4 bmt3 bmt2 #1) Rows(c1 bmt4 bmt3 bmt2 bmt1 #1) Rows(b1t4 b1t3 #1) Rows(b1t4 b1t3 b1t2 #1) Rows(b1t4 b1t3 b1t2 b1t1 #1) Rows(b2t4 b2t3 #1) Rows(b2t4 b2t3 b2t2 #1) Rows(b2t4 b2t3 b2t2 b2t1 #1) Rows(b3t4 b3t3 #1) Rows(b3t4 b3t3 b3t2 #1) Rows(b3t4 b3t3 b3t2 b3t1 #1) */ EXPLAIN WITH c1 (c1) AS ( SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) SELECT bmt1.c1, ( SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1 ) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 <> ( SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1 ); \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-2-4 \o results/ut-R.tmpout /*+ Leading(c1 bmt4 bmt3 bmt2 bmt1) Leading(b1t4 b1t3 b1t2 b1t1) MergeJoin(c1 bmt4) HashJoin(c1 bmt4 bmt3) NestLoop(c1 bmt4 bmt3 bmt2) MergeJoin(c1 bmt4 bmt3 bmt2 bmt1) MergeJoin(b1t4 b1t3) HashJoin(b1t4 b1t3 b1t2) NestLoop(b1t4 b1t3 b1t2 b1t1) */ EXPLAIN WITH c1 (c1) AS ( SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) SELECT bmt1.c1, ( SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1 ) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 <> ( SELECT b3t1.c1 FROM s1.t1 b3t1 ); \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(c1 bmt4 bmt3 bmt2 bmt1) Leading(b1t4 b1t3 b1t2 b1t1) MergeJoin(c1 bmt4) HashJoin(c1 bmt4 bmt3) NestLoop(c1 bmt4 bmt3 bmt2) MergeJoin(c1 bmt4 bmt3 bmt2 bmt1) MergeJoin(b1t4 b1t3) HashJoin(b1t4 b1t3 b1t2) NestLoop(b1t4 b1t3 b1t2 b1t1) Rows(c1 bmt4 #1) Rows(c1 bmt4 bmt3 #1) Rows(c1 bmt4 bmt3 bmt2 #1) Rows(c1 bmt4 bmt3 bmt2 bmt1 #1) Rows(b1t4 b1t3 #1) Rows(b1t4 b1t3 b1t2 #1) Rows(b1t4 b1t3 b1t2 b1t1 #1) */ EXPLAIN WITH c1 (c1) AS ( SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1 ) SELECT bmt1.c1, ( SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1 ) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1 AND bmt1.c1 <> ( SELECT b3t1.c1 FROM s1.t1 b3t1 ); \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-2-3 RULE or VIEW ---- -- No. R-2-3-1 \o results/ut-R.tmpout /*+ Leading(r1 t1 t2 t3 t4) */ EXPLAIN UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r1 t1 t2 t3 t4) Rows(r1 t1 t2 t3 t4 #2) Rows(r1 t1 t2 t3 #2) Rows(r1 t1 t2 #2) Rows(r1 t1 #2) */ EXPLAIN UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r1_ b1t1 b1t2 b1t3 b1t4) */ EXPLAIN UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r1_ b1t1 b1t2 b1t3 b1t4) Rows(r1_ b1t1 b1t2 b1t3 b1t4 #2) Rows(r1_ b1t1 b1t2 b1t3 #2) Rows(r1_ b1t1 b1t2 #2) Rows(r1_ b1t1 #2) */ EXPLAIN UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-3-2 \o results/ut-R.tmpout /*+ Leading(r2 t1 t2 t3 t4) */ EXPLAIN UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r2 t1 t2 t3 t4) Rows(r2 t1 t2 t3 t4 #2) Rows(r2 t1 t2 t3 #2) Rows(r2 t1 t2 #2) Rows(r2 t1 #2) */ EXPLAIN UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r2_ b1t1 b1t2 b1t3 b1t4) Leading(r2_ b2t1 b2t2 b2t3 b2t4) */ EXPLAIN UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r2_ b1t1 b1t2 b1t3 b1t4) Leading(r2_ b2t1 b2t2 b2t3 b2t4) Rows(r2_ b1t1 #2) Rows(r2_ b1t1 b1t2 #2) Rows(r2_ b1t1 b1t2 b1t3 #2) Rows(r2_ b1t1 b1t2 b1t3 b1t4 #2) Rows(r2_ b2t1 #2) Rows(r2_ b2t1 b2t2 #2) Rows(r2_ b2t1 b2t2 b2t3 #2) Rows(r2_ b2t1 b2t2 b2t3 b2t4 #2) */ EXPLAIN UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-3-3 \o results/ut-R.tmpout /*+ Leading(r3 t1 t2 t3 t4) */ EXPLAIN UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r3 t1 t2 t3 t4) Rows(r3 t1 t2 t3 t4 #2) Rows(r3 t1 t2 t3 #2) Rows(r3 t1 t2 #2) Rows(r3 t1 #2) */ EXPLAIN UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r3_ b1t1 b1t2 b1t3 b1t4) Leading(r3_ b2t1 b2t2 b2t3 b2t4) Leading(r3_ b3t1 b3t2 b3t3 b3t4) */ EXPLAIN UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(r3_ b1t1 b1t2 b1t3 b1t4) Leading(r3_ b2t1 b2t2 b2t3 b2t4) Leading(r3_ b3t1 b3t2 b3t3 b3t4) Rows(r3_ b1t1 #2) Rows(r3_ b1t1 b1t2 #2) Rows(r3_ b1t1 b1t2 b1t3 #2) Rows(r3_ b1t1 b1t2 b1t3 b1t4 #2) Rows(r3_ b2t1 #2) Rows(r3_ b2t1 b2t2 #2) Rows(r3_ b2t1 b2t2 b2t3 #2) Rows(r3_ b2t1 b2t2 b2t3 b2t4 #2) Rows(r3_ b3t1 #2) Rows(r3_ b3t1 b3t2 #2) Rows(r3_ b3t1 b3t2 b3t3 #2) Rows(r3_ b3t1 b3t2 b3t3 b3t4 #2) */ EXPLAIN UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-3-4 \o results/ut-R.tmpout /*+HashJoin(v1t1 v1t1)*/ EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)*/ EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-3-5 \o results/ut-R.tmpout /*+NestLoop(v1t1 v1t1_)*/ EXPLAIN SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+NestLoop(v1t1 v1t1_)Rows(v1t1 v1t1_ #1)*/ EXPLAIN SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-3-6 \o results/ut-R.tmpout /*+RowsHashJoin(r4t1 r4t1)*/ EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)*/ EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-3-7 \o results/ut-R.tmpout /*+NestLoop(r4t1 r5t1)*/ EXPLAIN SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+NestLoop(r4t1 r5t1)Rows(r4t1 r5t1 #1)*/ EXPLAIN SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-2-4 VALUES clause ---- -- No. R-2-4-1 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(t3 t1 t2) Rows(t3 t1 #2)Rows(t3 t1 t2 #2)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(*VALUES* t1 t2) Rows(*VALUES* t1 #2)Rows(*VALUES* t1 t2 #20)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-4-2 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(t4 t3 t2 t1) Rows(t4 t3 #2) Rows(t4 t3 t2 #2)Rows(t4 t3 t2 t1 #2)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-2-5 ---- -- No. R-2-5-1 \o results/ut-R.tmpout EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt4 bmt3 bmt2 bmt1) Rows(bmt1 bmt2 bmt3 bmt4 *0.7) */ EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-5-2 \o results/ut-R.tmpout EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt4 bmt3 bmt2 bmt1) Rows(bmt4 bmt3 *0.6) */ EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-2-5-3 \o results/ut-R.tmpout EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+ Leading(bmt4 bmt3 bmt2 bmt1) Rows(bmt4 bmt1 *0.5) */ EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-3-1 abusolute value ---- -- No. R-3-1-1 \o results/ut-R.tmpout /*+Rows(t1 t2 #0)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-1-2 \o results/ut-R.tmpout /*+Rows(t1 t2 #5)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-3-2 increase or decrease value ---- -- No. R-3-2-1 \o results/ut-R.tmpout /*+Rows(t1 t2 +1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-2-2 \o results/ut-R.tmpout /*+Rows(t1 t2 -1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-2-3 \o results/ut-R.tmpout /*+Rows(t1 t2 -1000)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-3-3 multiple ---- -- No. R-3-3-1 \o results/ut-R.tmpout /*+Rows(t1 t2 *0)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-3-2 \o results/ut-R.tmpout /*+Rows(t1 t2 *2)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-3-3 \o results/ut-R.tmpout /*+Rows(t1 t2 *0.1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-3-4 join inherit tables ---- -- No. R-3-4-1 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(p1 p2 #1)*/ EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-4-2 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(p1c1 p2c1 #1)*/ EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-3-5 conflict join method hint ---- -- No. R-3-5-1 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-5-2 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-5-3 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 #1)Rows(t2 t1 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout -- No. R-3-5-4 \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout ---- ---- No. R-3-6 hint state output ---- -- No. R-3-6-1 SET client_min_messages TO DEBUG1; \o results/ut-R.tmpout EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \o results/ut-R.tmpout /*+Rows(t1 t2 +1)*/ EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; \o \! sql/maskout.sh results/ut-R.tmpout \! rm results/ut-R.tmpout
the_stack
-- -- The MIT License (MIT) -- -- Copyright (C) 2013-2016 tarent solutions GmbH -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in all -- copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- SOFTWARE. -- -- -- TOC entry 174 (class 1259 OID 108930) -- Name: scim_address; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_address ( multi_value_id BIGINT NOT NULL AUTO_INCREMENT, is_primary BOOLEAN, country CHARACTER VARYING(255), formatted LONGTEXT, locality CHARACTER VARYING(255), postal_code CHARACTER VARYING(255), region CHARACTER VARYING(255), street_address CHARACTER VARYING(255), type CHARACTER VARYING(255), user_internal_id BIGINT NOT NULL, PRIMARY KEY (multi_value_id) ) ENGINE = InnoDB; -- -- TOC entry 175 (class 1259 OID 108938) -- Name: scim_certificate; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_certificate ( multi_value_id BIGINT NOT NULL AUTO_INCREMENT, is_primary BOOLEAN, value LONGTEXT, type CHARACTER VARYING(255), user_internal_id BIGINT NOT NULL, PRIMARY KEY (multi_value_id) ) ENGINE = InnoDB; -- -- TOC entry 176 (class 1259 OID 108946) -- Name: scim_email; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_email ( multi_value_id BIGINT NOT NULL AUTO_INCREMENT, is_primary BOOLEAN, value LONGTEXT, type CHARACTER VARYING(255), user_internal_id BIGINT NOT NULL, PRIMARY KEY (multi_value_id) ) ENGINE = InnoDB; -- -- TOC entry 177 (class 1259 OID 108954) -- Name: scim_entitlements; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_entitlements ( multi_value_id BIGINT NOT NULL AUTO_INCREMENT, is_primary BOOLEAN, value LONGTEXT, type CHARACTER VARYING(255), user_internal_id BIGINT NOT NULL, PRIMARY KEY (multi_value_id) ) ENGINE = InnoDB; -- -- TOC entry 178 (class 1259 OID 108962) -- Name: scim_extension; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_extension ( internal_id BIGINT NOT NULL AUTO_INCREMENT, urn LONGTEXT NOT NULL, PRIMARY KEY (internal_id) ) ENGINE = InnoDB; -- -- TOC entry 179 (class 1259 OID 108970) -- Name: scim_extension_field; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_extension_field ( internal_id BIGINT NOT NULL AUTO_INCREMENT, name CHARACTER VARYING(255), required BOOLEAN, type CHARACTER VARYING(255) NOT NULL, extension BIGINT, PRIMARY KEY (internal_id) ) ENGINE = InnoDB; -- -- TOC entry 180 (class 1259 OID 108978) -- Name: scim_extension_field_value; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_extension_field_value ( internal_id BIGINT NOT NULL AUTO_INCREMENT, value LONGTEXT NOT NULL, extension_field BIGINT NOT NULL, user_internal_id BIGINT NOT NULL, PRIMARY KEY (internal_id) ) ENGINE = InnoDB; -- -- TOC entry 181 (class 1259 OID 108986) -- Name: scim_group; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_group ( display_name CHARACTER VARYING(255) NOT NULL, internal_id BIGINT NOT NULL ) ENGINE = InnoDB; -- -- TOC entry 182 (class 1259 OID 108991) -- Name: scim_group_scim_id; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_group_members ( groups BIGINT NOT NULL, members BIGINT NOT NULL ) ENGINE = InnoDB; -- -- TOC entry 183 (class 1259 OID 108996) -- Name: scim_id; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_id ( internal_id BIGINT NOT NULL AUTO_INCREMENT, external_id CHARACTER VARYING(255), id CHARACTER VARYING(255) NOT NULL, meta BIGINT, PRIMARY KEY (internal_id) ) ENGINE = InnoDB; -- -- TOC entry 184 (class 1259 OID 109004) -- Name: scim_im; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_im ( multi_value_id BIGINT NOT NULL AUTO_INCREMENT, is_primary BOOLEAN, value LONGTEXT, type CHARACTER VARYING(255), user_internal_id BIGINT NOT NULL, PRIMARY KEY (multi_value_id) ) ENGINE = InnoDB; -- -- TOC entry 185 (class 1259 OID 109012) -- Name: scim_meta; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_meta ( id BIGINT NOT NULL AUTO_INCREMENT, created TIMESTAMP NULL, last_modified TIMESTAMP NULL, location LONGTEXT, resource_type CHARACTER VARYING(255), version CHARACTER VARYING(255), PRIMARY KEY (id) ) ENGINE = InnoDB; -- -- TOC entry 186 (class 1259 OID 109020) -- Name: scim_name; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_name ( id BIGINT NOT NULL AUTO_INCREMENT, family_name CHARACTER VARYING(255), formatted LONGTEXT, given_name CHARACTER VARYING(255), honorific_prefix CHARACTER VARYING(255), honorific_suffix CHARACTER VARYING(255), middle_name CHARACTER VARYING(255), PRIMARY KEY (id) ) ENGINE = InnoDB; -- -- TOC entry 187 (class 1259 OID 109028) -- Name: scim_phonenumber; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_phonenumber ( multi_value_id BIGINT NOT NULL AUTO_INCREMENT, is_primary BOOLEAN, value LONGTEXT, type CHARACTER VARYING(255), user_internal_id BIGINT NOT NULL, PRIMARY KEY (multi_value_id) ) ENGINE = InnoDB; -- -- TOC entry 188 (class 1259 OID 109036) -- Name: scim_photo; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_photo ( multi_value_id BIGINT NOT NULL AUTO_INCREMENT, is_primary BOOLEAN, value LONGTEXT, type CHARACTER VARYING(255), user_internal_id BIGINT NOT NULL, PRIMARY KEY (multi_value_id) ) ENGINE = InnoDB; -- -- TOC entry 189 (class 1259 OID 109044) -- Name: scim_roles; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_roles ( multi_value_id BIGINT NOT NULL AUTO_INCREMENT, is_primary BOOLEAN, value LONGTEXT, type CHARACTER VARYING(255), user_internal_id BIGINT NOT NULL, PRIMARY KEY (multi_value_id) ) ENGINE = InnoDB; -- -- TOC entry 190 (class 1259 OID 109052) -- Name: scim_user; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE scim_user ( active BOOLEAN, display_name CHARACTER VARYING(255), locale CHARACTER VARYING(255), nick_name CHARACTER VARYING(255), password CHARACTER VARYING(255) NOT NULL, preferred_language CHARACTER VARYING(255), profile_url LONGTEXT, timezone CHARACTER VARYING(255), title CHARACTER VARYING(255), user_name CHARACTER VARYING(255) NOT NULL, user_type CHARACTER VARYING(255), internal_id BIGINT NOT NULL, name BIGINT ) ENGINE = InnoDB; -- -- TOC entry 2234 (class 2606 OID 108990) -- Name: scim_group_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_group ADD CONSTRAINT scim_group_pkey PRIMARY KEY (internal_id); -- -- TOC entry 2238 (class 2606 OID 108995) -- Name: scim_group_scim_id_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_group_members ADD CONSTRAINT scim_group_scim_id_pkey PRIMARY KEY (groups, members); -- -- TOC entry 2272 (class 2606 OID 109059) -- Name: scim_user_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_user ADD CONSTRAINT scim_user_pkey PRIMARY KEY (internal_id); -- -- TOC entry 2242 (class 2606 OID 109079) -- Name: uk_164dcfif0r82xubvindi9vrnc; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_id ADD CONSTRAINT uk_164dcfif0r82xubvindi9vrnc UNIQUE (external_id); -- -- TOC entry 2236 (class 2606 OID 109077) -- Name: uk_1dt64mbf4gp83rwy18jofwwf; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_group ADD CONSTRAINT uk_1dt64mbf4gp83rwy18jofwwf UNIQUE (display_name); -- -- TOC entry 2274 (class 2606 OID 109097) -- Name: uk_1onynolltgwuk8a5ngjhkqcl1; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_user ADD CONSTRAINT uk_1onynolltgwuk8a5ngjhkqcl1 UNIQUE (user_name); -- -- TOC entry 2225 (class 2606 OID 109072) -- Name: uk_60sysrrwavtwwnji8nw5tng2x; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_extension ADD CONSTRAINT uk_60sysrrwavtwwnji8nw5tng2x UNIQUE (urn(255)); -- -- TOC entry 2229 (class 2606 OID 109074) -- Name: uk_9rvm7w04q503y4gx9q0c55cnv; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_extension_field ADD CONSTRAINT uk_9rvm7w04q503y4gx9q0c55cnv UNIQUE (extension, name); -- -- TOC entry 2244 (class 2606 OID 109081) -- Name: uk_q4ya5m8v6tafgtvw1inqtmm42; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_id ADD CONSTRAINT uk_q4ya5m8v6tafgtvw1inqtmm42 UNIQUE (id); -- -- TOC entry 2252 (class 1259 OID 109086) -- Name: uk_1b0o2foyw6nainc2vrssxkok0; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_1b0o2foyw6nainc2vrssxkok0 USING BTREE ON scim_meta (last_modified); -- -- TOC entry 2263 (class 1259 OID 109091) -- Name: uk_1er38kw2ith4ewuf7b5rhh7br; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_1er38kw2ith4ewuf7b5rhh7br USING BTREE ON scim_photo (type); -- -- TOC entry 2253 (class 1259 OID 109085) -- Name: uk_1o8kevc2e2hfk24f19j3vcia4; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_1o8kevc2e2hfk24f19j3vcia4 USING BTREE ON scim_meta (created); -- -- TOC entry 2247 (class 1259 OID 109082) -- Name: uk_31njuvoulynkorup0b5pjqni6; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_31njuvoulynkorup0b5pjqni6 USING BTREE ON scim_im (value(767)); -- -- TOC entry 2205 (class 1259 OID 109061) -- Name: uk_3hqwl74jwjq0dksv2t4iqlptm; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_3hqwl74jwjq0dksv2t4iqlptm USING BTREE ON scim_address (country(200), region(200), locality(200), postal_code(200), street_address(200)); -- -- TOC entry 2264 (class 1259 OID 109090) -- Name: uk_6y89p0fpcdcg2fq9k5u8h1173; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_6y89p0fpcdcg2fq9k5u8h1173 USING BTREE ON scim_photo (value(767)); -- -- TOC entry 2219 (class 1259 OID 109069) -- Name: uk_75wo1phhovp2nbruh2dmfhcwk; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_75wo1phhovp2nbruh2dmfhcwk USING BTREE ON scim_entitlements (type); -- -- TOC entry 2209 (class 1259 OID 109063) -- Name: uk_7k7tc0du5jucy4ranqn8uid4b; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_7k7tc0du5jucy4ranqn8uid4b USING BTREE ON scim_certificate (type); -- -- TOC entry 2248 (class 1259 OID 109083) -- Name: uk_88yyj57g5nisgp2trhs2yqa91; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_88yyj57g5nisgp2trhs2yqa91 USING BTREE ON scim_im (type); -- -- TOC entry 2268 (class 1259 OID 109094) -- Name: uk_8qwt29ewjm8urpi7vk10q2fb3; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_8qwt29ewjm8urpi7vk10q2fb3 USING BTREE ON scim_roles (type); -- -- TOC entry 2214 (class 1259 OID 109065) -- Name: uk_8snvn02x0for0fvcj8erir2k0; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_8snvn02x0for0fvcj8erir2k0 USING BTREE ON scim_email (value(767)); -- -- TOC entry 2258 (class 1259 OID 109087) -- Name: uk_abrc9lbp52g1b16x0dwtd5nld; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_abrc9lbp52g1b16x0dwtd5nld USING BTREE ON scim_phonenumber (value(767)); -- -- TOC entry 2249 (class 1259 OID 109084) -- Name: uk_da192a97ita9ygqdlmabnf4bw; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_da192a97ita9ygqdlmabnf4bw USING BTREE ON scim_im (value(767), type); -- -- TOC entry 2259 (class 1259 OID 109088) -- Name: uk_e7hqv692l3lm558s16p1l5acm; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_e7hqv692l3lm558s16p1l5acm USING BTREE ON scim_phonenumber (type); -- -- TOC entry 2210 (class 1259 OID 109064) -- Name: uk_eplkwvpox52tjppj9oogkf6f2; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_eplkwvpox52tjppj9oogkf6f2 USING BTREE ON scim_certificate (value(767), type); -- -- TOC entry 2215 (class 1259 OID 109066) -- Name: uk_hvpieto01a5c7b5edr1v9pom4; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_hvpieto01a5c7b5edr1v9pom4 USING BTREE ON scim_email (type); -- -- TOC entry 2220 (class 1259 OID 109070) -- Name: uk_i0njmun17yqq9eslmg7dqehrf; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_i0njmun17yqq9eslmg7dqehrf USING BTREE ON scim_entitlements (value(767), type); -- -- TOC entry 2269 (class 1259 OID 109095) -- Name: uk_i7n6iwn2x3stgn9q515xn46gi; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_i7n6iwn2x3stgn9q515xn46gi USING BTREE ON scim_roles (value(767), type); -- -- TOC entry 2265 (class 1259 OID 109092) -- Name: uk_iculqbamgtumwnjyjxseafy5h; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_iculqbamgtumwnjyjxseafy5h USING BTREE ON scim_photo (value(767), type); -- -- TOC entry 2206 (class 1259 OID 109060) -- Name: uk_ie5406dj1t9i0f9hytgvbxjl2; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_ie5406dj1t9i0f9hytgvbxjl2 USING BTREE ON scim_address (type); -- -- TOC entry 2260 (class 1259 OID 109089) -- Name: uk_ipfxts8e4ofm3oo5djk40pv86; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_ipfxts8e4ofm3oo5djk40pv86 USING BTREE ON scim_phonenumber (value(767), type); -- -- TOC entry 2216 (class 1259 OID 109067) -- Name: uk_j86m6mxppkb3g2vx72a11xob1; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_j86m6mxppkb3g2vx72a11xob1 USING BTREE ON scim_email (value(767), type); -- -- TOC entry 2270 (class 1259 OID 109093) -- Name: uk_mw914wc9rj4qsue2q60n4ktk4; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_mw914wc9rj4qsue2q60n4ktk4 USING BTREE ON scim_roles (value(767)); -- -- TOC entry 2221 (class 1259 OID 109068) -- Name: uk_nxxhl5vhce96gwm0se9spjjjv; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_nxxhl5vhce96gwm0se9spjjjv USING BTREE ON scim_entitlements (value(767)); -- -- TOC entry 2232 (class 1259 OID 109075) -- Name: uk_p2y10qxtuqdvbl5spxu98akx2; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_p2y10qxtuqdvbl5spxu98akx2 USING BTREE ON scim_extension_field_value (user_internal_id, extension_field); -- -- TOC entry 2211 (class 1259 OID 109062) -- Name: uk_tb6nu6msjqh1qb2ne5e4ghnp0; Type: INDEX; Schema: public; Owner: - -- CREATE INDEX uk_tb6nu6msjqh1qb2ne5e4ghnp0 USING BTREE ON scim_certificate (value(767)); -- -- TOC entry 2282 (class 2606 OID 109123) -- Name: fk_6y0v7g2y69nkvody9jv5q3tuo; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_extension_field_value ADD CONSTRAINT fk_6y0v7g2y69nkvody9jv5q3tuo FOREIGN KEY (extension_field) REFERENCES scim_extension_field (internal_id); -- -- TOC entry 2280 (class 2606 OID 109113) -- Name: fk_7jnl5vqcfg1j9plj4py1qvxcp; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_entitlements ADD CONSTRAINT fk_7jnl5vqcfg1j9plj4py1qvxcp FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 2285 (class 2606 OID 109138) -- Name: fk_b29y2qc2j5uu49wa9grpbulb0; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_group_members ADD CONSTRAINT fk_b29y2qc2j5uu49wa9grpbulb0 FOREIGN KEY (members) REFERENCES scim_id (internal_id); -- -- TOC entry 2287 (class 2606 OID 109148) -- Name: fk_byxttqfbmb2wcj4ud3hd53mw3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_id ADD CONSTRAINT fk_byxttqfbmb2wcj4ud3hd53mw3 FOREIGN KEY (meta) REFERENCES scim_meta (id); -- -- TOC entry 2292 (class 2606 OID 109173) -- Name: fk_d2ji7ipe62fbg8uu2ir7b9ls4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_user ADD CONSTRAINT fk_d2ji7ipe62fbg8uu2ir7b9ls4 FOREIGN KEY (name) REFERENCES scim_name (id); -- -- TOC entry 2279 (class 2606 OID 109108) -- Name: fk_dmfj3s46npn4p1pcrc3iur2mp; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_email ADD CONSTRAINT fk_dmfj3s46npn4p1pcrc3iur2mp FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 2281 (class 2606 OID 109118) -- Name: fk_eksek96tmtxkaqe5a7hfmoswo; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_extension_field ADD CONSTRAINT fk_eksek96tmtxkaqe5a7hfmoswo FOREIGN KEY (extension) REFERENCES scim_extension (internal_id); -- -- TOC entry 2286 (class 2606 OID 109143) -- Name: fk_gct22972jrrv22crorixfdlmi; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_group_members ADD CONSTRAINT fk_gct22972jrrv22crorixfdlmi FOREIGN KEY (groups) REFERENCES scim_group (internal_id); -- -- TOC entry 2278 (class 2606 OID 109103) -- Name: fk_ghdpgmh1b8suimtfxdl8653bj; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_certificate ADD CONSTRAINT fk_ghdpgmh1b8suimtfxdl8653bj FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 2288 (class 2606 OID 109153) -- Name: fk_hmsah9dinhk7f8k4lf50h658; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_im ADD CONSTRAINT fk_hmsah9dinhk7f8k4lf50h658 FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 2283 (class 2606 OID 109128) -- Name: fk_in6gs4safpkntvac3v88ke54r; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_extension_field_value ADD CONSTRAINT fk_in6gs4safpkntvac3v88ke54r FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 2291 (class 2606 OID 109168) -- Name: fk_n5und6lnrtblhgs2ococpglyi; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_roles ADD CONSTRAINT fk_n5und6lnrtblhgs2ococpglyi FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 2293 (class 2606 OID 109178) -- Name: fk_nx0839hyqd5yrfelxkr2fpr7a; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_user ADD CONSTRAINT fk_nx0839hyqd5yrfelxkr2fpr7a FOREIGN KEY (internal_id) REFERENCES scim_id (internal_id); -- -- TOC entry 2284 (class 2606 OID 109133) -- Name: fk_oari88x9o5j9jmigtt5s20m4k; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_group ADD CONSTRAINT fk_oari88x9o5j9jmigtt5s20m4k FOREIGN KEY (internal_id) REFERENCES scim_id (internal_id); -- -- TOC entry 2290 (class 2606 OID 109163) -- Name: fk_q3rk61yla08pvod7gq8av7i0l; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_photo ADD CONSTRAINT fk_q3rk61yla08pvod7gq8av7i0l FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 2277 (class 2606 OID 109098) -- Name: fk_qr6gtqi0h9r6yp034tarlry1k; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_address ADD CONSTRAINT fk_qr6gtqi0h9r6yp034tarlry1k FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 2289 (class 2606 OID 109158) -- Name: fk_rpqvdf1p9twdigaq1wclu5wm8; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE scim_phonenumber ADD CONSTRAINT fk_rpqvdf1p9twdigaq1wclu5wm8 FOREIGN KEY (user_internal_id) REFERENCES scim_user (internal_id); -- -- TOC entry 162 (class 1259 OID 34625) -- Dependencies: 5 -- Name: osiam_client; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE osiam_client ( internal_id bigint NOT NULL AUTO_INCREMENT, access_token_validity_seconds integer NOT NULL, client_secret character varying(255) NOT NULL, id character varying(32) NOT NULL, implicit_approval boolean NOT NULL, redirect_uri longtext NOT NULL, refresh_token_validity_seconds integer NOT NULL, validity_in_seconds bigint NOT NULL, primary key (internal_id) ) ENGINE=InnoDB; ALTER TABLE osiam_client AUTO_INCREMENT = 100; -- TOC entry 163 (class 1259 OID 34633) -- Dependencies: 5 -- Name: osiam_client_grants; Type: TABLE; Schema: public; Owner: - CREATE TABLE osiam_client_grants ( id bigint NOT NULL, grants character varying(255) ) ENGINE=InnoDB; -- -- TOC entry 164 (class 1259 OID 34636) -- Dependencies: 5 -- Name: osiam_client_scopes; Type: TABLE; Schema: public; Owner: - -- CREATE TABLE osiam_client_scopes ( id bigint NOT NULL, scope character varying(255) ) ENGINE=InnoDB; -- TOC entry 1908 (class 2606 OID 34788) -- Dependencies: 162 162 2111 -- Name: uk_c34iilt4h1ln91s9ro8m96hru; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE osiam_client ADD CONSTRAINT uk_c34iilt4h1ln91s9ro8m96hru UNIQUE (id); -- -- TOC entry 1989 (class 2606 OID 34829) -- Dependencies: 163 162 1905 2111 -- Name: fk_ctvkl0udnj6jpn1p93vbwywte; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE osiam_client_grants ADD CONSTRAINT fk_ctvkl0udnj6jpn1p93vbwywte FOREIGN KEY (id) REFERENCES osiam_client(internal_id); -- -- TOC entry 1990 (class 2606 OID 34834) -- Dependencies: 162 1905 164 2111 -- Name: fk_gl93uw092wua8dl5cpb5ysn3f; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE osiam_client_scopes ADD CONSTRAINT fk_gl93uw092wua8dl5cpb5ysn3f FOREIGN KEY (id) REFERENCES osiam_client(internal_id);
the_stack
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET search_path = public, pg_catalog; ALTER TABLE IF EXISTS ONLY public.deputy_mayoral_party DROP CONSTRAINT IF EXISTS deputy_mayoral_party_pkey; DROP TABLE IF EXISTS public.deputy_mayoral_party; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: deputy_mayoral_party; Type: TABLE; Schema: public; Tablespace: -- CREATE TABLE deputy_mayoral_party ( geo_level character varying(15) NOT NULL, geo_code character varying(10) NOT NULL, "deputy mayoral party" character varying(128) NOT NULL, total integer NOT NULL ); -- -- Data for Name: deputy_mayoral_party; Type: TABLE DATA; Schema: public -- COPY deputy_mayoral_party (geo_level, geo_code, "deputy mayoral party", total) FROM stdin WITH DELIMITER ','; country,NP,CPN-UML,329 country,NP,Maoist Kendra,109 country,NP,Nepali Congress,225 country,NP,Others,82 country,NP,Rastriya Prajatantra Party,6 district,68,CPN-UML,2 district,68,Nepali Congress,6 district,68,Maoist Kendra,2 district,68,Rastriya Prajatantra Party,0 district,68,Others,0 district,46,CPN-UML,2 district,46,Nepali Congress,2 district,46,Maoist Kendra,2 district,46,Rastriya Prajatantra Party,0 district,46,Others,0 district,51,CPN-UML,2 district,51,Nepali Congress,4 district,51,Maoist Kendra,1 district,51,Rastriya Prajatantra Party,1 district,51,Others,2 district,73,CPN-UML,5 district,73,Nepali Congress,4 district,73,Maoist Kendra,1 district,73,Rastriya Prajatantra Party,0 district,73,Others,0 district,69,CPN-UML,9 district,69,Nepali Congress,3 district,69,Maoist Kendra,0 district,69,Rastriya Prajatantra Party,0 district,69,Others,0 district,67,CPN-UML,4 district,67,Nepali Congress,5 district,67,Maoist Kendra,0 district,67,Rastriya Prajatantra Party,0 district,67,Others,0 district,65,CPN-UML,3 district,65,Nepali Congress,4 district,65,Maoist Kendra,0 district,65,Rastriya Prajatantra Party,0 district,65,Others,1 district,32,CPN-UML,3 district,32,Nepali Congress,3 district,32,Maoist Kendra,0 district,32,Rastriya Prajatantra Party,0 district,32,Others,9 district,66,CPN-UML,2 district,66,Nepali Congress,2 district,66,Maoist Kendra,4 district,66,Rastriya Prajatantra Party,0 district,66,Others,0 district,25,CPN-UML,2 district,25,Nepali Congress,1 district,25,Maoist Kendra,0 district,25,Rastriya Prajatantra Party,0 district,25,Others,1 district,06,CPN-UML,5 district,06,Nepali Congress,1 district,06,Maoist Kendra,3 district,06,Rastriya Prajatantra Party,0 district,06,Others,0 district,35,CPN-UML,5 district,35,Nepali Congress,2 district,35,Maoist Kendra,0 district,35,Rastriya Prajatantra Party,0 district,35,Others,0 district,74,CPN-UML,1 district,74,Nepali Congress,5 district,74,Maoist Kendra,1 district,74,Rastriya Prajatantra Party,0 district,74,Others,0 district,63,CPN-UML,7 district,63,Nepali Congress,4 district,63,Maoist Kendra,0 district,63,Rastriya Prajatantra Party,0 district,63,Others,0 district,60,CPN-UML,4 district,60,Nepali Congress,5 district,60,Maoist Kendra,1 district,60,Rastriya Prajatantra Party,0 district,60,Others,0 district,72,CPN-UML,4 district,72,Nepali Congress,4 district,72,Maoist Kendra,1 district,72,Rastriya Prajatantra Party,0 district,72,Others,0 district,30,CPN-UML,7 district,30,Nepali Congress,3 district,30,Maoist Kendra,2 district,30,Rastriya Prajatantra Party,1 district,30,Others,0 district,07,CPN-UML,7 district,07,Nepali Congress,0 district,07,Maoist Kendra,0 district,07,Rastriya Prajatantra Party,0 district,07,Others,0 district,20,CPN-UML,4 district,20,Nepali Congress,7 district,20,Maoist Kendra,4 district,20,Rastriya Prajatantra Party,0 district,20,Others,3 district,17,CPN-UML,7 district,17,Nepali Congress,0 district,17,Maoist Kendra,2 district,17,Rastriya Prajatantra Party,0 district,17,Others,0 district,52,CPN-UML,3 district,52,Nepali Congress,0 district,52,Maoist Kendra,1 district,52,Rastriya Prajatantra Party,2 district,52,Others,2 district,70,CPN-UML,6 district,70,Nepali Congress,3 district,70,Maoist Kendra,0 district,70,Rastriya Prajatantra Party,0 district,70,Others,0 district,36,CPN-UML,0 district,36,Nepali Congress,7 district,36,Maoist Kendra,4 district,36,Rastriya Prajatantra Party,0 district,36,Others,0 district,45,CPN-UML,10 district,45,Nepali Congress,2 district,45,Maoist Kendra,0 district,45,Rastriya Prajatantra Party,0 district,45,Others,0 district,56,CPN-UML,3 district,56,Nepali Congress,1 district,56,Maoist Kendra,1 district,56,Rastriya Prajatantra Party,0 district,56,Others,2 district,03,CPN-UML,9 district,03,Nepali Congress,1 district,03,Maoist Kendra,0 district,03,Rastriya Prajatantra Party,0 district,03,Others,0 district,62,CPN-UML,3 district,62,Nepali Congress,1 district,62,Maoist Kendra,3 district,62,Rastriya Prajatantra Party,0 district,62,Others,0 district,04,CPN-UML,12 district,04,Nepali Congress,2 district,04,Maoist Kendra,0 district,04,Rastriya Prajatantra Party,1 district,04,Others,0 district,54,CPN-UML,1 district,54,Nepali Congress,2 district,54,Maoist Kendra,5 district,54,Rastriya Prajatantra Party,0 district,54,Others,0 district,71,CPN-UML,6 district,71,Nepali Congress,3 district,71,Maoist Kendra,3 district,71,Rastriya Prajatantra Party,0 district,71,Others,1 district,55,CPN-UML,3 district,55,Nepali Congress,0 district,55,Maoist Kendra,6 district,55,Rastriya Prajatantra Party,0 district,55,Others,0 district,75,CPN-UML,7 district,75,Nepali Congress,1 district,75,Maoist Kendra,1 district,75,Rastriya Prajatantra Party,0 district,75,Others,0 district,47,CPN-UML,3 district,47,Nepali Congress,5 district,47,Maoist Kendra,1 district,47,Rastriya Prajatantra Party,0 district,47,Others,1 district,40,CPN-UML,5 district,40,Nepali Congress,0 district,40,Maoist Kendra,0 district,40,Rastriya Prajatantra Party,0 district,40,Others,0 district,27,CPN-UML,8 district,27,Nepali Congress,3 district,27,Maoist Kendra,0 district,27,Rastriya Prajatantra Party,0 district,27,Others,0 district,24,CPN-UML,7 district,24,Nepali Congress,4 district,24,Maoist Kendra,2 district,24,Rastriya Prajatantra Party,0 district,24,Others,0 district,13,CPN-UML,7 district,13,Nepali Congress,3 district,13,Maoist Kendra,0 district,13,Rastriya Prajatantra Party,0 district,13,Others,0 district,26,CPN-UML,2 district,26,Nepali Congress,3 district,26,Maoist Kendra,1 district,26,Rastriya Prajatantra Party,0 district,26,Others,0 district,37,CPN-UML,4 district,37,Nepali Congress,3 district,37,Maoist Kendra,1 district,37,Rastriya Prajatantra Party,0 district,37,Others,0 district,21,CPN-UML,0 district,21,Nepali Congress,1 district,21,Maoist Kendra,4 district,21,Rastriya Prajatantra Party,0 district,21,Others,10 district,34,CPN-UML,8 district,34,Nepali Congress,2 district,34,Maoist Kendra,0 district,34,Rastriya Prajatantra Party,0 district,34,Others,0 district,39,CPN-UML,1 district,39,Nepali Congress,2 district,39,Maoist Kendra,0 district,39,Rastriya Prajatantra Party,0 district,39,Others,1 district,09,CPN-UML,9 district,09,Nepali Congress,4 district,09,Maoist Kendra,1 district,09,Rastriya Prajatantra Party,0 district,09,Others,3 district,53,CPN-UML,4 district,53,Nepali Congress,0 district,53,Maoist Kendra,0 district,53,Rastriya Prajatantra Party,0 district,53,Others,0 district,48,CPN-UML,3 district,48,Nepali Congress,2 district,48,Maoist Kendra,0 district,48,Rastriya Prajatantra Party,0 district,48,Others,0 district,49,CPN-UML,3 district,49,Nepali Congress,2 district,49,Maoist Kendra,0 district,49,Rastriya Prajatantra Party,0 district,49,Others,0 district,42,CPN-UML,6 district,42,Nepali Congress,9 district,42,Maoist Kendra,0 district,42,Rastriya Prajatantra Party,0 district,42,Others,0 district,29,CPN-UML,3 district,29,Nepali Congress,7 district,29,Maoist Kendra,2 district,29,Rastriya Prajatantra Party,0 district,29,Others,0 district,12,CPN-UML,3 district,12,Nepali Congress,5 district,12,Maoist Kendra,0 district,12,Rastriya Prajatantra Party,0 district,12,Others,0 district,43,CPN-UML,6 district,43,Nepali Congress,3 district,43,Maoist Kendra,1 district,43,Rastriya Prajatantra Party,0 district,43,Others,0 district,02,CPN-UML,5 district,02,Nepali Congress,3 district,02,Maoist Kendra,0 district,02,Rastriya Prajatantra Party,0 district,02,Others,0 district,50,CPN-UML,4 district,50,Nepali Congress,3 district,50,Maoist Kendra,0 district,50,Rastriya Prajatantra Party,0 district,50,Others,0 district,33,CPN-UML,1 district,33,Nepali Congress,5 district,33,Maoist Kendra,2 district,33,Rastriya Prajatantra Party,0 district,33,Others,6 district,59,CPN-UML,3 district,59,Nepali Congress,3 district,59,Maoist Kendra,1 district,59,Rastriya Prajatantra Party,0 district,59,Others,2 district,18,CPN-UML,4 district,18,Nepali Congress,2 district,18,Maoist Kendra,2 district,18,Rastriya Prajatantra Party,0 district,18,Others,0 district,28,CPN-UML,5 district,28,Nepali Congress,0 district,28,Maoist Kendra,0 district,28,Rastriya Prajatantra Party,0 district,28,Others,0 district,31,CPN-UML,1 district,31,Nepali Congress,6 district,31,Maoist Kendra,5 district,31,Rastriya Prajatantra Party,0 district,31,Others,6 district,58,CPN-UML,2 district,58,Nepali Congress,1 district,58,Maoist Kendra,7 district,58,Rastriya Prajatantra Party,0 district,58,Others,0 district,57,CPN-UML,0 district,57,Nepali Congress,0 district,57,Maoist Kendra,9 district,57,Rastriya Prajatantra Party,0 district,57,Others,0 district,44,CPN-UML,8 district,44,Nepali Congress,1 district,44,Maoist Kendra,1 district,44,Rastriya Prajatantra Party,1 district,44,Others,5 district,61,CPN-UML,3 district,61,Nepali Congress,3 district,61,Maoist Kendra,4 district,61,Rastriya Prajatantra Party,0 district,61,Others,0 district,05,CPN-UML,6 district,05,Nepali Congress,4 district,05,Maoist Kendra,0 district,05,Rastriya Prajatantra Party,0 district,05,Others,0 district,15,CPN-UML,1 district,15,Nepali Congress,7 district,15,Maoist Kendra,0 district,15,Rastriya Prajatantra Party,0 district,15,Others,10 district,22,CPN-UML,4 district,22,Nepali Congress,4 district,22,Maoist Kendra,3 district,22,Rastriya Prajatantra Party,0 district,22,Others,9 district,19,CPN-UML,4 district,19,Nepali Congress,2 district,19,Maoist Kendra,3 district,19,Rastriya Prajatantra Party,0 district,19,Others,0 district,23,CPN-UML,7 district,23,Nepali Congress,3 district,23,Maoist Kendra,2 district,23,Rastriya Prajatantra Party,0 district,23,Others,0 district,16,CPN-UML,5 district,16,Nepali Congress,2 district,16,Maoist Kendra,5 district,16,Rastriya Prajatantra Party,0 district,16,Others,5 district,11,CPN-UML,4 district,11,Nepali Congress,3 district,11,Maoist Kendra,1 district,11,Rastriya Prajatantra Party,0 district,11,Others,0 district,10,CPN-UML,4 district,10,Nepali Congress,5 district,10,Maoist Kendra,0 district,10,Rastriya Prajatantra Party,0 district,10,Others,3 district,64,CPN-UML,4 district,64,Nepali Congress,5 district,64,Maoist Kendra,0 district,64,Rastriya Prajatantra Party,0 district,64,Others,0 district,41,CPN-UML,8 district,41,Nepali Congress,3 district,41,Maoist Kendra,0 district,41,Rastriya Prajatantra Party,0 district,41,Others,0 district,38,CPN-UML,3 district,38,Nepali Congress,6 district,38,Maoist Kendra,1 district,38,Rastriya Prajatantra Party,0 district,38,Others,0 district,01,CPN-UML,5 district,01,Nepali Congress,2 district,01,Maoist Kendra,2 district,01,Rastriya Prajatantra Party,0 district,01,Others,0 district,08,CPN-UML,4 district,08,Nepali Congress,2 district,08,Maoist Kendra,0 district,08,Rastriya Prajatantra Party,0 district,08,Others,0 district,14,CPN-UML,4 district,14,Nepali Congress,4 district,14,Maoist Kendra,0 district,14,Rastriya Prajatantra Party,0 district,14,Others,0 \. -- -- Name: deputy_mayoral_party_pkey; Type: CONSTRAINT; Schema: public; Tablespace: -- ALTER TABLE ONLY deputy_mayoral_party ADD CONSTRAINT deputy_mayoral_party_pkey PRIMARY KEY (geo_level, geo_code, "deputy mayoral party"); -- -- PostgreSQL database dump complete --
the_stack
SET NOCOUNT ON; SET ANSI_NULLS ON; SET QUOTED_IDENTIFIER ON; DECLARE @ModuleConfig VARCHAR(20) = 'Default'; -- Append to the Default ModuleConfig or specify a new ModuleConfig i.e 'Catalogue' --Frequency ,Start and End times only apply if the @ModuleConfig does not exist as we do not want to update your existing schedules. DECLARE @ReportFrequencyMins SMALLINT = 1440; --Maximum supported value is 1440 (once a day) DECLARE @ReportStartTime TIME(0) = '09:00'; DECLARE @ReportEndTime TIME(0) = '18:00'; --Enable or Disable the module following installation DECLARE @EnableModule BIT = 1; DECLARE @Revisiondate DATETIME = '20201203'; DECLARE @InspectorBuild DECIMAL(4,2) = (SELECT TRY_CAST([Value] AS DECIMAL(4,2)) FROM [Inspector].[Settings] WHERE [Description] = 'InspectorBuild'); --Ensure that Blitz tables exist IF (SCHEMA_ID(N'Catalogue') IS NULL) BEGIN RAISERROR('Catalogue not detected in this database, please double check the database name is correct - the Catalogue must be installed in the same database as the Inspector',11,0); RETURN; END IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Inspector].[CatalogueDroppedDatabasesReport]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [Inspector].[CatalogueDroppedDatabasesReport] AS'; END EXEC dbo.sp_executesql N' ALTER PROCEDURE [Inspector].[CatalogueDroppedDatabasesReport] ( @Servername NVARCHAR(128), @Modulename VARCHAR(50), @TableHeaderColour VARCHAR(7) = ''#E6E6FA'', @WarningHighlight VARCHAR(7), @AdvisoryHighlight VARCHAR(7), @InfoHighlight VARCHAR(7), @ModuleConfig VARCHAR(20), @WarningLevel TINYINT, @ServerSpecific BIT, @NoClutter BIT, @TableTail VARCHAR(256), @HtmlOutput VARCHAR(MAX) OUTPUT, @CollectionOutOfDate BIT OUTPUT, @PSCollection BIT, @Debug BIT = 0 ) AS --Revision date: 03/01/2020 BEGIN DECLARE @HtmlTableHead VARCHAR(2000); DECLARE @LastestExecution DATETIME DECLARE @Frequency INT = (SELECT [Frequency] FROM [Inspector].[ModuleConfig] WHERE ModuleConfig_Desc = @ModuleConfig); SET @Debug = [Inspector].[GetDebugFlag](@Debug,@ModuleConfig,@Modulename); --Set columns names for the Html table SET @HtmlTableHead = (SELECT [Inspector].[GenerateHtmlTableheader] ( @Servername, @Modulename, @ServerSpecific, ''Databases dropped in the last ''+CAST(@Frequency AS VARCHAR(10))+'' mins'', @TableHeaderColour, ''Server name,Database name,AG name,File path,DaysSeenByCatalogue,LastSeenByCatalogue'' ) ); EXEC sp_executesql N''SELECT @LastestExecution = MAX(ExecutionDate) FROM [Catalogue].[ExecutionLog];'', N''@LastestExecution DATETIME OUTPUT'', @LastestExecution = @LastestExecution OUTPUT; EXEC sp_executesql N'' SET @HtmlOutput = ( SELECT CASE WHEN @WarningLevel = 1 THEN @WarningHighlight WHEN @WarningLevel = 2 THEN @AdvisoryHighlight WHEN @WarningLevel = 3 THEN @InfoHighlight END AS [@bgcolor], CatalogueDatabases.ServerName AS ''''td'''','''''''', + CatalogueDatabases.DBName AS ''''td'''','''''''', + ISNULL(AGName,N''''Not in an AG'''') AS ''''td'''','''''''', + CatalogueDatabases.FilePaths AS ''''td'''','''''''', + DATEDIFF(DAY,FirstRecorded,LastRecorded) AS ''''td'''','''''''', + CONVERT(VARCHAR(17),CatalogueDatabases.LastRecorded,113) AS ''''td'''','''''''' FROM [Catalogue].[Databases] CatalogueDatabases INNER JOIN [Inspector].[CurrentServers] InspectorServers ON CatalogueDatabases.ServerName = InspectorServers.Servername WHERE CatalogueDatabases.ServerName = @Servername AND [CatalogueDatabases].[LastRecorded] >= DATEADD(MINUTE,-@Frequency,GETDATE()) AND [CatalogueDatabases].[LastRecorded] < @LastestExecution FOR XML PATH(''''tr''''),ELEMENTS);'', N''@Servername NVARCHAR(128), @LastestExecution DATETIME, @Frequency INT, @WarningLevel TINYINT, @WarningHighlight VARCHAR(7), @AdvisoryHighlight VARCHAR(7), @InfoHighlight VARCHAR(7), @HtmlOutput VARCHAR(MAX) OUTPUT'', @Servername = @Servername, @LastestExecution = @LastestExecution, @Frequency = @Frequency, @WarningLevel = @WarningLevel, @WarningHighlight = @WarningHighlight, @AdvisoryHighlight = @AdvisoryHighlight, @InfoHighlight = @InfoHighlight, @HtmlOutput = @HtmlOutput OUTPUT; IF (@HtmlOutput IS NOT NULL) BEGIN SET @HtmlOutput = @HtmlTableHead + @HtmlOutput + @TableTail +''<p><BR><p>'' END IF (@Debug = 1) BEGIN SELECT OBJECT_NAME(@@PROCID) AS ''Procname'', @Servername AS ''@Servername'', @Modulename AS ''@Modulename'', @TableHeaderColour AS ''@TableHeaderColour'', @WarningHighlight AS ''@WarningHighlight'', @AdvisoryHighlight AS ''@AdvisoryHighlight'', @InfoHighlight AS ''@InfoHighlight'', @ModuleConfig AS ''@ModuleConfig'', @WarningLevel AS ''@WarningLevel'', @NoClutter AS ''@NoClutter'', @TableTail AS ''@TableTail'', @HtmlOutput AS ''@HtmlOutput'', @HtmlTableHead AS ''@HtmlTableHead'', @CollectionOutOfDate AS ''@CollectionOutOfDate'', @PSCollection AS ''@PSCollection'' END END'; IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Inspector].[CatalogueDroppedTablesReport]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [Inspector].[CatalogueDroppedTablesReport] AS'; END EXEC dbo.sp_executesql N' ALTER PROCEDURE [Inspector].[CatalogueDroppedTablesReport] ( @Servername NVARCHAR(128), @Modulename VARCHAR(50), @TableHeaderColour VARCHAR(7) = ''#E6E6FA'', @WarningHighlight VARCHAR(7), @AdvisoryHighlight VARCHAR(7), @InfoHighlight VARCHAR(7), @ModuleConfig VARCHAR(20), @WarningLevel TINYINT, @ServerSpecific BIT, @NoClutter BIT, @TableTail VARCHAR(256), @HtmlOutput VARCHAR(MAX) OUTPUT, @CollectionOutOfDate BIT OUTPUT, @PSCollection BIT, @Debug BIT = 0 ) AS --Revision date: 03/01/2020 BEGIN DECLARE @HtmlTableHead VARCHAR(2000); DECLARE @LastestExecution DATETIME DECLARE @Frequency INT = (SELECT [Frequency] FROM [Inspector].[ModuleConfig] WHERE ModuleConfig_Desc = @ModuleConfig); SET @Debug = [Inspector].[GetDebugFlag](@Debug,@ModuleConfig,@Modulename); --Set columns names for the Html table SET @HtmlTableHead = (SELECT [Inspector].[GenerateHtmlTableheader] ( @Servername, @Modulename, @ServerSpecific, ''Tables dropped in the last ''+CAST(@Frequency AS VARCHAR(10))+'' mins'', @TableHeaderColour, ''Server name,Database name,Schema name,Table name,LastSeenByCatalogue'' ) ); EXEC sp_executesql N''SELECT @LastestExecution = MAX(ExecutionDate) FROM [Catalogue].[ExecutionLog];'', N''@LastestExecution DATETIME OUTPUT'',@LastestExecution = @LastestExecution OUTPUT; EXEC sp_executesql N'' SET @HtmlOutput = ( SELECT CASE WHEN @WarningLevel = 1 THEN @WarningHighlight WHEN @WarningLevel = 2 THEN @AdvisoryHighlight WHEN @WarningLevel = 3 THEN @InfoHighlight END AS [@bgcolor], CatalogueTables.ServerName AS ''''td'''','''''''', + CatalogueTables.DatabaseName AS ''''td'''','''''''', + CatalogueTables.SchemaName AS ''''td'''','''''''', + CatalogueTables.TableName AS ''''td'''','''''''', + CONVERT(VARCHAR(17),CatalogueTables.LastRecorded,113) AS ''''td'''','''''''' FROM [Inspector].[CurrentServers] InspectorServers INNER JOIN [Catalogue].[Tables] CatalogueTables ON CatalogueTables.ServerName = InspectorServers.Servername WHERE CatalogueTables.ServerName = @Servername AND [CatalogueTables].[LastRecorded] >= DATEADD(MINUTE,-@Frequency,GETDATE()) AND [CatalogueTables].[LastRecorded] < @LastestExecution AND [DatabaseName] != ''''tempdb'''' AND NOT EXISTS (SELECT 1 FROM [Catalogue].[Databases] CatalogueDatabases WHERE CatalogueDatabases.ServerName = InspectorServers.Servername AND CatalogueDatabases.DBName= CatalogueTables.DatabaseName AND [CatalogueDatabases].[LastRecorded] < @LastestExecution) FOR XML PATH(''''tr''''),ELEMENTS);'', N''@Servername NVARCHAR(128), @LastestExecution DATETIME, @Frequency INT, @WarningLevel TINYINT, @WarningHighlight VARCHAR(7), @AdvisoryHighlight VARCHAR(7), @InfoHighlight VARCHAR(7), @HtmlOutput VARCHAR(MAX) OUTPUT'', @Servername = @Servername, @LastestExecution = @LastestExecution, @Frequency = @Frequency, @WarningLevel = @WarningLevel, @WarningHighlight = @WarningHighlight, @AdvisoryHighlight = @AdvisoryHighlight, @InfoHighlight = @InfoHighlight, @HtmlOutput = @HtmlOutput OUTPUT; IF (@HtmlOutput IS NOT NULL) BEGIN SET @HtmlOutput = @HtmlTableHead + @HtmlOutput + @TableTail +''<p><BR><p>'' END IF (@Debug = 1) BEGIN SELECT OBJECT_NAME(@@PROCID) AS ''Procname'', @Servername AS ''@Servername'', @Modulename AS ''@Modulename'', @TableHeaderColour AS ''@TableHeaderColour'', @WarningHighlight AS ''@WarningHighlight'', @AdvisoryHighlight AS ''@AdvisoryHighlight'', @InfoHighlight AS ''@InfoHighlight'', @ModuleConfig AS ''@ModuleConfig'', @WarningLevel AS ''@WarningLevel'', @NoClutter AS ''@NoClutter'', @TableTail AS ''@TableTail'', @HtmlOutput AS ''@HtmlOutput'', @HtmlTableHead AS ''@HtmlTableHead'', @CollectionOutOfDate AS ''@CollectionOutOfDate'', @PSCollection AS ''@PSCollection'' END END'; IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Inspector].[CatalogueMissingLoginsReport]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [Inspector].[CatalogueMissingLoginsReport] AS'; END EXEC dbo.sp_executesql N' ALTER PROCEDURE [Inspector].[CatalogueMissingLoginsReport] ( @Servername NVARCHAR(128), @Modulename VARCHAR(50), @TableHeaderColour VARCHAR(7) = ''#E6E6FA'', @WarningHighlight VARCHAR(7), @AdvisoryHighlight VARCHAR(7), @InfoHighlight VARCHAR(7), @ModuleConfig VARCHAR(20), @WarningLevel TINYINT, @ServerSpecific BIT, @NoClutter BIT, @TableTail VARCHAR(256), @HtmlOutput VARCHAR(MAX) OUTPUT, @CollectionOutOfDate BIT OUTPUT, @PSCollection BIT, @Debug BIT = 0 ) AS --Revision date: 03/01/2020 BEGIN SET NOCOUNT ON; DECLARE @HtmlTableHead VARCHAR(2000); DECLARE @LastestExecution DATETIME DECLARE @Frequency INT = (SELECT [Frequency] FROM [Inspector].[ModuleConfig] WHERE ModuleConfig_Desc = @ModuleConfig); SET @Debug = [Inspector].[GetDebugFlag](@Debug,@ModuleConfig,@Modulename); --Set columns names for the Html table SET @HtmlTableHead = (SELECT [Inspector].[GenerateHtmlTableheader] ( @Servername, @Modulename, @ServerSpecific, ''Missing logins in the last ''+CAST(@Frequency AS VARCHAR(10))+'' mins'', @TableHeaderColour, ''Server name,Login name,CreateCommand'' ) ); IF OBJECT_ID(''tempdb.dbo.#ServerLogins'') IS NOT NULL DROP TABLE #ServerLogins; CREATE TABLE #ServerLogins ( AGName NVARCHAR(128) COLLATE DATABASE_DEFAULT, LoginName NVARCHAR(128) COLLATE DATABASE_DEFAULT, ServerName NVARCHAR(128) COLLATE DATABASE_DEFAULT ); EXEC sp_executesql N''INSERT INTO #ServerLogins (AGName,LoginName,ServerName) SELECT DISTINCT AGs.AGName, Logins.LoginName, AGs2.ServerName FROM (SELECT DISTINCT AGName FROM Catalogue.AvailabilityGroups WHERE ServerName = @Servername) AGList INNER JOIN Catalogue.AvailabilityGroups AGs ON AGList.AGName = AGs.AGName INNER JOIN Catalogue.Logins Logins ON AGs.ServerName = Logins.ServerName INNER JOIN Catalogue.AvailabilityGroups AGs2 ON AGs.AGName = AGs2.AGName WHERE NOT EXISTS (SELECT 1 FROM Catalogue.AvailabilityGroups AGs3 JOIN Catalogue.Logins Logins3 ON AGs3.ServerName = Logins3.ServerName WHERE AGs3.AGName = AGs.AGName AND AGs3.ServerName = AGs2.ServerName AND Logins3.LoginName = Logins.LoginName) AND Logins.LoginName NOT IN (SELECT [LoginName] FROM [Inspector].[CatalogueSIDExclusions] WHERE [AGs].[AGName] = [CatalogueSIDExclusions].[AGName]) AND Logins.LoginName != ''''sa'''' AND AGs.LastRecorded >= DATEADD(MINUTE,-@Frequency,GETDATE()) AND Logins.LastRecorded >= DATEADD(MINUTE,-@Frequency,GETDATE()) AND AGs2.LastRecorded >= DATEADD(MINUTE,-@Frequency,GETDATE()) AND EXISTS (SELECT 1 FROM [Catalogue].[ExecutionLog] WHERE [ExecutionDate] >= DATEADD(MINUTE,-@Frequency,GETDATE())) SET @HtmlOutput = ( SELECT CASE WHEN @WarningLevel = 1 THEN @WarningHighlight WHEN @WarningLevel = 2 THEN @AdvisoryHighlight WHEN @WarningLevel = 3 THEN @InfoHighlight END AS [@bgcolor], ServerName AS ''''td'''','''''''', + LoginName AS ''''td'''','''''''', + CreateCommand AS ''''td'''','''''''' FROM ( SELECT DISTINCT #ServerLogins.ServerName, Logins.LoginName, CASE WHEN Logins.LoginName LIKE ''''%\%'''' THEN ''''CREATE LOGIN '''' + QUOTENAME(Logins.LoginName) + '''' FROM WINDOWS'''' ELSE ''''CREATE LOGIN '''' + QUOTENAME(Logins.LoginName) + '''' WITH PASSWORD = 0x'''' + CONVERT(VARCHAR(MAX), Logins.PasswordHash, 2) + '''' HASHED, SID = 0x'''' + CONVERT(VARCHAR(MAX), Logins.SID, 2) END AS CreateCommand FROM Catalogue.AvailabilityGroups AGs JOIN Catalogue.Logins Logins ON AGs.ServerName = Logins.ServerName JOIN #ServerLogins ON AGs.AGName = #ServerLogins.AGName AND Logins.LoginName = #ServerLogins.LoginName JOIN Catalogue.Users Users ON Users.MappedLoginName = #ServerLogins.LoginName JOIN Catalogue.Databases Databases ON Users.DBName = Databases.DBName AND AGs.AGName = Databases.AGName WHERE AGs.Role = ''''PRIMARY'''' AND #ServerLogins.ServerName = @Servername AND AGs.LastRecorded >= DATEADD(MINUTE,-@Frequency,GETDATE()) AND Logins.LastRecorded >= DATEADD(MINUTE,-@Frequency,GETDATE()) AND Users.LastRecorded >= DATEADD(MINUTE,-@Frequency,GETDATE()) AND Databases.LastRecorded >= DATEADD(MINUTE,-@Frequency,GETDATE()) ) AS MissingLoginInfo FOR XML PATH(''''tr''''),ELEMENTS);'', N''@Servername NVARCHAR(128), @LastestExecution DATETIME, @Frequency INT, @WarningLevel TINYINT, @WarningHighlight VARCHAR(7), @AdvisoryHighlight VARCHAR(7), @InfoHighlight VARCHAR(7), @HtmlOutput VARCHAR(MAX) OUTPUT'', @Servername = @Servername, @LastestExecution = @LastestExecution, @Frequency = @Frequency, @WarningLevel = @WarningLevel, @WarningHighlight = @WarningHighlight, @AdvisoryHighlight = @AdvisoryHighlight, @InfoHighlight = @InfoHighlight, @HtmlOutput = @HtmlOutput OUTPUT; IF (@HtmlOutput IS NOT NULL) BEGIN SET @HtmlOutput = @HtmlTableHead + @HtmlOutput + @TableTail +''<p><BR><p>'' END IF (@Debug = 1) BEGIN SELECT OBJECT_NAME(@@PROCID) AS ''Procname'', @Servername AS ''@Servername'', @Modulename AS ''@Modulename'', @TableHeaderColour AS ''@TableHeaderColour'', @WarningHighlight AS ''@WarningHighlight'', @AdvisoryHighlight AS ''@AdvisoryHighlight'', @InfoHighlight AS ''@InfoHighlight'', @ModuleConfig AS ''@ModuleConfig'', @WarningLevel AS ''@WarningLevel'', @NoClutter AS ''@NoClutter'', @TableTail AS ''@TableTail'', @HtmlOutput AS ''@HtmlOutput'', @HtmlTableHead AS ''@HtmlTableHead'', @CollectionOutOfDate AS ''@CollectionOutOfDate'', @PSCollection AS ''@PSCollection'' END END'; IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Inspector].[CatalogueAgentAuditReport]') AND type in (N'P', N'PC')) BEGIN EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [Inspector].[CatalogueAgentAuditReport] AS'; END EXEC dbo.sp_executesql @statement = N'ALTER PROCEDURE [Inspector].[CatalogueAgentAuditReport] ( @Servername NVARCHAR(128), @Modulename VARCHAR(50), @TableHeaderColour VARCHAR(7) = ''#E6E6FA'', @WarningHighlight VARCHAR(7), @AdvisoryHighlight VARCHAR(7), @InfoHighlight VARCHAR(7), @ModuleConfig VARCHAR(20), @WarningLevel TINYINT, @ServerSpecific BIT, @NoClutter BIT, @TableTail VARCHAR(256), @HtmlOutput VARCHAR(MAX) OUTPUT, @CollectionOutOfDate BIT OUTPUT, @PSCollection BIT, @Debug BIT = 0 ) AS BEGIN --Revision date: 06/01/2020 DECLARE @HtmlTableHead VARCHAR(2000); DECLARE @Frequency SMALLINT = (SELECT [Frequency] FROM [Inspector].[ModuleConfig] WHERE [ModuleConfig_Desc] = @ModuleConfig); SET @Debug = [Inspector].[GetDebugFlag](@Debug,@ModuleConfig,@Modulename); --Set columns names for the Html table SET @HtmlTableHead = (SELECT [Inspector].[GenerateHtmlTableheader] ( @Servername, @Modulename, @ServerSpecific, ''Agent jobs modified recently in the last ''+CAST(@Frequency AS VARCHAR(10))+'' mins'', @TableHeaderColour, ''JobChangeType,ServerName,JobID,JobName,Enabled,Description,Category,ScheduleEnabled,ScheduleName,ScheduleFrequency,StepID,StepName,SubSystem,DateModified,Command,DatabaseName'' ) ); SET @HtmlOutput =( SELECT CASE WHEN JobChangeType = ''Current'' THEN @TableHeaderColour WHEN @WarningLevel = 1 THEN @WarningHighlight WHEN @WarningLevel = 2 THEN @AdvisoryHighlight WHEN @WarningLevel = 3 THEN @InfoHighlight END AS [@Bgcolor], JobChangeType AS ''td'','''', + [ServerName] AS ''td'','''', + [JobID] AS ''td'','''', + [JobName] AS ''td'','''', + [Enabled] AS ''td'','''', + [Description] AS ''td'','''', + [Category] AS ''td'','''', + [ScheduleEnabled] AS ''td'','''', + [ScheduleName] AS ''td'','''', + [ScheduleFrequency] AS ''td'','''', + [StepID] AS ''td'','''', + [StepName] AS ''td'','''', + [SubSystem] AS ''td'','''', + [DateModified] AS ''td'','''', + [Command] AS ''td'','''', + [DatabaseName] AS ''td'','''' FROM ( SELECT ROW_NUMBER() OVER(PARTITION BY [ServerName],[JobID],[StepID] ORDER BY [ServerName],[JobID],[StepID]) AS rn ,''Current'' AS JobChangeType ,[ServerName] ,[JobID] ,[JobName] ,[Enabled] ,[Description] ,[Category] ,[ScheduleEnabled] ,[ScheduleName] ,[ScheduleFrequency] ,[StepID] ,[StepName] ,[SubSystem] ,[DateModified] ,[Command] ,[DatabaseName] FROM [Catalogue].[AgentJobs] Jobs WHERE [ServerName] = @Servername AND EXISTS (SELECT 1 FROM [Catalogue].[AgentJobs_Audit] WHERE Jobs.[JobID] = [AgentJobs_Audit].[JobID] AND Jobs.[ServerName] = [AgentJobs_Audit].[ServerName] AND Jobs.[StepID] = [AgentJobs_Audit].[StepID] AND AuditDate > DATEADD(MINUTE,-@Frequency,GETDATE())) UNION ALL SELECT ROW_NUMBER() OVER(PARTITION BY [ServerName],[JobID],[StepID] ORDER BY [ServerName],[JobID],[StepID],[AuditDate]) AS rn ,''Audit'' AS JobChangeType ,[ServerName] ,[JobID] ,[JobName] ,[Enabled] ,[Description] ,[Category] ,[ScheduleEnabled] ,[ScheduleName] ,[ScheduleFrequency] ,[StepID] ,[StepName] ,[SubSystem] ,[AuditDate] ,[Command] ,[DatabaseName] FROM [Catalogue].[AgentJobs_Audit] WHERE [ServerName] = @Servername AND AuditDate > DATEADD(MINUTE,-@Frequency,GETDATE()) ) AS JobDetails ORDER BY ServerName, JobName, CASE WHEN JobChangeType = ''Current'' THEN 0 ELSE rn END FOR XML PATH(''tr''),ELEMENTS); SET @HtmlOutput = @HtmlTableHead + @HtmlOutput + @TableTail +''<p><BR><p>'' IF (@Debug = 1) BEGIN SELECT OBJECT_NAME(@@PROCID) AS ''Procname'', @Servername AS ''@Servername'', @Modulename AS ''@Modulename'', @TableHeaderColour AS ''@TableHeaderColour'', @WarningHighlight AS ''@WarningHighlight'', @AdvisoryHighlight AS ''@AdvisoryHighlight'', @InfoHighlight AS ''@InfoHighlight'', @ModuleConfig AS ''@ModuleConfig'', @WarningLevel AS ''@WarningLevel'', @NoClutter AS ''@NoClutter'', @TableTail AS ''@TableTail'', @HtmlOutput AS ''@HtmlOutput'', @HtmlTableHead AS ''@HtmlTableHead'', @CollectionOutOfDate AS ''@CollectionOutOfDate'', @PSCollection AS ''@PSCollection'' END END ' IF NOT EXISTS(SELECT 1 FROM [Inspector].[ModuleConfig] WHERE [ModuleConfig_Desc] = @ModuleConfig) BEGIN INSERT INTO [Inspector].[ModuleConfig] ([ModuleConfig_Desc], [IsActive], [Frequency], [StartTime], [EndTime], [LastRunDateTime], [ReportWarningsOnly], [NoClutter], [ShowDisabledModules]) VALUES(@ModuleConfig, @EnableModule, @ReportFrequencyMins, @ReportStartTime, @ReportEndTime, NULL, 0, 0, 0); END IF NOT EXISTS(SELECT 1 FROM [Inspector].[Modules] WHERE [Modulename] = 'CatalogueDroppedDatabases' AND [ModuleConfig_Desc] = @ModuleConfig) BEGIN INSERT INTO [Inspector].[Modules] ([ModuleConfig_Desc], [Modulename], [CollectionProcedurename], [ReportProcedurename], [ReportOrder], [WarningLevel], [ServerSpecific], [Debug], [IsActive], [HeaderText], [Frequency], [StartTime], [EndTime]) VALUES(@ModuleConfig,'CatalogueDroppedDatabases',NULL,'CatalogueDroppedDatabasesReport',1,2,1,0,@EnableModule,NULL,@ReportFrequencyMins,@ReportStartTime,@ReportEndTime); END IF NOT EXISTS(SELECT 1 FROM [Inspector].[Modules] WHERE [Modulename] = 'CatalogueDroppedTables' AND [ModuleConfig_Desc] = @ModuleConfig) BEGIN INSERT INTO [Inspector].[Modules] ([ModuleConfig_Desc], [Modulename], [CollectionProcedurename], [ReportProcedurename], [ReportOrder], [WarningLevel], [ServerSpecific], [Debug], [IsActive], [HeaderText], [Frequency], [StartTime], [EndTime]) VALUES(@ModuleConfig,'CatalogueDroppedTables',NULL,'CatalogueDroppedTablesReport',1,2,1,0,@EnableModule,NULL,@ReportFrequencyMins,@ReportStartTime,@ReportEndTime); END IF NOT EXISTS(SELECT 1 FROM [Inspector].[Modules] WHERE [Modulename] = 'CatalogueMissingLogins' AND [ModuleConfig_Desc] = @ModuleConfig) BEGIN INSERT INTO [Inspector].[Modules] ([ModuleConfig_Desc], [Modulename], [CollectionProcedurename], [ReportProcedurename], [ReportOrder], [WarningLevel], [ServerSpecific], [Debug], [IsActive], [HeaderText], [Frequency], [StartTime], [EndTime]) VALUES(@ModuleConfig,'CatalogueMissingLogins',NULL,'CatalogueMissingLoginsReport',1,2,1,0,@EnableModule,NULL,@ReportFrequencyMins,@ReportStartTime,@ReportEndTime); END IF NOT EXISTS(SELECT 1 FROM [Inspector].[Modules] WHERE [Modulename] = 'CatalogueAgentAudit' AND [ModuleConfig_Desc] = @ModuleConfig) BEGIN INSERT INTO [Inspector].[Modules] ([ModuleConfig_Desc], [Modulename], [CollectionProcedurename], [ReportProcedurename], [ReportOrder], [WarningLevel], [ServerSpecific], [Debug], [IsActive], [HeaderText], [Frequency], [StartTime], [EndTime]) VALUES(@ModuleConfig,'CatalogueAgentAudit',NULL,'CatalogueAgentAuditReport',1,2,1,0,@EnableModule,NULL,@ReportFrequencyMins,@ReportStartTime,@ReportEndTime); END IF NOT EXISTS(SELECT 1 FROM sys.columns WHERE [object_id] = OBJECT_ID(N'Inspector.InspectorUpgradeHistory') AND name = 'RevisionDate') BEGIN ALTER TABLE [Inspector].[InspectorUpgradeHistory] ADD RevisionDate DATE NULL; END EXEC sp_executesql N' INSERT INTO [Inspector].[InspectorUpgradeHistory] ([Log_Date], [PreserveData], [CurrentBuild], [TargetBuild], [SetupCommand], [RevisionDate]) VALUES(GETDATE(),1,@InspectorBuild,@InspectorBuild,''Inspector_Catalogue_CustomModule.sql'',@Revisiondate);', N'@InspectorBuild DECIMAL(4,2), @Revisiondate DATE', @InspectorBuild = @InspectorBuild, @Revisiondate = @Revisiondate;
the_stack
-- 13.09.2015 20:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,552723,540648,0,10,533,'N','Companyname',TO_TIMESTAMP('2015-09-13 20:28:13','YYYY-MM-DD HH24:MI:SS'),100,'N','U',255,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Firmenname',0,TO_TIMESTAMP('2015-09-13 20:28:13','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 13.09.2015 20:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=552723 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 13.09.2015 20:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2015-09-13 20:28:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=552723 ; -- 13.09.2015 20:28 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE I_BPartner ADD Companyname VARCHAR(255) DEFAULT NULL ; -- 13.09.2015 20:30 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,Description,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,552724,540398,0,10,533,'N','Firstname',TO_TIMESTAMP('2015-09-13 20:30:51','YYYY-MM-DD HH24:MI:SS'),100,'N','Vorname','U',255,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Vorname',0,TO_TIMESTAMP('2015-09-13 20:30:51','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 13.09.2015 20:30 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=552724 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 13.09.2015 20:30 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE I_BPartner ADD Firstname VARCHAR(255) DEFAULT NULL ; -- 13.09.2015 20:31 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,552725,540399,0,10,533,'N','Lastname',TO_TIMESTAMP('2015-09-13 20:31:05','YYYY-MM-DD HH24:MI:SS'),100,'N','U',255,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Nachname',0,TO_TIMESTAMP('2015-09-13 20:31:05','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 13.09.2015 20:31 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=552725 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 13.09.2015 20:31 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator ALTER TABLE I_BPartner ADD Lastname VARCHAR(255) DEFAULT NULL ; -- 13.09.2015 20:31 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2015-09-13 20:31:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=552725 ; -- 13.09.2015 20:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2015-09-13 20:32:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=552724 ; -- 13.09.2015 20:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2015-09-13 20:32:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7907 ; -- 13.09.2015 20:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,552723,556301,0,441,TO_TIMESTAMP('2015-09-13 20:32:47','YYYY-MM-DD HH24:MI:SS'),100,255,'D','Y','Y','Y','N','N','N','N','N','Firmenname',TO_TIMESTAMP('2015-09-13 20:32:47','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556301 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 13.09.2015 20:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,552724,556302,0,441,TO_TIMESTAMP('2015-09-13 20:32:47','YYYY-MM-DD HH24:MI:SS'),100,'Vorname',255,'D','Y','Y','Y','N','N','N','N','N','Vorname',TO_TIMESTAMP('2015-09-13 20:32:47','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556302 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 13.09.2015 20:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,552725,556303,0,441,TO_TIMESTAMP('2015-09-13 20:32:47','YYYY-MM-DD HH24:MI:SS'),100,255,'D','Y','Y','Y','N','N','N','N','N','Nachname',TO_TIMESTAMP('2015-09-13 20:32:47','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:32 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=556303 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5956 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5925 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13015 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5931 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5928 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13008 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556301 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5950 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5953 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6050 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=130,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6051 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=140,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5943 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=150,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5948 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=160,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5947 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=170,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5927 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=180,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5933 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=190,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5945 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=200,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5951 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=210,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5954 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=220,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5918 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=230,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5949 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=240,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5922 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=250,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5929 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=260,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556302 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=270,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556303 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=280,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5946 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=290,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5920 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=300,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5921 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=310,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5923 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=320,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5952 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=330,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5930 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=340,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5944 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=350,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5940 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=360,Updated=TO_TIMESTAMP('2015-09-13 20:34:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5919 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=370,Updated=TO_TIMESTAMP('2015-09-13 20:34:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5934 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=380,Updated=TO_TIMESTAMP('2015-09-13 20:34:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58038 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=390,Updated=TO_TIMESTAMP('2015-09-13 20:34:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58039 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=400,Updated=TO_TIMESTAMP('2015-09-13 20:34:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58040 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=410,Updated=TO_TIMESTAMP('2015-09-13 20:34:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5941 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=420,Updated=TO_TIMESTAMP('2015-09-13 20:34:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5924 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=220,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5918 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=360,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5919 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=290,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5920 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=300,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5921 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=240,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5922 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=310,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5923 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=420,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5924 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5925 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=170,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5927 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5928 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=250,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5929 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=330,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5930 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5931 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=180,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5933 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=370,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5934 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=350,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5940 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=410,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5941 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=140,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5943 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=340,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5944 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=190,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5945 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=280,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5946 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=160,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5947 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=150,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5948 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=230,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5949 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=90,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5950 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=200,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5951 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=320,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5952 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=110,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5953 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=210,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5954 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5956 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=120,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6050 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=130,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6051 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13008 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13015 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=380,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58038 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=390,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58039 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=400,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58040 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=80,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556301 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=260,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556302 ; -- 13.09.2015 20:34 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=270,Updated=TO_TIMESTAMP('2015-09-13 20:34:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556303 ; -- 13.09.2015 20:35 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2015-09-13 20:35:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556301 ; -- 13.09.2015 20:35 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET DisplayLength=10,Updated=TO_TIMESTAMP('2015-09-13 20:35:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556302 ; -- 13.09.2015 20:35 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET DisplayLength=10, IsSameLine='Y',Updated=TO_TIMESTAMP('2015-09-13 20:35:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=556303 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='N', SeqNo=0,Updated=TO_TIMESTAMP('2015-09-13 20:36:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5940 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=350,Updated=TO_TIMESTAMP('2015-09-13 20:36:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5919 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=360,Updated=TO_TIMESTAMP('2015-09-13 20:36:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5934 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=370,Updated=TO_TIMESTAMP('2015-09-13 20:36:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58038 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=380,Updated=TO_TIMESTAMP('2015-09-13 20:36:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58039 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=390,Updated=TO_TIMESTAMP('2015-09-13 20:36:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58040 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=400,Updated=TO_TIMESTAMP('2015-09-13 20:36:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5941 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayed='Y', SeqNo=410,Updated=TO_TIMESTAMP('2015-09-13 20:36:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5924 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='N', SeqNoGrid=0,Updated=TO_TIMESTAMP('2015-09-13 20:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5940 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=350,Updated=TO_TIMESTAMP('2015-09-13 20:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5919 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=360,Updated=TO_TIMESTAMP('2015-09-13 20:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5934 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=370,Updated=TO_TIMESTAMP('2015-09-13 20:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58038 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=380,Updated=TO_TIMESTAMP('2015-09-13 20:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58039 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=390,Updated=TO_TIMESTAMP('2015-09-13 20:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58040 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=400,Updated=TO_TIMESTAMP('2015-09-13 20:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5941 ; -- 13.09.2015 20:36 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET IsDisplayedGrid='Y', SeqNoGrid=410,Updated=TO_TIMESTAMP('2015-09-13 20:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5924 ; -- 13.09.2015 20:37 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_ImpFormat_Row SET AD_Column_ID=552723, Name='Firmenname',Updated=TO_TIMESTAMP('2015-09-13 20:37:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ImpFormat_Row_ID=531100 ; -- 13.09.2015 20:37 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_ImpFormat_Row WHERE AD_ImpFormat_Row_ID=531108 ; -- 13.09.2015 20:37 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator DELETE FROM AD_ImpFormat_Row WHERE AD_ImpFormat_Row_ID=531109 ; -- 13.09.2015 20:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,552724,531096,540005,0,TO_TIMESTAMP('2015-09-13 20:38:10','YYYY-MM-DD HH24:MI:SS'),100,'S','.','N',0,'Y','Vorname',50,4,TO_TIMESTAMP('2015-09-13 20:38:10','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_ImpFormat_Row SET StartNo=3,Updated=TO_TIMESTAMP('2015-09-13 20:38:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ImpFormat_Row_ID=531101 ; -- 13.09.2015 20:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,552725,531096,540006,0,TO_TIMESTAMP('2015-09-13 20:38:37','YYYY-MM-DD HH24:MI:SS'),100,'S','.','N',0,'Y','Nachname',60,5,TO_TIMESTAMP('2015-09-13 20:38:37','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_ImpFormat_Row SET SeqNo=30,Updated=TO_TIMESTAMP('2015-09-13 20:38:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ImpFormat_Row_ID=531101 ; -- 13.09.2015 20:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_ImpFormat_Row SET SeqNo=40,Updated=TO_TIMESTAMP('2015-09-13 20:38:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ImpFormat_Row_ID=540005 ; -- 13.09.2015 20:38 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_ImpFormat_Row SET SeqNo=50,Updated=TO_TIMESTAMP('2015-09-13 20:38:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ImpFormat_Row_ID=540006 ; -- 13.09.2015 20:40 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,7899,531096,540007,0,TO_TIMESTAMP('2015-09-13 20:40:04','YYYY-MM-DD HH24:MI:SS'),100,'S','.','N',0,'Y','Straße und Nr.',60,6,TO_TIMESTAMP('2015-09-13 20:40:04','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:40 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,7898,531096,540008,0,TO_TIMESTAMP('2015-09-13 20:40:36','YYYY-MM-DD HH24:MI:SS'),100,'S','.','N',0,'Y','Adresszusatz',70,7,TO_TIMESTAMP('2015-09-13 20:40:36','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:40 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,7896,531096,540009,0,TO_TIMESTAMP('2015-09-13 20:40:51','YYYY-MM-DD HH24:MI:SS'),100,'S','.','N',0,'Y','Ort',80,8,TO_TIMESTAMP('2015-09-13 20:40:51','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,7902,531096,540010,0,TO_TIMESTAMP('2015-09-13 20:41:06','YYYY-MM-DD HH24:MI:SS'),100,'S','.','N',0,'Y','Region',90,9,TO_TIMESTAMP('2015-09-13 20:41:06','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,7865,531096,540011,0,TO_TIMESTAMP('2015-09-13 20:41:26','YYYY-MM-DD HH24:MI:SS'),100,'S','.','N',0,'Y','ISO Ländercode',100,10,TO_TIMESTAMP('2015-09-13 20:41:26','YYYY-MM-DD HH24:MI:SS'),100) ; -- 13.09.2015 20:41 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_ImpFormat_Row (AD_Client_ID,AD_Column_ID,AD_ImpFormat_ID,AD_ImpFormat_Row_ID,AD_Org_ID,Created,CreatedBy,DataType,DecimalPoint,DivideBy100,EndNo,IsActive,Name,SeqNo,StartNo,Updated,UpdatedBy) VALUES (0,7966,531096,540012,0,TO_TIMESTAMP('2015-09-13 20:41:49','YYYY-MM-DD HH24:MI:SS'),100,'S','.','N',0,'Y','Gruppen-Schlüssel',110,11,TO_TIMESTAMP('2015-09-13 20:41:49','YYYY-MM-DD HH24:MI:SS'),100) ;
the_stack
-- 2017-10-20T14:11:39.743 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='GroupNo', Name='Group', PrintName='Group',Updated=TO_TIMESTAMP('2017-10-20 14:11:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543453 ; -- 2017-10-20T14:11:39.765 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='GroupNo', Name='Group', Description=NULL, Help=NULL WHERE AD_Element_ID=543453 ; -- 2017-10-20T14:11:39.780 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='GroupNo', Name='Group', Description=NULL, Help=NULL, AD_Element_ID=543453 WHERE UPPER(ColumnName)='GROUPNO' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-10-20T14:11:39.786 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='GroupNo', Name='Group', Description=NULL, Help=NULL WHERE AD_Element_ID=543453 AND IsCentrallyMaintained='Y' ; -- 2017-10-20T14:11:39.788 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Group', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543453) AND IsCentrallyMaintained='Y' ; -- 2017-10-20T14:11:39.805 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Group', Name='Group' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=543453) ; alter table C_OrderLine rename DiscountGroupNo to GroupNo; -- 2017-10-20T15:07:21.526 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Element SET ColumnName='IsGroupCompensationLine', Name='Group Compensation Line', PrintName='Group Compensation Line',Updated=TO_TIMESTAMP('2017-10-20 15:07:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=543458 ; -- 2017-10-20T15:07:21.530 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET ColumnName='IsGroupCompensationLine', Name='Group Compensation Line', Description=NULL, Help=NULL WHERE AD_Element_ID=543458 ; -- 2017-10-20T15:07:21.546 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsGroupCompensationLine', Name='Group Compensation Line', Description=NULL, Help=NULL, AD_Element_ID=543458 WHERE UPPER(ColumnName)='ISGROUPCOMPENSATIONLINE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL ; -- 2017-10-20T15:07:21.549 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Process_Para SET ColumnName='IsGroupCompensationLine', Name='Group Compensation Line', Description=NULL, Help=NULL WHERE AD_Element_ID=543458 AND IsCentrallyMaintained='Y' ; -- 2017-10-20T15:07:21.550 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Field SET Name='Group Compensation Line', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=543458) AND IsCentrallyMaintained='Y' ; -- 2017-10-20T15:07:21.561 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_PrintFormatItem pi SET PrintName='Group Compensation Line', Name='Group Compensation Line' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=543458) ; alter table C_OrderLine rename IsGroupDiscountLine to IsGroupCompensationLine; -- 2017-10-20T15:14:02.904 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540758,TO_TIMESTAMP('2017-10-20 15:14:02','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','GroupCompensationType',TO_TIMESTAMP('2017-10-20 15:14:02','YYYY-MM-DD HH24:MI:SS'),100,'L') ; -- 2017-10-20T15:14:02.907 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540758 AND NOT EXISTS (SELECT 1 FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 2017-10-20T15:18:54.542 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,541325,540758,TO_TIMESTAMP('2017-10-20 15:18:54','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Surcharge',TO_TIMESTAMP('2017-10-20 15:18:54','YYYY-MM-DD HH24:MI:SS'),100,'S','Surcharge') ; -- 2017-10-20T15:18:54.546 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541325 AND NOT EXISTS (SELECT 1 FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) ; -- 2017-10-20T15:19:12.559 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,541326,540758,TO_TIMESTAMP('2017-10-20 15:19:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Discount',TO_TIMESTAMP('2017-10-20 15:19:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Discount') ; -- 2017-10-20T15:19:12.564 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541326 AND NOT EXISTS (SELECT 1 FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) ; -- 2017-10-20T15:19:37.827 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,540759,TO_TIMESTAMP('2017-10-20 15:19:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','GroupCompensationAmtType',TO_TIMESTAMP('2017-10-20 15:19:37','YYYY-MM-DD HH24:MI:SS'),100,'L') ; -- 2017-10-20T15:19:37.830 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=540759 AND NOT EXISTS (SELECT 1 FROM AD_Reference_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Reference_ID=t.AD_Reference_ID) ; -- 2017-10-20T15:19:55.345 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,541327,540759,TO_TIMESTAMP('2017-10-20 15:19:55','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Percent',TO_TIMESTAMP('2017-10-20 15:19:55','YYYY-MM-DD HH24:MI:SS'),100,'P','Percent') ; -- 2017-10-20T15:19:55.348 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541327 AND NOT EXISTS (SELECT 1 FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) ; -- 2017-10-20T15:20:33.018 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value,ValueName) VALUES (0,0,541328,540759,TO_TIMESTAMP('2017-10-20 15:20:32','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Price and Quantity',TO_TIMESTAMP('2017-10-20 15:20:32','YYYY-MM-DD HH24:MI:SS'),100,'Q','PriceAndQty') ; -- 2017-10-20T15:20:33.023 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=541328 AND NOT EXISTS (SELECT 1 FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) ; -- 2017-10-20T15:21:42.136 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543460,0,'CompensationGroupDiscount',TO_TIMESTAMP('2017-10-20 15:21:42','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Group Discount','Group Discount',TO_TIMESTAMP('2017-10-20 15:21:42','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-20T15:21:42.140 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543460 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2017-10-20T15:23:31.406 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543461,0,'GroupCompensationType',TO_TIMESTAMP('2017-10-20 15:23:31','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Compensation Type','Compensation Type',TO_TIMESTAMP('2017-10-20 15:23:31','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-20T15:23:31.410 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543461 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2017-10-20T15:23:58.198 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,543462,0,'GroupCompensationAmtType',TO_TIMESTAMP('2017-10-20 15:23:58','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Compensation Amount Type','Compensation Amount Type',TO_TIMESTAMP('2017-10-20 15:23:58','YYYY-MM-DD HH24:MI:SS'),100) ; -- 2017-10-20T15:23:58.199 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=543462 AND NOT EXISTS (SELECT 1 FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) ; -- 2017-10-20T15:25:53.865 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,MandatoryLogic,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557778,543461,0,17,540758,260,'N','GroupCompensationType',TO_TIMESTAMP('2017-10-20 15:25:53','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','@IsGroupCompensationLine@=Y','Compensation Type',0,0,TO_TIMESTAMP('2017-10-20 15:25:53','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-10-20T15:25:53.868 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557778 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-10-20T15:25:59.488 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('C_OrderLine','ALTER TABLE public.C_OrderLine ADD COLUMN GroupCompensationType CHAR(1)') ; -- 2017-10-20T15:26:50.331 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,MandatoryLogic,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557779,543462,0,17,540759,260,'N','GroupCompensationAmtType',TO_TIMESTAMP('2017-10-20 15:26:50','YYYY-MM-DD HH24:MI:SS'),100,'N','D',10,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','@IsGroupCompensationLine@=Y','Compensation Amount Type',0,0,TO_TIMESTAMP('2017-10-20 15:26:50','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-10-20T15:26:50.334 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557779 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-10-20T15:26:53.052 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('C_OrderLine','ALTER TABLE public.C_OrderLine ADD COLUMN GroupCompensationAmtType VARCHAR(10)') ; -- 2017-10-20T15:28:17.707 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AllowZoomTo,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FieldLength,IsActive,IsAdvancedText,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsCalculated,IsDimension,IsDLMPartitionBoundary,IsEncrypted,IsGenericZoomKeyColumn,IsGenericZoomOrigin,IsIdentifier,IsKey,IsLazyLoading,IsMandatory,IsParent,IsSelectionColumn,IsStaleable,IsSyncDatabase,IsTranslated,IsUpdateable,IsUseDocSequence,Name,SelectionColumnSeqNo,SeqNo,Updated,UpdatedBy,Version) VALUES (0,557780,543460,0,22,260,'N','CompensationGroupDiscount',TO_TIMESTAMP('2017-10-20 15:28:17','YYYY-MM-DD HH24:MI:SS'),100,'N','D',10,'Y','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','Group Discount',0,0,TO_TIMESTAMP('2017-10-20 15:28:17','YYYY-MM-DD HH24:MI:SS'),100,0) ; -- 2017-10-20T15:28:17.710 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=557780 AND NOT EXISTS (SELECT 1 FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) ; -- 2017-10-20T15:28:21.274 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator /* DDL */ SELECT public.db_alter_table('C_OrderLine','ALTER TABLE public.C_OrderLine ADD COLUMN CompensationGroupDiscount NUMERIC') ; -- 2017-10-20T16:21:38.013 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2017-10-20 16:21:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=544606 ;
the_stack