# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1398676826 -7200
# Node ID b36bc18f6ef7bd2a32f800053891b15e9c52eb3b
# Parent  4a23058e4d9f12e955c0a00ffbe20dd099be3c44
[migration] move 'entities' table changes from 3.19.0 to bootstrap script

The 'mtime' and 'source' columns need to go away before we attempt to do
anything else with the repo, otherwise any addition of an entity is
going to explode.

diff -r 4a23058e4d9f -r b36bc18f6ef7 misc/migration/3.19.0_Any.py
--- a/misc/migration/3.19.0_Any.py	Mon Apr 28 12:54:14 2014 +0200
+++ b/misc/migration/3.19.0_Any.py	Mon Apr 28 11:20:26 2014 +0200
@@ -1,4 +1,3 @@
 sql('DROP TABLE "deleted_entities"')
-sql('ALTER TABLE "entities" DROP COLUMN "mtime"')
-sql('ALTER TABLE "entities" DROP COLUMN "source"')
 
+commit()
diff -r 4a23058e4d9f -r b36bc18f6ef7 misc/migration/bootstrapmigration_repository.py
--- a/misc/migration/bootstrapmigration_repository.py	Mon Apr 28 12:54:14 2014 +0200
+++ b/misc/migration/bootstrapmigration_repository.py	Mon Apr 28 11:20:26 2014 +0200
@@ -50,6 +50,11 @@
     session.commit()
 
 if applcubicwebversion < (3, 19, 0) and cubicwebversion >= (3, 19, 0):
+    sql('ALTER TABLE "entities" DROP COLUMN "mtime"')
+    sql('ALTER TABLE "entities" DROP COLUMN "source"')
+
+    commit()
+
     replace_eid_sequence_with_eid_numrange(session)
 
 if applcubicwebversion < (3, 17, 0) and cubicwebversion >= (3, 17, 0):