Groups can now be ordered (via drag and drop)

This commit is contained in:
Greg Burri 2025-01-10 22:38:34 +01:00
parent 16c484c2d1
commit 975d1ceee2
14 changed files with 461 additions and 54 deletions

View file

@ -20,17 +20,17 @@ VALUES (
NULL
);
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published])
VALUES (1, 1, 'Croissant au jambon', true);
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published], [creation_datetime])
VALUES (1, 1, 'Croissant au jambon', true, '2025-01-07T10:41:05.697884837+00:00');
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published])
VALUES (2, 1, 'Gratin de thon aux olives', true);
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published], [creation_datetime])
VALUES (2, 1, 'Gratin de thon aux olives', true, '2025-01-07T10:41:05.697884837+00:00');
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published])
VALUES (3, 1, 'Saumon en croute', true);
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published], [creation_datetime])
VALUES (3, 1, 'Saumon en croute', true, '2025-01-07T10:41:05.697884837+00:00');
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published])
VALUES (4, 2, 'Ouiche lorraine', true);
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published], [creation_datetime])
VALUES (4, 2, 'Ouiche lorraine', true, '2025-01-07T10:41:05.697884837+00:00');
-- Groups, steps and ingredients for 'Gratin de thon'.

View file

@ -28,6 +28,7 @@ CREATE TABLE [User] (
[is_admin] INTEGER NOT NULL DEFAULT FALSE
) STRICT;
CREATE INDEX [validation_token_index] ON [User]([validation_token]);
CREATE UNIQUE INDEX [User_email_index] ON [User]([email]);
CREATE TABLE [UserLoginToken] (
@ -58,6 +59,7 @@ CREATE TABLE [Recipe] (
[difficulty] INTEGER NOT NULL DEFAULT 0,
[servings] INTEGER DEFAULT 4,
[is_published] INTEGER NOT NULL DEFAULT FALSE,
[creation_datetime] TEXT NOT NULL,
FOREIGN KEY([user_id]) REFERENCES [User]([id]) ON DELETE SET NULL
) STRICT;