Skip to content
Snippets Groups Projects
Verified Commit a6bae788 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Nove sloupce v streams

parent 47377c9c
Branches
Tags
No related merge requests found
...@@ -21,6 +21,8 @@ __PACKAGE__->add_columns( ...@@ -21,6 +21,8 @@ __PACKAGE__->add_columns(
is_public is_public
key key
name name
description
recording
publish_last publish_last
publish_user_id publish_user_id
publish_time publish_time
......
...@@ -53,3 +53,13 @@ drop sequence "uid_seq"; ...@@ -53,3 +53,13 @@ drop sequence "uid_seq";
-- 2 up -- 2 up
alter table "streams" add "description" text; alter table "streams" add "description" text;
-- 3 up
drop view "streams_view";
alter table "streams" add "recording" bool null default false;
create view "streams_view" as
select "streams".*,
extract(epoch from now()-"publish_last") as "publish_last_age",
"users"."name" as "publish_user_name"
from "streams"
left join "users" on ("streams"."publish_user_id" = "users"."id")
;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment