Commit 910b80f7 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Added commit to oracle import script.

Now truncating table before importing just in case monitoring plugin is left up long enough to record data ... will cause key conflicts.


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches/openfire_3_5_1@10292 b35dd754-fafc-0310-a699-88a17e54d16e
parent 7cd5d466
TRUNCATE TABLE ofConversation;
INSERT INTO ofConversation INSERT INTO ofConversation
(conversationID, room, isExternal, startDate, lastActivity, messageCount) (conversationID, room, isExternal, startDate, lastActivity, messageCount)
SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount
FROM entConversation; FROM entConversation;
TRUNCATE TABLE ofConParticipant;
INSERT INTO ofConParticipant INSERT INTO ofConParticipant
(conversationID, joinedDate, leftDate, bareJID, jidResource, nickname) (conversationID, joinedDate, leftDate, bareJID, jidResource, nickname)
SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname
FROM entConParticipant; FROM entConParticipant;
TRUNCATE TABLE ofMessageArchive;
INSERT INTO ofMessageArchive INSERT INTO ofMessageArchive
(conversationID, fromJID, toJID, sentDate, body) (conversationID, fromJID, toJID, sentDate, body)
SELECT conversationID, fromJID, toJID, sentDate, body SELECT conversationID, fromJID, toJID, sentDate, body
FROM entMessageArchive; FROM entMessageArchive;
TRUNCATE TABLE ofRRDs;
INSERT INTO ofRRDs INSERT INTO ofRRDs
(id, updatedDate, bytes) (id, updatedDate, bytes)
SELECT id, updatedDate, bytes SELECT id, updatedDate, bytes
......
TRUNCATE TABLE ofConversation;
INSERT INTO ofConversation INSERT INTO ofConversation
(conversationID, room, isExternal, startDate, lastActivity, messageCount) (conversationID, room, isExternal, startDate, lastActivity, messageCount)
SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount
FROM entConversation; FROM entConversation;
TRUNCATE TABLE ofConParticipant;
INSERT INTO ofConParticipant INSERT INTO ofConParticipant
(conversationID, joinedDate, leftDate, bareJID, jidResource, nickname) (conversationID, joinedDate, leftDate, bareJID, jidResource, nickname)
SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname
FROM entConParticipant; FROM entConParticipant;
TRUNCATE TABLE ofMessageArchive;
INSERT INTO ofMessageArchive INSERT INTO ofMessageArchive
(conversationID, fromJID, toJID, sentDate, body) (conversationID, fromJID, toJID, sentDate, body)
SELECT conversationID, fromJID, toJID, sentDate, body SELECT conversationID, fromJID, toJID, sentDate, body
FROM entMessageArchive; FROM entMessageArchive;
TRUNCATE TABLE ofRRDs;
INSERT INTO ofRRDs INSERT INTO ofRRDs
(id, updatedDate, bytes) (id, updatedDate, bytes)
SELECT id, updatedDate, bytes SELECT id, updatedDate, bytes
......
TRUNCATE TABLE ofConversation;
INSERT INTO ofConversation INSERT INTO ofConversation
(conversationID, room, isExternal, startDate, lastActivity, messageCount) (conversationID, room, isExternal, startDate, lastActivity, messageCount)
SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount
FROM entConversation; FROM entConversation;
TRUNCATE TABLE ofConParticipant;
INSERT INTO ofConParticipant INSERT INTO ofConParticipant
(conversationID, joinedDate, leftDate, bareJID, jidResource, nickname) (conversationID, joinedDate, leftDate, bareJID, jidResource, nickname)
SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname
FROM entConParticipant; FROM entConParticipant;
TRUNCATE TABLE ofMessageArchive;
INSERT INTO ofMessageArchive INSERT INTO ofMessageArchive
(conversationID, fromJID, toJID, sentDate, body) (conversationID, fromJID, toJID, sentDate, body)
SELECT conversationID, fromJID, toJID, sentDate, body SELECT conversationID, fromJID, toJID, sentDate, body
FROM entMessageArchive; FROM entMessageArchive;
TRUNCATE TABLE ofRRDs;
INSERT INTO ofRRDs INSERT INTO ofRRDs
(id, updatedDate, bytes) (id, updatedDate, bytes)
SELECT id, updatedDate, bytes SELECT id, updatedDate, bytes
......
TRUNCATE TABLE ofConversation;
INSERT INTO ofConversation INSERT INTO ofConversation
(conversationID, room, isExternal, startDate, lastActivity, messageCount) (conversationID, room, isExternal, startDate, lastActivity, messageCount)
SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount
FROM entConversation; FROM entConversation;
TRUNCATE TABLE ofConParticipant;
INSERT INTO ofConParticipant INSERT INTO ofConParticipant
(conversationID, joinedDate, leftDate, bareJID, jidResource, nickname) (conversationID, joinedDate, leftDate, bareJID, jidResource, nickname)
SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname
FROM entConParticipant; FROM entConParticipant;
TRUNCATE TABLE ofMessageArchive;
INSERT INTO ofMessageArchive INSERT INTO ofMessageArchive
(conversationID, fromJID, toJID, sentDate, body) (conversationID, fromJID, toJID, sentDate, body)
SELECT conversationID, fromJID, toJID, sentDate, body SELECT conversationID, fromJID, toJID, sentDate, body
FROM entMessageArchive; FROM entMessageArchive;
TRUNCATE TABLE ofRRDs;
INSERT INTO ofRRDs INSERT INTO ofRRDs
(id, updatedDate, bytes) (id, updatedDate, bytes)
SELECT id, updatedDate, bytes SELECT id, updatedDate, bytes
FROM entRRDs; FROM entRRDs;
commit;
TRUNCATE TABLE ofConversation;
INSERT INTO ofConversation INSERT INTO ofConversation
(conversationID, room, isExternal, startDate, lastActivity, messageCount) (conversationID, room, isExternal, startDate, lastActivity, messageCount)
SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount
FROM entConversation; FROM entConversation;
TRUNCATE TABLE ofConParticipant;
INSERT INTO ofConParticipant INSERT INTO ofConParticipant
(conversationID, joinedDate, leftDate, bareJID, jidResource, nickname) (conversationID, joinedDate, leftDate, bareJID, jidResource, nickname)
SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname
FROM entConParticipant; FROM entConParticipant;
TRUNCATE TABLE ofMessageArchive;
INSERT INTO ofMessageArchive INSERT INTO ofMessageArchive
(conversationID, fromJID, toJID, sentDate, body) (conversationID, fromJID, toJID, sentDate, body)
SELECT conversationID, fromJID, toJID, sentDate, body SELECT conversationID, fromJID, toJID, sentDate, body
FROM entMessageArchive; FROM entMessageArchive;
TRUNCATE TABLE ofRRDs;
INSERT INTO ofRRDs INSERT INTO ofRRDs
(id, updatedDate, bytes) (id, updatedDate, bytes)
SELECT id, updatedDate, bytes SELECT id, updatedDate, bytes
......
TRUNCATE TABLE ofConversation;
INSERT INTO ofConversation INSERT INTO ofConversation
(conversationID, room, isExternal, startDate, lastActivity, messageCount) (conversationID, room, isExternal, startDate, lastActivity, messageCount)
SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount SELECT conversationID, room, isExternal, startDate, lastActivity, messageCount
FROM entConversation; FROM entConversation;
TRUNCATE TABLE ofConParticipant;
INSERT INTO ofConParticipant INSERT INTO ofConParticipant
(conversationID, joinedDate, leftDate, bareJID, jidResource, nickname) (conversationID, joinedDate, leftDate, bareJID, jidResource, nickname)
SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname SELECT conversationID, joinedDate, leftDate, bareJID, jidResource, nickname
FROM entConParticipant; FROM entConParticipant;
TRUNCATE TABLE ofMessageArchive;
INSERT INTO ofMessageArchive INSERT INTO ofMessageArchive
(conversationID, fromJID, toJID, sentDate, body) (conversationID, fromJID, toJID, sentDate, body)
SELECT conversationID, fromJID, toJID, sentDate, body SELECT conversationID, fromJID, toJID, sentDate, body
FROM entMessageArchive; FROM entMessageArchive;
TRUNCATE TABLE ofRRDs;
INSERT INTO ofRRDs INSERT INTO ofRRDs
(id, updatedDate, bytes) (id, updatedDate, bytes)
SELECT id, updatedDate, bytes SELECT id, updatedDate, bytes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment