VirtualBox

Ignore:
Timestamp:
Oct 27, 2017 4:57:29 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118783
Message:

testmanager/db: scm updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r19-testboxes-3.pgsql

    r69111 r69448  
    4343LOCK TABLE TestBoxes            IN ACCESS EXCLUSIVE MODE;
    4444LOCK TABLE SchedGroupMembers    IN ACCESS EXCLUSIVE MODE;
    45      
     45
    4646\d+ TestBoxes;
    4747
    4848--
    49 -- Rename the table, drop foreign keys refering to it, and drop constrains 
     49-- Rename the table, drop foreign keys refering to it, and drop constrains
    5050-- within the table itself.  The latter is mostly for naming and we do it
    5151-- up front in case the database we're running against has different names
    52 -- due to previous conversions. 
     52-- due to previous conversions.
    5353--
    5454ALTER TABLE TestBoxes RENAME TO OldTestBoxes;
     
    6565ALTER TABLE OldTestBoxes    DROP CONSTRAINT testboxes_pkey;
    6666ALTER TABLE OldTestBoxes    DROP CONSTRAINT testboxes_idgentestbox_key;
    67                    
     67
    6868DROP INDEX IF EXISTS TestBoxesUuidIdx;
    6969DROP INDEX IF EXISTS TestBoxesExpireEffectiveIdx;
    70              
     70
    7171-- This output should be free of index, constraints and references from other tables.
    7272\d+ OldTestBoxes;
    73      
    74 --
    75 -- Create the two new tables before starting data migration (don't want to spend time 
     73
     74--
     75-- Create the two new tables before starting data migration (don't want to spend time
    7676-- on converting strings just to find a typo in the TestBoxes create table syntax).
    77 --                   
     77--
    7878CREATE SEQUENCE TestBoxStrTabIdSeq
    7979    START 1
     
    251251--
    252252
    253 INSERT INTO TestBoxes ( 
     253INSERT INTO TestBoxes (
    254254            idTestBox,          --  0
    255255            tsEffective,        --  1
     
    278278            fCpu64BitGuest,     -- 24
    279279            fChipsetIoMmu,      -- 25
    280             fRawMode,           -- 26 
    281             cMbMemory,          -- 27 
    282             cMbScratch,         -- 28 
    283             idStrReport,        -- 29 
    284             iTestBoxScriptRev,  -- 30 
     280            fRawMode,           -- 26
     281            cMbMemory,          -- 27
     282            cMbScratch,         -- 28
     283            idStrReport,        -- 29
     284            iTestBoxScriptRev,  -- 30
    285285            iPythonHexVersion,  -- 31
    286286            enmPendingCmd       -- 32
    287287            )
    288 SELECT      idTestBox, 
    289             tsEffective, 
    290             tsExpire, 
    291             uidAuthor, 
    292             idGenTestBox, 
    293             ip, 
    294             uuidSystem, 
    295             sName, 
    296             st1.idStr, 
    297             idSchedGroup, 
    298             fEnabled, 
    299             enmLomKind, 
    300             ipLom, 
    301             pctScaleTimeout, 
     288SELECT      idTestBox,
     289            tsEffective,
     290            tsExpire,
     291            uidAuthor,
     292            idGenTestBox,
     293            ip,
     294            uuidSystem,
     295            sName,
     296            st1.idStr,
     297            idSchedGroup,
     298            fEnabled,
     299            enmLomKind,
     300            ipLom,
     301            pctScaleTimeout,
    302302            NULL,
    303             st2.idStr, 
    304             st3.idStr, 
    305             st4.idStr, 
    306             st5.idStr, 
     303            st2.idStr,
     304            st3.idStr,
     305            st4.idStr,
     306            st5.idStr,
    307307            st6.idStr,
    308             lCpuRevision,         
    309             cCpus, 
    310             fCpuHwVirt, 
    311             fCpuNestedPaging, 
    312             fCpu64BitGuest, 
    313             fChipsetIoMmu, 
     308            lCpuRevision,
     309            cCpus,
     310            fCpuHwVirt,
     311            fCpuNestedPaging,
     312            fCpu64BitGuest,
     313            fChipsetIoMmu,
    314314            NULL,
    315             cMbMemory, 
    316             cMbScratch, 
     315            cMbMemory,
     316            cMbScratch,
    317317            st7.idStr,
    318             iTestBoxScriptRev, 
    319             iPythonHexVersion, 
     318            iTestBoxScriptRev,
     319            iPythonHexVersion,
    320320            enmPendingCmd
    321321FROM        OldTestBoxes
     
    333333
    334334-- Restore foreign key references to the table.
    335 ALTER TABLE TestBoxStatuses ADD  CONSTRAINT TestBoxStatuses_idGenTestBox_fkey 
     335ALTER TABLE TestBoxStatuses ADD  CONSTRAINT TestBoxStatuses_idGenTestBox_fkey
    336336    FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox);
    337 ALTER TABLE TestSets        ADD  CONSTRAINT TestSets_idGenTestBox_fkey         
     337ALTER TABLE TestSets        ADD  CONSTRAINT TestSets_idGenTestBox_fkey
    338338    FOREIGN KEY (idGenTestBox) REFERENCES TestBoxes(idGenTestBox);
    339339
     
    345345\d TestBoxes;
    346346
    347 
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette