fix migration

This commit is contained in:
azivner 2018-08-14 16:09:30 +02:00
parent 5117d43e29
commit 35ef3c8470

View File

@ -12,13 +12,13 @@ create table attributes
hash TEXT default "" not null); hash TEXT default "" not null);
create index IDX_attributes_name_value create index IDX_attributes_name_value
on labels (name, value); on attributes (name, value);
create index IDX_attributes_value create index IDX_attributes_value
on labels (value); on attributes (value);
create index IDX_attributes_noteId create index IDX_attributes_noteId
on labels (noteId); on attributes (noteId);
INSERT INTO attributes (attributeId, noteId, type, name, value, position, dateCreated, dateModified, isDeleted, hash) INSERT INTO attributes (attributeId, noteId, type, name, value, position, dateCreated, dateModified, isDeleted, hash)
SELECT labelId, noteId, 'label', name, value, position, dateCreated, dateModified, isDeleted, hash FROM labels; SELECT labelId, noteId, 'label', name, value, position, dateCreated, dateModified, isDeleted, hash FROM labels;