Skip to content

Commit

Permalink
add a down script
Browse files Browse the repository at this point in the history
was necessary during my local testing
  • Loading branch information
dmjb committed Jun 5, 2024
1 parent 482dbdb commit 3e03a4e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions database/migrations/000062_migrate_entity_profiles.down.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.

-- Undoing the `up` query automatically is probably not a good idea.
-- Leaving this as a no-op.
BEGIN;

-- in case we need rollback, wipe out the rule_instances table and mark all rows
-- in entity_profiles as unmigrated. A re-run of the migration will recreate all
-- rows in the rule_instances of table since we are dual writing at this point.
DELETE FROM rule_instances;
UPDATE entity_profiles SET migrated = FALSE;

COMMIT;

0 comments on commit 3e03a4e

Please sign in to comment.