styling, require a code for prompts, admin privs, ordering, filtering, jump-to-page
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
defmodule Diffuser.Repo.Migrations.AddCompletedStepsToPromptRequest do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:prompt_requests) do
|
||||
add :completed_steps, :integer
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,10 @@
|
||||
defmodule Diffuser.Repo.Migrations.AddQueueTimestampsToPromptRequest do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:prompt_requests) do
|
||||
add :began_at, :naive_datetime
|
||||
add :ended_at, :naive_datetime
|
||||
end
|
||||
end
|
||||
end
|
11
priv/repo/migrations/20220904223206_add_user_table.exs
Normal file
11
priv/repo/migrations/20220904223206_add_user_table.exs
Normal file
@@ -0,0 +1,11 @@
|
||||
defmodule Diffuser.Repo.Migrations.AddUserTable do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:users) do
|
||||
add :ip_address, :string
|
||||
add :username, :string
|
||||
timestamps()
|
||||
end
|
||||
end
|
||||
end
|
13
priv/repo/migrations/20220905174728_create_votes.exs
Normal file
13
priv/repo/migrations/20220905174728_create_votes.exs
Normal file
@@ -0,0 +1,13 @@
|
||||
defmodule Diffuser.Repo.Migrations.CreateVotes do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:votes) do
|
||||
add :prompt_request_id, references(:prompt_requests, on_delete: :nothing)
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
create index(:votes, [:prompt_request_id])
|
||||
end
|
||||
end
|
@@ -0,0 +1,9 @@
|
||||
defmodule Diffuser.Repo.Migrations.AddUserToVotes do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:votes) do
|
||||
add :user_id, references(:users)
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,9 @@
|
||||
defmodule Diffuser.Repo.Migrations.AddUserToPromptRequests do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:prompt_requests) do
|
||||
add :user_id, references(:users)
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,9 @@
|
||||
defmodule Diffuser.Repo.Migrations.AddCodeToUsers do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:users) do
|
||||
add :code, :string
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,9 @@
|
||||
defmodule Diffuser.Repo.Migrations.AddCodeToPromptRequests do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:prompt_requests) do
|
||||
add :code, :string
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user