320b25f5b6
* Add media streaming (#108) * [WIP] set up streaming route * Added UUID to sources and media items * Added media preview to MI show page * Added plug to strip file extensions * [VERY WIP] basic podcast RSS setup * [WIP] got basic podcast RSS working * [WIP] more expanding on RSS * Comment * [WIP] Working on refactoring feed * Added UUID backfill to a migration * [WIP] Moar refactoring * [WIP] Adding UI for getting RSS feed * Many tests * Added conditional routing for feed URLs * Removed the need for url_base to be set * Updated preset name * Rendered certain fields HTML-safe; Added logging to confirm range request support * Fixed incorrect scheme issue * Updated env var * Updated other UI to use dropdown * removed commented code * Generate rss feeds (#123) * Added plug to strip file extensions * [VERY WIP] basic podcast RSS setup * [WIP] got basic podcast RSS working * [WIP] more expanding on RSS * [WIP] Working on refactoring feed * Added UUID backfill to a migration * [WIP] Moar refactoring * [WIP] Adding UI for getting RSS feed * Many tests * Added conditional routing for feed URLs * Removed the need for url_base to be set * Updated preset name * Rendered certain fields HTML-safe; Added logging to confirm range request support * Fixed incorrect scheme issue * Updated env var * Updated other UI to use dropdown * removed commented code * docs * Added unique index to UUID fields
14 lines
381 B
Elixir
14 lines
381 B
Elixir
defmodule Pinchflat.Repo.Migrations.BackfillContentUuids do
|
|
use Ecto.Migration
|
|
|
|
def up do
|
|
execute("UPDATE sources SET uuid = gen_random_uuid() WHERE uuid IS NULL")
|
|
execute("UPDATE media_items SET uuid = gen_random_uuid() WHERE uuid IS NULL")
|
|
end
|
|
|
|
def down do
|
|
execute("UPDATE sources SET uuid = NULL")
|
|
execute("UPDATE media_items SET uuid = NULL")
|
|
end
|
|
end
|