Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OConnor/module.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Name: OConnor
SchemaVersion: 25.001
SchemaVersion: 26.001
RequiredServerVersion: 16.30
ManageVersion: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
DO $$
DECLARE
rec RECORD;
BEGIN
FOR rec IN
SELECT table_name, column_name
FROM information_schema.columns
WHERE table_schema = 'oconnor'
AND lower(column_name) IN ('createdby',
'modifiedby')
AND data_type = 'smallint'
Comment thread
labkey-bpatel marked this conversation as resolved.
Outdated
LOOP
EXECUTE format(
'ALTER TABLE oconnor.%I ALTER COLUMN %I
TYPE userid',
rec.table_name, rec.column_name
);
END LOOP;
END $$;