avoid sql error when updating sql database

The index doesn't exist in version 1.7.6 and so trying to drop it
would lead to an error, resulting in not being able to import
1.7.6 database.
https://github.com/iSoron/uhabits/issues/327
pull/333/head
Luboš Luňák 8 years ago
parent 52c4282601
commit f8e0d07236

@ -13,7 +13,7 @@ begin transaction;
habit integer not null references habits(id), habit integer not null references habits(id),
timestamp integer not null, timestamp integer not null,
value integer not null); value integer not null);
drop index idx_repetitions_habit_timestamp; drop index if exists idx_repetitions_habit_timestamp;
create unique index idx_repetitions_habit_timestamp on Repetitions( create unique index idx_repetitions_habit_timestamp on Repetitions(
habit, timestamp); habit, timestamp);
insert into Repetitions select * from RepetitionsBak; insert into Repetitions select * from RepetitionsBak;

Loading…
Cancel
Save