Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
Flyway move view between scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjo-alvarez committed Dec 12, 2024
1 parent 39428fb commit 252e325
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,3 @@ AS SELECT bootcamps.id,bootcamps.name,bootcamps.start_date,bootcamps.end_date,bo
END AS status
FROM bootcamps
order by name collate "es-ES-x-icu";

CREATE OR REPLACE VIEW public.sessions_status
AS SELECT sessions.id,sessions.id_bootcamp,sessions.session_name,sessions.session_date,sessions.link,sessions.password,
CASE
WHEN sessions.session_date::date < CURRENT_DATE THEN 'Finished'::text
WHEN sessions.session_date::date = CURRENT_DATE THEN 'Started'::text
ELSE 'Pending'::text
END AS status
FROM sessions
order by session_name collate "es-ES-x-icu";
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,14 @@ SELECT
WHEN session_date::date = CURRENT_DATE THEN 'Started'
ELSE 'Pending'
END AS status
FROM sessions;
FROM sessions;

CREATE OR REPLACE VIEW public.sessions_status
AS SELECT sessions.id,sessions.id_bootcamp,sessions.session_name,sessions.session_date,sessions.link,sessions.password,
CASE
WHEN sessions.session_date::date < CURRENT_DATE THEN 'Finished'::text
WHEN sessions.session_date::date = CURRENT_DATE THEN 'Started'::text
ELSE 'Pending'::text
END AS status
FROM sessions
order by session_name collate "es-ES-x-icu";

0 comments on commit 252e325

Please sign in to comment.