summaryrefslogtreecommitdiff
path: root/www/wiki/maintenance/oracle/archives/patch-slot-origin.sql
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/maintenance/oracle/archives/patch-slot-origin.sql')
-rw-r--r--www/wiki/maintenance/oracle/archives/patch-slot-origin.sql14
1 files changed, 14 insertions, 0 deletions
diff --git a/www/wiki/maintenance/oracle/archives/patch-slot-origin.sql b/www/wiki/maintenance/oracle/archives/patch-slot-origin.sql
new file mode 100644
index 00000000..1b398cd5
--- /dev/null
+++ b/www/wiki/maintenance/oracle/archives/patch-slot-origin.sql
@@ -0,0 +1,14 @@
+--
+-- Replace slot_inherited with slot_origin.
+--
+-- NOTE: There is no release that has slot_inherited. This is only needed to transition between
+-- snapshot versions of 1.30.
+--
+-- NOTE: No code that writes to the slots table was merge yet, the table is assumed to be empty.
+--
+DROP INDEX &mw_prefix.slot_role_inherited;
+
+ALTER TABLE &mw_prefix.slots DROP COLUMN slot_inherited;
+ALTER TABLE &mw_prefix.slots ADD ( slot_origin NUMBER NOT NULL );
+
+CREATE INDEX &mw_prefix.slot_revision_origin_role ON &mw_prefix.slots (slot_revision_id, slot_origin, slot_role_id);