Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
bash-4.1$ psql postgres=# \c i2b2pm i2b2pm=# \d+ pm_user_login Table "public.pm_user_login" Column | Type | Modifiers | Storage | Description ---------------+-----------------------------+-----------+----------+------------- user_id | character varying(50) | not null | extended | attempt_cd | character varying(50) | not null | extended | entry_date | timestamp without time zone | not null | plain | changeby_char | character varying(50) | | extended | status_cd | character varying(50) | | extended | Indexes: "pm_user_login_pkey" PRIMARY KEY, btree (entry_date, user_id) Has OIDs: no i2b2pm=# ALTER TABLE "pm_user_login" DROP CONSTRAINT "pm_user_login_pkey" ; ALTER TABLE i2b2pm=# \d+ pm_user_login Table "public.pm_user_login" Column | Type | Modifiers | Storage | Description ---------------+-----------------------------+-----------+----------+------------- user_id | character varying(50) | not null | extended | attempt_cd | character varying(50) | not null | extended | entry_date | timestamp without time zone | not null | plain | changeby_char | character varying(50) | | extended | status_cd | character varying(50) | | extended | Has OIDs: no |
Allow for Many More Types of Status from the i2b2 CRC
Change the shrine_query_history's QUERY_RESULT's status column's type from an enum to a text field to accommodate many more types from the i2b2 CRC. This will allow some results previously interpreted as errors to be interpreted as QUEUED. See SHRINE-2715.
For Mysql:
Code Block | ||||
---|---|---|---|---|
| ||||
mysql> use shrine_query_history; |
mysql>
alter
table
mysql> alter table QUERY_RESULT change status status |
varchar(30) |
not |
null; |
For Oracle:
Code Block | ||||
---|---|---|---|---|
| ||||
-- To find the constraint name on the status column: |
SELECT |
COLUMN_NAME,CONSTRAINT_NAME,TABLE_ |
NAME FROM |
user_cons_ |
columns WHERE |
TABLE_NAME = |
'QUERY_RESULT'; |
-- To drop that constraint: |
ALTER |
TABLE |
QUERY_ |
RESULT DROP |
CONSTRAINT |
<constraint_name_for_status>; |
For MS SQL Server:
Code Block | ||||
---|---|---|---|---|
| ||||
USE shrine_query_history; |
-- To find the constraint name on the status column: |
SELECT
*
FROM
SELECT * FROM INFORMATION_SCHEMA.TABLE_ |
CONSTRAINTS WHERE |
TABLE_NAME= |
'QUERY_RESULT'; |
-- To drop that constraint: |
ALTER
TABLE
QUERY_RESULT
DROP
CONSTRAINT
ALTER TABLE QUERY_RESULT DROP CONSTRAINT <constraint_name_for_status>; |
Changes to the context.xml file
...
Overview
Content Tools