fix(views): check if bucket index already exists before creating new index
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Resolves #2243
This commit is contained in:
parent
3e7225ebee
commit
bf3c8ac9da
|
@ -82,7 +82,6 @@ func init() {
|
||||||
|
|
||||||
if config.DatabaseType.GetString() == "sqlite" {
|
if config.DatabaseType.GetString() == "sqlite" {
|
||||||
_, err = tx.Exec(`
|
_, err = tx.Exec(`
|
||||||
|
|
||||||
create table buckets_dg_tmp
|
create table buckets_dg_tmp
|
||||||
(
|
(
|
||||||
id INTEGER not null
|
id INTEGER not null
|
||||||
|
@ -107,7 +106,7 @@ drop table buckets;
|
||||||
alter table buckets_dg_tmp
|
alter table buckets_dg_tmp
|
||||||
rename to buckets;
|
rename to buckets;
|
||||||
|
|
||||||
create unique index UQE_buckets_id
|
create unique index if not exists UQE_buckets_id
|
||||||
on buckets (id);
|
on buckets (id);
|
||||||
`)
|
`)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue