Switch to sqlite (#22)

* Updated project to use sqlite

* Edited migrations directly because I fear no man

* Updated search functions and tests to work with sqlite

* Updated build tools to remove postgres
This commit is contained in:
Kieran
2024-02-16 10:11:41 -08:00
committed by GitHub
parent 44bd105e80
commit 8fcd41f45d
29 changed files with 121 additions and 186 deletions
@@ -1,17 +1,18 @@
defmodule Pinchflat.Repo.Migrations.CreateChannels do
defmodule Pinchflat.Repo.Migrations.CreateSources do
use Ecto.Migration
def change do
create table(:channels) do
create table(:sources) do
add :name, :string, null: false
add :channel_id, :string, null: false
add :collection_id, :string, null: false
add :collection_type, :string, null: false
add :original_url, :string, null: false
add :media_profile_id, references(:media_profiles, on_delete: :restrict), null: false
timestamps(type: :utc_datetime)
end
create index(:channels, [:media_profile_id])
create unique_index(:channels, [:channel_id, :media_profile_id])
create index(:sources, [:media_profile_id])
create unique_index(:sources, [:collection_id, :media_profile_id])
end
end