Skip to content

Commit

Permalink
Migrations: Add a ProjectionVersion for a different schema prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexocode committed Sep 29, 2017
1 parent 576ee4a commit cc584bf
Showing 1 changed file with 20 additions and 0 deletions.
@@ -0,0 +1,20 @@
defmodule Commanded.Projections.Repo.Migrations.CreateProjectionVersionWithPrefix do
use Ecto.Migration

def up do
execute "CREATE SCHEMA test"

create table(:projection_versions, primary_key: false, prefix: "test") do
add :projection_name, :text, primary_key: true
add :last_seen_event_number, :bigint

timestamps()
end
end

def down do
drop table(:projection_versions, prefix: "test")

execute "DROP SCHEMA test"
end
end

0 comments on commit cc584bf

Please sign in to comment.