init commit
This commit is contained in:
4
priv/repo/migrations/.formatter.exs
Normal file
4
priv/repo/migrations/.formatter.exs
Normal file
@@ -0,0 +1,4 @@
|
||||
[
|
||||
import_deps: [:ecto_sql],
|
||||
inputs: ["*.exs"]
|
||||
]
|
@@ -0,0 +1,13 @@
|
||||
defmodule Diffuser.Repo.Migrations.CreatePromptRequests do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:prompt_requests, primary_key: false) do
|
||||
add :id, :uuid, primary_key: true, null: false
|
||||
|
||||
add :prompt, :string
|
||||
|
||||
timestamps()
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,9 @@
|
||||
defmodule Diffuser.Repo.Migrations.AddStatusToPromptRequest do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:prompt_requests) do
|
||||
add :status, :string
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,13 @@
|
||||
defmodule Diffuser.Repo.Migrations.CreatePromptRequestResult do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:prompt_request_results, primary_key: false) do
|
||||
add :id, :uuid, primary_key: true, null: false
|
||||
add :image, :string
|
||||
add :prompt_request_id, references(:prompt_requests, type: :uuid)
|
||||
|
||||
timestamps()
|
||||
end
|
||||
end
|
||||
end
|
11
priv/repo/seeds.exs
Normal file
11
priv/repo/seeds.exs
Normal file
@@ -0,0 +1,11 @@
|
||||
# Script for populating the database. You can run it as:
|
||||
#
|
||||
# mix run priv/repo/seeds.exs
|
||||
#
|
||||
# Inside the script, you can read and write to any of your
|
||||
# repositories directly:
|
||||
#
|
||||
# Diffuser.Repo.insert!(%Diffuser.SomeSchema{})
|
||||
#
|
||||
# We recommend using the bang functions (`insert!`, `update!`
|
||||
# and so on) as they will fail if something goes wrong.
|
Reference in New Issue
Block a user