Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rromanchuk committed Apr 10, 2024
1 parent e7a9adb commit 8bae4c7
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 3 deletions.
2 changes: 1 addition & 1 deletion personal/app/controllers/serve/videos_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Serve
class VideosController < ApplicationController
before_action :set_breadcrumbs

let(:video) { Blob.friendly.find(params[:id]) }
let(:video) { StreamingVideo.friendly.find(params[:id]) }

def show
add_breadcrumb("Flying Videos", page_url("flying"))
Expand Down
4 changes: 3 additions & 1 deletion personal/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def matches?(request)
end
end

scope module: :ryan_romanchuk do
scope module: :ryan_romanchuk do
resources :streaming_videos
resources :posts do
resources :tags, shallow: true
get :recently_updated, on: :collection
Expand All @@ -61,6 +62,7 @@ def matches?(request)

resources :videos
resources :blobs

resources :attachments

scope 'romanchuk_open' do
Expand Down
39 changes: 38 additions & 1 deletion personal/db/ryan_romanchuk_structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ALTER TABLE IF EXISTS ONLY public.gutentag_taggings DROP CONSTRAINT IF EXISTS fk
ALTER TABLE IF EXISTS ONLY public.active_storage_attachments DROP CONSTRAINT IF EXISTS fk_rails_c3b3935057;
ALTER TABLE IF EXISTS ONLY public.active_storage_variant_records DROP CONSTRAINT IF EXISTS fk_rails_993965df05;
DROP INDEX IF EXISTS public.index_users_on_slug;
DROP INDEX IF EXISTS public.index_streaming_videos_on_slug;
DROP INDEX IF EXISTS public.index_posts_on_slug;
DROP INDEX IF EXISTS public.index_pg_search_documents_on_searchable;
DROP INDEX IF EXISTS public.index_gutentag_tags_on_taggings_count;
Expand All @@ -28,6 +29,7 @@ DROP INDEX IF EXISTS public.index_active_storage_attachments_uniqueness;
DROP INDEX IF EXISTS public.index_active_storage_attachments_on_blob_id;
DROP INDEX IF EXISTS public.gutentag_taggings_uniqueness;
ALTER TABLE IF EXISTS ONLY public.users DROP CONSTRAINT IF EXISTS users_pkey;
ALTER TABLE IF EXISTS ONLY public.streaming_videos DROP CONSTRAINT IF EXISTS streaming_videos_pkey;
ALTER TABLE IF EXISTS ONLY public.schema_migrations DROP CONSTRAINT IF EXISTS schema_migrations_pkey;
ALTER TABLE IF EXISTS ONLY public.posts DROP CONSTRAINT IF EXISTS posts_pkey;
ALTER TABLE IF EXISTS ONLY public.pg_search_documents DROP CONSTRAINT IF EXISTS pg_search_documents_pkey;
Expand All @@ -41,6 +43,7 @@ ALTER TABLE IF EXISTS ONLY public.active_storage_attachments DROP CONSTRAINT IF
ALTER TABLE IF EXISTS public.pg_search_documents ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.friendly_id_slugs ALTER COLUMN id DROP DEFAULT;
DROP TABLE IF EXISTS public.users;
DROP TABLE IF EXISTS public.streaming_videos;
DROP TABLE IF EXISTS public.schema_migrations;
DROP TABLE IF EXISTS public.posts;
DROP SEQUENCE IF EXISTS public.pg_search_documents_id_seq;
Expand Down Expand Up @@ -194,7 +197,7 @@ CREATE TABLE public.pg_search_documents (
id bigint NOT NULL,
content text,
searchable_type character varying,
searchable_id bigint,
searchable_id uuid,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
Expand Down Expand Up @@ -245,6 +248,23 @@ CREATE TABLE public.schema_migrations (
);


--
-- Name: streaming_videos; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.streaming_videos (
id uuid DEFAULT gen_random_uuid() NOT NULL,
key character varying NOT NULL,
content_type character varying,
title character varying,
description character varying,
slug character varying,
data jsonb DEFAULT '{}'::jsonb NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);


--
-- Name: users; Type: TABLE; Schema: public; Owner: -
--
Expand Down Expand Up @@ -354,6 +374,14 @@ ALTER TABLE ONLY public.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);


--
-- Name: streaming_videos streaming_videos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.streaming_videos
ADD CONSTRAINT streaming_videos_pkey PRIMARY KEY (id);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -460,6 +488,13 @@ CREATE INDEX index_pg_search_documents_on_searchable ON public.pg_search_documen
CREATE INDEX index_posts_on_slug ON public.posts USING btree (slug);


--
-- Name: index_streaming_videos_on_slug; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_streaming_videos_on_slug ON public.streaming_videos USING btree (slug);


--
-- Name: index_users_on_slug; Type: INDEX; Schema: public; Owner: -
--
Expand Down Expand Up @@ -498,6 +533,8 @@ ALTER TABLE ONLY public.gutentag_taggings
SET search_path TO "$user", public;

INSERT INTO "schema_migrations" (version) VALUES
('20240410055524'),
('20240410052724'),
('20231231005814'),
('20230509001859'),
('20230509001025'),
Expand Down
36 changes: 36 additions & 0 deletions personal/db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ALTER TABLE IF EXISTS ONLY public.gutentag_taggings DROP CONSTRAINT IF EXISTS fk
ALTER TABLE IF EXISTS ONLY public.active_storage_attachments DROP CONSTRAINT IF EXISTS fk_rails_c3b3935057;
ALTER TABLE IF EXISTS ONLY public.active_storage_variant_records DROP CONSTRAINT IF EXISTS fk_rails_993965df05;
DROP INDEX IF EXISTS public.index_users_on_slug;
DROP INDEX IF EXISTS public.index_streaming_videos_on_slug;
DROP INDEX IF EXISTS public.index_romanchuk_open_tournaments_on_slug;
DROP INDEX IF EXISTS public.index_romanchuk_open_players_on_slug;
DROP INDEX IF EXISTS public.index_romanchuk_open_golfers_on_tournament_id;
Expand All @@ -35,6 +36,7 @@ DROP INDEX IF EXISTS public.index_active_storage_attachments_uniqueness;
DROP INDEX IF EXISTS public.index_active_storage_attachments_on_blob_id;
DROP INDEX IF EXISTS public.gutentag_taggings_uniqueness;
ALTER TABLE IF EXISTS ONLY public.users DROP CONSTRAINT IF EXISTS users_pkey;
ALTER TABLE IF EXISTS ONLY public.streaming_videos DROP CONSTRAINT IF EXISTS streaming_videos_pkey;
ALTER TABLE IF EXISTS ONLY public.schema_migrations DROP CONSTRAINT IF EXISTS schema_migrations_pkey;
ALTER TABLE IF EXISTS ONLY public.romanchuk_open_tournaments DROP CONSTRAINT IF EXISTS romanchuk_open_tournaments_pkey;
ALTER TABLE IF EXISTS ONLY public.romanchuk_open_players DROP CONSTRAINT IF EXISTS romanchuk_open_players_pkey;
Expand All @@ -55,6 +57,7 @@ ALTER TABLE IF EXISTS public.pghero_space_stats ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.pghero_query_stats ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.friendly_id_slugs ALTER COLUMN id DROP DEFAULT;
DROP TABLE IF EXISTS public.users;
DROP TABLE IF EXISTS public.streaming_videos;
DROP TABLE IF EXISTS public.schema_migrations;
DROP TABLE IF EXISTS public.romanchuk_open_tournaments;
DROP TABLE IF EXISTS public.romanchuk_open_players;
Expand Down Expand Up @@ -408,6 +411,23 @@ CREATE TABLE public.schema_migrations (
);


--
-- Name: streaming_videos; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.streaming_videos (
id uuid DEFAULT gen_random_uuid() NOT NULL,
key character varying NOT NULL,
content_type character varying,
title character varying,
description character varying,
slug character varying,
data jsonb DEFAULT '{}'::jsonb NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);


--
-- Name: users; Type: TABLE; Schema: public; Owner: -
--
Expand Down Expand Up @@ -572,6 +592,14 @@ ALTER TABLE ONLY public.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);


--
-- Name: streaming_videos streaming_videos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.streaming_videos
ADD CONSTRAINT streaming_videos_pkey PRIMARY KEY (id);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -727,6 +755,13 @@ CREATE INDEX index_romanchuk_open_players_on_slug ON public.romanchuk_open_playe
CREATE UNIQUE INDEX index_romanchuk_open_tournaments_on_slug ON public.romanchuk_open_tournaments USING btree (slug);


--
-- Name: index_streaming_videos_on_slug; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_streaming_videos_on_slug ON public.streaming_videos USING btree (slug);


--
-- Name: index_users_on_slug; Type: INDEX; Schema: public; Owner: -
--
Expand Down Expand Up @@ -765,6 +800,7 @@ ALTER TABLE ONLY public.gutentag_taggings
SET search_path TO "$user", public;

INSERT INTO "schema_migrations" (version) VALUES
('20240410050202'),
('20231231182200'),
('20231231065715'),
('20231231005449'),
Expand Down

0 comments on commit 8bae4c7

Please sign in to comment.