Working s3 compatible file uplaods!
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
defmodule Mixer.Repo.Migrations.AddUserIdToMediaAndAllowNullTweetId do
|
||||
@moduledoc """
|
||||
Updates resources based on their most recent snapshots.
|
||||
|
||||
This file was autogenerated with `mix ash_postgres.generate_migrations`
|
||||
"""
|
||||
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:media) do
|
||||
modify :tweet_id, :uuid, null: true
|
||||
|
||||
add :user_id,
|
||||
references(:users,
|
||||
column: :id,
|
||||
name: "media_user_id_fkey",
|
||||
type: :uuid,
|
||||
prefix: "public"
|
||||
), null: false
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
drop constraint(:media, "media_user_id_fkey")
|
||||
|
||||
alter table(:media) do
|
||||
remove :user_id
|
||||
modify :tweet_id, :uuid, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user