Skip to content

Instantly share code, notes, and snippets.

@hanleybrand
Created March 31, 2015 21:21
Show Gist options
  • Save hanleybrand/8ef04daac0e960b4da14 to your computer and use it in GitHub Desktop.
Save hanleybrand/8ef04daac0e960b4da14 to your computer and use it in GitHub Desktop.
Blackboard Learn - Group Assignments broken by editing groups; fix for MS SQL Server, bb_bb60 schema
/* Step 0 create preservation tables as a backup in case */
-- psql
--CREATE TABLE group_attempt_files_prv
-- AS (SELECT * FROM group_attempt_files WHERE 1=0);
-- tsql
SELECT gaf.* into group_attempt_files_prv
FROM group_attempt_files gaf WHERE 1=0;
--CREATE TABLE attempt_prv
-- AS SELECT * FROM attempt WHERE 1=0;
-- tsql
SELECT att.* into attempt_prv
FROM attempt att WHERE 1=0;
-- psql
--CREATE TABLE group_attempt_prv
-- AS SELECT * FROM group_attempt WHERE 1=0;
SELECT ga.* into group_attempt_prv
FROM group_attempt ga WHERE 1=0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment