mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
renaming attributes to labels, fixes #79
This commit is contained in:
22
db/migrations/0080__rename_attributes_to_labels.sql
Normal file
22
db/migrations/0080__rename_attributes_to_labels.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
create table labels
|
||||
(
|
||||
labelId TEXT not null primary key,
|
||||
noteId TEXT not null,
|
||||
name TEXT not null,
|
||||
value TEXT default '' not null,
|
||||
position INT default 0 not null,
|
||||
dateCreated TEXT not null,
|
||||
dateModified TEXT not null,
|
||||
isDeleted INT not null
|
||||
);
|
||||
|
||||
create index IDX_labels_name_value
|
||||
on labels (name, value);
|
||||
|
||||
create index IDX_labels_noteId
|
||||
on labels (noteId);
|
||||
|
||||
INSERT INTO labels (labelId, noteId, name, "value", "position", dateCreated, dateModified, isDeleted)
|
||||
SELECT attributeId, noteId, name, "value", "position", dateCreated, dateModified, isDeleted FROM attributes;
|
||||
|
||||
DROP TABLE attributes;
|
||||
Reference in New Issue
Block a user