mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-04-29 07:48:43 +00:00
remove migs
This commit is contained in:
parent
a44ca78588
commit
a9be8e4148
|
@ -1,4 +0,0 @@
|
|||
[
|
||||
import_deps: [:ecto_sql],
|
||||
inputs: ["*.exs"]
|
||||
]
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.HelloWorld do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute("CREATE EXTENSION IF NOT EXISTS \"citext\"")
|
||||
end
|
||||
|
||||
def down do
|
||||
execute("DROP EXTENSION IF EXISTS \"citext\"")
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.InitPointers do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
import Needle.Migration
|
||||
import Needle.ULID.Migration
|
||||
|
||||
def up(), do: init(:up)
|
||||
def down(), do: init(:down)
|
||||
|
||||
defp init(dir) do
|
||||
# this one is optional but recommended
|
||||
init_pointers_ulid_extra(dir)
|
||||
# this one is not optional
|
||||
init_pointers(dir)
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.InitEdges do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
alias Bonfire.Data.Edges.Migration
|
||||
|
||||
def up do
|
||||
Migration.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Migration.down()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.CreateApTables do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
ActivityPub.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
ActivityPub.Migrations.down()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.CreateObanTables do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Oban.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Oban.Migrations.down(version: 1)
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
defmodule Bonfire.Federate.ActivityPub.Repo.Migrations.ImportAP do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Federate.ActivityPub.Migrations
|
||||
# accounts & users
|
||||
|
||||
def up, do: migrate_activity_pub()
|
||||
def down, do: migrate_activity_pub()
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
defmodule Bonfire.Boundaries.Repo.Migrations.ImportBoundaries do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Boundaries.Migrations
|
||||
|
||||
def up, do: migrate_boundaries()
|
||||
def down, do: migrate_boundaries()
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.AddFiles do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Files.Media.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Files.Media.Migrations.migrate_media()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Files.Media.Migrations.migrate_media()
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportMe do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Me.Migrations
|
||||
|
||||
def up do
|
||||
# accounts & users
|
||||
migrate_me()
|
||||
end
|
||||
|
||||
def down, do: migrate_me()
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.ImportSocial do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Social.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
migrate_social()
|
||||
end
|
||||
|
||||
def down, do: migrate_social()
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Tag do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Tag.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Tag.Migrations.down()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportClassify do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Classify.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Classify.Migrations.down()
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
defmodule Bonfire.Data.SharedUser.ImportSharedUser do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Data.SharedUser.Migration
|
||||
# accounts & users
|
||||
|
||||
def up, do: migrate_shared_user()
|
||||
def down, do: migrate_shared_user()
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Posts.Repo.Migrations.Import do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Posts.Migrations
|
||||
|
||||
def change, do: migrate_posts()
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Messages.Repo.MessagesMigrations do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Messages.Migrations
|
||||
|
||||
def change, do: migrate_messages()
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Social.Graph.Repo.Migrations.Import do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Social.Graph.Migrations
|
||||
|
||||
def change, do: migrate_social_graph()
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
defmodule ActivityPub.Repo.Migrations.APTestTable do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
# This table only exists for test purposes
|
||||
create table("local_actor", primary_key: false) do
|
||||
add(:id, :uuid, primary_key: true)
|
||||
add(:username, :citext)
|
||||
add(:data, :map)
|
||||
add(:local, :boolean)
|
||||
add(:keys, :text)
|
||||
add(:followers, {:array, :string})
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,23 +0,0 @@
|
|||
defmodule Bonfire.UI.Me.Repo.Migrations.ProfileImages do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
drop_if_exists(
|
||||
constraint("bonfire_data_social_profile", "bonfire_data_social_profile_icon_id_fkey")
|
||||
)
|
||||
|
||||
drop_if_exists(
|
||||
constraint("bonfire_data_social_profile", "bonfire_data_social_profile_image_id_fkey")
|
||||
)
|
||||
|
||||
alter table("bonfire_data_social_profile") do
|
||||
Ecto.Migration.add_if_not_exists(:icon_id, strong_pointer(Bonfire.Files.Media))
|
||||
Ecto.Migration.add_if_not_exists(:image_id, strong_pointer(Bonfire.Files.Media))
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,42 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.FeedPublish do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute("create or replace function
|
||||
column_exists(ptable text, pcolumn text, pschema text default 'public')
|
||||
returns boolean
|
||||
language sql stable strict
|
||||
as $body$
|
||||
-- does the requested table.column exist in schema?
|
||||
select exists
|
||||
( select null
|
||||
from information_schema.columns
|
||||
where table_name=ptable
|
||||
and column_name=pcolumn
|
||||
and table_schema=pschema
|
||||
);
|
||||
$body$;")
|
||||
|
||||
execute(
|
||||
"CREATE OR REPLACE FUNCTION rename_column_if_exists(ptable TEXT, pcolumn TEXT, new_name TEXT)
|
||||
RETURNS VOID AS $BODY$
|
||||
BEGIN
|
||||
-- Rename the column if it exists.
|
||||
IF column_exists(ptable, pcolumn) THEN
|
||||
EXECUTE FORMAT('ALTER TABLE IF EXISTS %I RENAME COLUMN %I TO %I;',
|
||||
ptable, pcolumn, new_name);
|
||||
END IF;
|
||||
END$BODY$
|
||||
LANGUAGE plpgsql VOLATILE;"
|
||||
)
|
||||
|
||||
flush()
|
||||
|
||||
execute(
|
||||
"SELECT rename_column_if_exists('bonfire_data_social_feed_publish', 'object_id', 'activity_id') "
|
||||
)
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
defmodule Bonfire.Federate.ActivityPub.Repo.Migrations.PeeredURI do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
alter table("bonfire_data_activity_pub_peered") do
|
||||
Ecto.Migration.add_if_not_exists(:canonical_uri, :text, null: true)
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportApActivity do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
import Bonfire.Data.Social.APActivity.Migration
|
||||
|
||||
def up(), do: migrate_apactivity()
|
||||
def down(), do: migrate_apactivity()
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportInviteLink do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Invites.Link.Migration.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Invites.Link.Migration.down()
|
||||
end
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Data.Identity.Repo.Migrations.CareClosure do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
alias Bonfire.Data.Identity.CareClosure.Migration
|
||||
|
||||
def change, do: Migration.migrate_care_closure_view()
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportSettings do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Data.Identity.Settings.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Data.Identity.Settings.Migration.migrate_settings(:up)
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Data.Identity.Settings.Migration.migrate_settings(:down)
|
||||
end
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.AddFilesMixin do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Files.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
# cleanup old stuff
|
||||
alter table("bonfire_files_media") do
|
||||
remove_if_exists(:created_at, :utc_datetime_usec)
|
||||
remove_if_exists(:updated_at, :utc_datetime_usec)
|
||||
end
|
||||
|
||||
Bonfire.Files.Migrations.migrate_files()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Files.Migrations.migrate_files()
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Pages.Repo.Migrations.ImportPages do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Pages.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
migrate_pages()
|
||||
end
|
||||
|
||||
def down, do: migrate_pages()
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule ActivityPub.Repo.Migrations.AddObjectBoolean do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
ActivityPub.Migrations.add_object_boolean()
|
||||
end
|
||||
|
||||
def down do
|
||||
ActivityPub.Migrations.drop_object_boolean()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ClassifyAddType do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Classify.Migrations.add_type()
|
||||
end
|
||||
|
||||
def down do
|
||||
# TODO
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ClassifyAddTree do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Classify.Tree.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Classify.Tree.Migration.migrate_tree()
|
||||
Bonfire.Classify.Tree.Migration.migrate_functions()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Classify.Tree.Migration.migrate_functions()
|
||||
Bonfire.Classify.Tree.Migration.migrate_tree()
|
||||
end
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.AddVersions do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
Bonfire.Social.Migrations.add_paper_trail()
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Alias do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Data.Identity.Alias.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Data.Identity.Alias.Migration.migrate_alias()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Data.Identity.Alias.Migration.migrate_alias()
|
||||
end
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.ArrayFn do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up, do: Bonfire.Social.Migrations.add_array_reverse_fn()
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.RepliedTotal do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up, do: Bonfire.Data.Social.Replied.Migration.add_generated_total_column()
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.InstanceAdminUser do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
alter table("bonfire_data_access_control_instance_admin") do
|
||||
Ecto.Migration.add_if_not_exists(:user_id, weak_pointer(Needle.Pointer))
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Sensitive do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Data.Social.Sensitive.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Data.Social.Sensitive.Migration.migrate_sensitive()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Data.Social.Sensitive.Migration.migrate_sensitive()
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesFixturesUp do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Boundaries.Fixtures
|
||||
|
||||
def up, do: Bonfire.Boundaries.Fixtures.insert()
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesUsersFixturesUp do
|
||||
use Ecto.Migration
|
||||
|
||||
def up() do
|
||||
Bonfire.Boundaries.FixturesUsersMigrations.up()
|
||||
end
|
||||
|
||||
def down, do: :ok
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
defmodule Bonfire.Files.Repo.Migrations.FilesRefactor do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
alter table("bonfire_files_media") do
|
||||
Ecto.Migration.add_if_not_exists(:file, :jsonb)
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.UpdateOban12 do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up, do: Oban.Migrations.up(version: 12)
|
||||
|
||||
def down, do: Oban.Migrations.down(version: 11)
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
defmodule Bonfire.Data.Identity.Repo.Migrations.SettingsJson do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
alter table("bonfire_data_identity_settings") do
|
||||
Ecto.Migration.add_if_not_exists(:json, :jsonb)
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Hashtag do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Tag.Hashtag.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Tag.Hashtag.Migration.migrate_hashtag()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Tag.Hashtag.Migration.migrate_hashtag()
|
||||
end
|
||||
end
|
|
@ -1,48 +0,0 @@
|
|||
defmodule Bonfire.Search.Repo.Migrations.GinIndexes do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
@disable_migration_lock true
|
||||
# ^ Needed to migrate indexes concurrently.
|
||||
# Disabling DDL transactions removes the guarantee that all of the changes in the migration will happen at once.
|
||||
# Disabling the migration lock removes the guarantee only a single node will run a given migration if multiple nodes are attempting to migrate at the same time.
|
||||
|
||||
def up do
|
||||
execute "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
|
||||
|
||||
create_index("bonfire_data_social_named", "name")
|
||||
create_index("bonfire_data_identity_character", "username")
|
||||
|
||||
# create_index("bonfire_data_social_profile", "name")
|
||||
create_index_fields(
|
||||
"bonfire_data_social_profile",
|
||||
"name gin_trgm_ops, summary gin_trgm_ops"
|
||||
)
|
||||
|
||||
create_index_fields(
|
||||
"bonfire_data_social_post_content",
|
||||
# "name gin_trgm_ops, summary gin_trgm_ops, html_body gin_trgm_ops"
|
||||
"name gin_trgm_ops, summary gin_trgm_ops"
|
||||
)
|
||||
end
|
||||
|
||||
def down do
|
||||
# TODO
|
||||
end
|
||||
|
||||
def create_index(table, field) do
|
||||
create_index_fields(table, "#{field} gin_trgm_ops")
|
||||
end
|
||||
|
||||
def create_index_fields(table, fields) do
|
||||
execute """
|
||||
DROP INDEX IF EXISTS #{table}_gin_index;
|
||||
"""
|
||||
|
||||
execute """
|
||||
CREATE INDEX CONCURRENTLY #{table}_gin_index
|
||||
ON #{table}
|
||||
USING gin (#{fields});
|
||||
"""
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Label do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Label.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Label.Migration.migrate_label()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Label.Migration.migrate_label()
|
||||
end
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
[
|
||||
import_deps: [:ecto_sql],
|
||||
inputs: ["*.exs"]
|
||||
]
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.HelloWorld do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute("CREATE EXTENSION IF NOT EXISTS \"citext\"")
|
||||
end
|
||||
|
||||
def down do
|
||||
execute("DROP EXTENSION IF EXISTS \"citext\"")
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.InitPointers do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
import Needle.Migration
|
||||
import Needle.ULID.Migration
|
||||
|
||||
def up(), do: init(:up)
|
||||
def down(), do: init(:down)
|
||||
|
||||
defp init(dir) do
|
||||
# this one is optional but recommended
|
||||
init_pointers_ulid_extra(dir)
|
||||
# this one is not optional
|
||||
init_pointers(dir)
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.InitEdges do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
alias Bonfire.Data.Edges.Migration
|
||||
|
||||
def up do
|
||||
Migration.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Migration.down()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.CreateApTables do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
ActivityPub.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
ActivityPub.Migrations.down()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.CreateObanTables do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Oban.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Oban.Migrations.down(version: 1)
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
defmodule Bonfire.Federate.ActivityPub.Repo.Migrations.ImportAP do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Federate.ActivityPub.Migrations
|
||||
# accounts & users
|
||||
|
||||
def up, do: migrate_activity_pub()
|
||||
def down, do: migrate_activity_pub()
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
defmodule Bonfire.Boundaries.Repo.Migrations.ImportBoundaries do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Boundaries.Migrations
|
||||
|
||||
def up, do: migrate_boundaries()
|
||||
def down, do: migrate_boundaries()
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.AddFiles do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Files.Media.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Files.Media.Migrations.migrate_media()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Files.Media.Migrations.migrate_media()
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportMe do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Me.Migrations
|
||||
|
||||
def up do
|
||||
# accounts & users
|
||||
migrate_me()
|
||||
end
|
||||
|
||||
def down, do: migrate_me()
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.ImportSocial do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Social.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
migrate_social()
|
||||
end
|
||||
|
||||
def down, do: migrate_social()
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Tag do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Tag.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Tag.Migrations.down()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportClassify do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Classify.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Classify.Migrations.down()
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
defmodule Bonfire.Data.SharedUser.ImportSharedUser do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Data.SharedUser.Migration
|
||||
# accounts & users
|
||||
|
||||
def up, do: migrate_shared_user()
|
||||
def down, do: migrate_shared_user()
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Posts.Repo.Migrations.Import do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Posts.Migrations
|
||||
|
||||
def change, do: migrate_posts()
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Messages.Repo.MessagesMigrations do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Messages.Migrations
|
||||
|
||||
def change, do: migrate_messages()
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Social.Graph.Repo.Migrations.Import do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Social.Graph.Migrations
|
||||
|
||||
def change, do: migrate_social_graph()
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
defmodule ActivityPub.Repo.Migrations.APTestTable do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
# This table only exists for test purposes
|
||||
create table("local_actor", primary_key: false) do
|
||||
add(:id, :uuid, primary_key: true)
|
||||
add(:username, :citext)
|
||||
add(:data, :map)
|
||||
add(:local, :boolean)
|
||||
add(:keys, :text)
|
||||
add(:followers, {:array, :string})
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,23 +0,0 @@
|
|||
defmodule Bonfire.UI.Me.Repo.Migrations.ProfileImages do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
drop_if_exists(
|
||||
constraint("bonfire_data_social_profile", "bonfire_data_social_profile_icon_id_fkey")
|
||||
)
|
||||
|
||||
drop_if_exists(
|
||||
constraint("bonfire_data_social_profile", "bonfire_data_social_profile_image_id_fkey")
|
||||
)
|
||||
|
||||
alter table("bonfire_data_social_profile") do
|
||||
Ecto.Migration.add_if_not_exists(:icon_id, strong_pointer(Bonfire.Files.Media))
|
||||
Ecto.Migration.add_if_not_exists(:image_id, strong_pointer(Bonfire.Files.Media))
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,42 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.FeedPublish do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute("create or replace function
|
||||
column_exists(ptable text, pcolumn text, pschema text default 'public')
|
||||
returns boolean
|
||||
language sql stable strict
|
||||
as $body$
|
||||
-- does the requested table.column exist in schema?
|
||||
select exists
|
||||
( select null
|
||||
from information_schema.columns
|
||||
where table_name=ptable
|
||||
and column_name=pcolumn
|
||||
and table_schema=pschema
|
||||
);
|
||||
$body$;")
|
||||
|
||||
execute(
|
||||
"CREATE OR REPLACE FUNCTION rename_column_if_exists(ptable TEXT, pcolumn TEXT, new_name TEXT)
|
||||
RETURNS VOID AS $BODY$
|
||||
BEGIN
|
||||
-- Rename the column if it exists.
|
||||
IF column_exists(ptable, pcolumn) THEN
|
||||
EXECUTE FORMAT('ALTER TABLE IF EXISTS %I RENAME COLUMN %I TO %I;',
|
||||
ptable, pcolumn, new_name);
|
||||
END IF;
|
||||
END$BODY$
|
||||
LANGUAGE plpgsql VOLATILE;"
|
||||
)
|
||||
|
||||
flush()
|
||||
|
||||
execute(
|
||||
"SELECT rename_column_if_exists('bonfire_data_social_feed_publish', 'object_id', 'activity_id') "
|
||||
)
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
defmodule Bonfire.Federate.ActivityPub.Repo.Migrations.PeeredURI do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
alter table("bonfire_data_activity_pub_peered") do
|
||||
Ecto.Migration.add_if_not_exists(:canonical_uri, :text, null: true)
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportApActivity do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
import Bonfire.Data.Social.APActivity.Migration
|
||||
|
||||
def up(), do: migrate_apactivity()
|
||||
def down(), do: migrate_apactivity()
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportInviteLink do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Invites.Link.Migration.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Invites.Link.Migration.down()
|
||||
end
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Data.Identity.Repo.Migrations.CareClosure do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
alias Bonfire.Data.Identity.CareClosure.Migration
|
||||
|
||||
def change, do: Migration.migrate_care_closure_view()
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportSettings do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Data.Identity.Settings.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Data.Identity.Settings.Migration.migrate_settings(:up)
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Data.Identity.Settings.Migration.migrate_settings(:down)
|
||||
end
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.AddFilesMixin do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Files.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
# cleanup old stuff
|
||||
alter table("bonfire_files_media") do
|
||||
remove_if_exists(:created_at, :utc_datetime_usec)
|
||||
remove_if_exists(:updated_at, :utc_datetime_usec)
|
||||
end
|
||||
|
||||
Bonfire.Files.Migrations.migrate_files()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Files.Migrations.migrate_files()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule ActivityPub.Repo.Migrations.AddObjectBoolean do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
ActivityPub.Migrations.add_object_boolean()
|
||||
end
|
||||
|
||||
def down do
|
||||
ActivityPub.Migrations.drop_object_boolean()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ClassifyAddType do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Classify.Migrations.add_type()
|
||||
end
|
||||
|
||||
def down do
|
||||
# TODO
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ClassifyAddTree do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Classify.Tree.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Classify.Tree.Migration.migrate_tree()
|
||||
Bonfire.Classify.Tree.Migration.migrate_functions()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Classify.Tree.Migration.migrate_functions()
|
||||
Bonfire.Classify.Tree.Migration.migrate_tree()
|
||||
end
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.AddVersions do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
Bonfire.Social.Migrations.add_paper_trail()
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Alias do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Data.Identity.Alias.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Data.Identity.Alias.Migration.migrate_alias()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Data.Identity.Alias.Migration.migrate_alias()
|
||||
end
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.ArrayFn do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up, do: Bonfire.Social.Migrations.add_array_reverse_fn()
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.RepliedTotal do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up, do: Bonfire.Data.Social.Replied.Migration.add_generated_total_column()
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.InstanceAdminUser do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
alter table("bonfire_data_access_control_instance_admin") do
|
||||
Ecto.Migration.add_if_not_exists(:user_id, weak_pointer(Needle.Pointer))
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Sensitive do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Data.Social.Sensitive.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Data.Social.Sensitive.Migration.migrate_sensitive()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Data.Social.Sensitive.Migration.migrate_sensitive()
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesFixturesUp do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Boundaries.Fixtures
|
||||
|
||||
def up, do: Bonfire.Boundaries.Fixtures.insert()
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
defmodule Bonfire.Boundaries.Repo.Migrations.BoundariesUsersFixturesUp do
|
||||
use Ecto.Migration
|
||||
|
||||
def up() do
|
||||
Bonfire.Boundaries.FixturesUsersMigrations.up()
|
||||
end
|
||||
|
||||
def down, do: :ok
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
defmodule Bonfire.Files.Repo.Migrations.FilesRefactor do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
alter table("bonfire_files_media") do
|
||||
Ecto.Migration.add_if_not_exists(:file, :jsonb)
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.UpdateOban12 do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up, do: Oban.Migrations.up(version: 12)
|
||||
|
||||
def down, do: Oban.Migrations.down(version: 11)
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
defmodule Bonfire.Data.Identity.Repo.Migrations.SettingsJson do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
alter table("bonfire_data_identity_settings") do
|
||||
Ecto.Migration.add_if_not_exists(:json, :jsonb)
|
||||
end
|
||||
end
|
||||
|
||||
def down, do: nil
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Hashtag do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Tag.Hashtag.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Tag.Hashtag.Migration.migrate_hashtag()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Tag.Hashtag.Migration.migrate_hashtag()
|
||||
end
|
||||
end
|
|
@ -1,48 +0,0 @@
|
|||
defmodule Bonfire.Search.Repo.Migrations.GinIndexes do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
@disable_migration_lock true
|
||||
# ^ Needed to migrate indexes concurrently.
|
||||
# Disabling DDL transactions removes the guarantee that all of the changes in the migration will happen at once.
|
||||
# Disabling the migration lock removes the guarantee only a single node will run a given migration if multiple nodes are attempting to migrate at the same time.
|
||||
|
||||
def up do
|
||||
execute "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
|
||||
|
||||
create_index("bonfire_data_social_named", "name")
|
||||
create_index("bonfire_data_identity_character", "username")
|
||||
|
||||
# create_index("bonfire_data_social_profile", "name")
|
||||
create_index_fields(
|
||||
"bonfire_data_social_profile",
|
||||
"name gin_trgm_ops, summary gin_trgm_ops"
|
||||
)
|
||||
|
||||
create_index_fields(
|
||||
"bonfire_data_social_post_content",
|
||||
# "name gin_trgm_ops, summary gin_trgm_ops, html_body gin_trgm_ops"
|
||||
"name gin_trgm_ops, summary gin_trgm_ops"
|
||||
)
|
||||
end
|
||||
|
||||
def down do
|
||||
# TODO
|
||||
end
|
||||
|
||||
def create_index(table, field) do
|
||||
create_index_fields(table, "#{field} gin_trgm_ops")
|
||||
end
|
||||
|
||||
def create_index_fields(table, fields) do
|
||||
execute """
|
||||
DROP INDEX IF EXISTS #{table}_gin_index;
|
||||
"""
|
||||
|
||||
execute """
|
||||
CREATE INDEX CONCURRENTLY #{table}_gin_index
|
||||
ON #{table}
|
||||
USING gin (#{fields});
|
||||
"""
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Label do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
require Bonfire.Label.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Label.Migration.migrate_label()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Label.Migration.migrate_label()
|
||||
end
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
[
|
||||
import_deps: [:ecto_sql],
|
||||
inputs: ["*.exs"]
|
||||
]
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.HelloWorld do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute("CREATE EXTENSION IF NOT EXISTS \"citext\"")
|
||||
end
|
||||
|
||||
def down do
|
||||
execute("DROP EXTENSION IF EXISTS \"citext\"")
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.InitPointers do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
import Needle.Migration
|
||||
import Needle.ULID.Migration
|
||||
|
||||
def up(), do: init(:up)
|
||||
def down(), do: init(:down)
|
||||
|
||||
defp init(dir) do
|
||||
# this one is optional but recommended
|
||||
init_pointers_ulid_extra(dir)
|
||||
# this one is not optional
|
||||
init_pointers(dir)
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.InitEdges do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
alias Bonfire.Data.Edges.Migration
|
||||
|
||||
def up do
|
||||
Migration.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Migration.down()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.CreateApTables do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
ActivityPub.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
ActivityPub.Migrations.down()
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.CreateObanTables do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Oban.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Oban.Migrations.down(version: 1)
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
defmodule Bonfire.Federate.ActivityPub.Repo.Migrations.ImportAP do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Federate.ActivityPub.Migrations
|
||||
# accounts & users
|
||||
|
||||
def up, do: migrate_activity_pub()
|
||||
def down, do: migrate_activity_pub()
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
defmodule Bonfire.Boundaries.Repo.Migrations.ImportBoundaries do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Boundaries.Migrations
|
||||
|
||||
def up, do: migrate_boundaries()
|
||||
def down, do: migrate_boundaries()
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.AddFiles do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Files.Media.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Files.Media.Migrations.migrate_media()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Files.Media.Migrations.migrate_media()
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.ImportMe do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Me.Migrations
|
||||
|
||||
def up do
|
||||
# accounts & users
|
||||
migrate_me()
|
||||
end
|
||||
|
||||
def down, do: migrate_me()
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
defmodule Bonfire.Social.Repo.Migrations.ImportSocial do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Social.Migrations
|
||||
import Needle.Migration
|
||||
|
||||
def up do
|
||||
migrate_social()
|
||||
end
|
||||
|
||||
def down, do: migrate_social()
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
defmodule Bonfire.Repo.Migrations.Tag do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
Bonfire.Tag.Migrations.up()
|
||||
end
|
||||
|
||||
def down do
|
||||
Bonfire.Tag.Migrations.down()
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
defmodule Bonfire.Breadpub.Repo.Migrations.ImportMe do
|
||||
@moduledoc false
|
||||
use Ecto.Migration
|
||||
|
||||
import Bonfire.Breadpub.Migration
|
||||
# accounts & users
|
||||
|
||||
def change, do: migrate_me
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue