Rename 'published' to 'public' (for recipe)

This commit is contained in:
Greg Burri 2025-04-02 01:53:02 +02:00
parent eaef6dc77e
commit 4f739593b8
20 changed files with 92 additions and 91 deletions

View file

@ -21,16 +21,16 @@ VALUES (
NULL
);
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published], [creation_datetime])
INSERT INTO [Recipe] ([id], [user_id], [title], [is_public], [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], [creation_datetime], [servings], [estimated_time], [difficulty])
INSERT INTO [Recipe] ([id], [user_id], [title], [is_public], [creation_datetime], [servings], [estimated_time], [difficulty])
VALUES (2, 1, 'Gratin de thon aux olives', true, '2025-01-07T10:41:05.697884837+00:00', 4, 40, 1);
INSERT INTO [Recipe] ([id], [user_id], [title], [is_published], [creation_datetime])
INSERT INTO [Recipe] ([id], [user_id], [title], [is_public], [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], [creation_datetime])
INSERT INTO [Recipe] ([id], [user_id], [title], [is_public], [creation_datetime])
VALUES (4, 2, 'Ouiche lorraine', true, '2025-01-07T10:41:05.697884837+00:00');

View file

@ -62,7 +62,7 @@ CREATE TABLE [Recipe] (
-- 0: Unknown, 1: Easy, 2: Medium, 4: Hard.
[difficulty] INTEGER NOT NULL DEFAULT 0,
[servings] INTEGER DEFAULT 4,
[is_published] INTEGER NOT NULL DEFAULT FALSE,
[is_public] INTEGER NOT NULL DEFAULT FALSE,
[creation_datetime] TEXT NOT NULL,
FOREIGN KEY([user_id]) REFERENCES [User]([id]) ON DELETE SET NULL