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 17:11:41 -08:00
committed by GitHub
parent 53bd8681c3
commit b81c8d64b3
29 changed files with 121 additions and 186 deletions
@@ -4,13 +4,13 @@ defmodule Pinchflat.Repo.Migrations.CreateTasks do
def change do
create table(:tasks) do
add :job_id, references(:oban_jobs, on_delete: :delete_all), null: false
# `restrict` because we need to be sure to delete pending tasks when a channel is deleted
add :channel_id, references(:channels, on_delete: :restrict), null: true
# `restrict` because we need to be sure to delete pending tasks when a source is deleted
add :source_id, references(:sources, on_delete: :restrict), null: true
timestamps(type: :utc_datetime)
end
create index(:tasks, [:job_id])
create index(:tasks, [:channel_id])
create index(:tasks, [:source_id])
end
end