39 {'extid': b64encode(extid), 'eid': eid}, ask_confirm=False) |
39 {'extid': b64encode(extid), 'eid': eid}, ask_confirm=False) |
40 checkpoint() |
40 checkpoint() |
41 |
41 |
42 if applcubicwebversion < (3, 2, 0) and cubicwebversion >= (3, 2, 0): |
42 if applcubicwebversion < (3, 2, 0) and cubicwebversion >= (3, 2, 0): |
43 add_cube('card', update_database=False) |
43 add_cube('card', update_database=False) |
44 |
|
45 if applcubicwebversion < (2, 47, 0) and cubicwebversion >= (2, 47, 0): |
|
46 from cubicweb.server import schemaserial |
|
47 schemaserial.HAS_FULLTEXT_CONTAINER = False |
|
48 session.set_shared_data('do-not-insert-is_instance_of', True) |
|
49 add_attribute('CWRType', 'fulltext_container') |
|
50 schemaserial.HAS_FULLTEXT_CONTAINER = True |
|
51 |
|
52 |
|
53 |
|
54 if applcubicwebversion < (2, 50, 0) and cubicwebversion >= (2, 50, 0): |
|
55 session.set_shared_data('do-not-insert-is_instance_of', True) |
|
56 add_relation_type('is_instance_of') |
|
57 # fill the relation using an efficient sql query instead of using rql |
|
58 sql('INSERT INTO is_instance_of_relation ' |
|
59 ' SELECT * from is_relation') |
|
60 checkpoint() |
|
61 session.set_shared_data('do-not-insert-is_instance_of', False) |
|
62 |
|
63 if applcubicwebversion < (2, 42, 0) and cubicwebversion >= (2, 42, 0): |
|
64 sql('ALTER TABLE entities ADD COLUMN mtime TIMESTAMP') |
|
65 sql('UPDATE entities SET mtime=CURRENT_TIMESTAMP') |
|
66 sql('CREATE INDEX entities_mtime_idx ON entities(mtime)') |
|
67 sql('''CREATE TABLE deleted_entities ( |
|
68 eid INTEGER PRIMARY KEY NOT NULL, |
|
69 type VARCHAR(64) NOT NULL, |
|
70 source VARCHAR(64) NOT NULL, |
|
71 dtime TIMESTAMP NOT NULL, |
|
72 extid VARCHAR(256) |
|
73 )''') |
|
74 sql('CREATE INDEX deleted_entities_type_idx ON deleted_entities(type)') |
|
75 sql('CREATE INDEX deleted_entities_dtime_idx ON deleted_entities(dtime)') |
|
76 sql('CREATE INDEX deleted_entities_extid_idx ON deleted_entities(extid)') |
|
77 checkpoint() |
|