-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change waydowntown to share registrations database
Seems rickety!
- Loading branch information
Showing
13 changed files
with
174 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cd ../waydowntown/waydowntown_server | ||
bundle exec rake db:schema:dump | ||
bundle exec rubocop -A db/schema.rb > /dev/null | ||
echo "waydowntown server schema dumped successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
registrations/priv/repo/migrations/20240630162659_add_waydowntown_schema.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defmodule Registrations.Repo.Migrations.AddWaydowntownSchema do | ||
use Ecto.Migration | ||
|
||
def up do | ||
execute("CREATE SCHEMA waydowntown") | ||
end | ||
|
||
def down do | ||
execute("DROP SCHEMA waydowntown") | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
registrations/priv/repo/migrations/20240630162710_add_waydowntown_incarnations.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
defmodule Registrations.Repo.Migrations.AddWaydowntownIncarnations do | ||
use Ecto.Migration | ||
|
||
def change do | ||
create table(:incarnations, prefix: "waydowntown", primary_key: false) do | ||
add(:id, :uuid, primary_key: true, default: fragment("gen_random_uuid()")) | ||
add(:concept, :string) | ||
add(:mask, :string) | ||
add(:answer, :string) | ||
|
||
timestamps() | ||
end | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
registrations/priv/repo/migrations/20240630162715_add_waydowntown_games.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
defmodule Registrations.Repo.Migrations.AddWaydowntownGames do | ||
use Ecto.Migration | ||
|
||
def change do | ||
create table(:games, prefix: "waydowntown", primary_key: false) do | ||
add(:id, :uuid, primary_key: true, default: fragment("gen_random_uuid()")) | ||
add(:incarnation_id, references("incarnations", type: :uuid)) | ||
|
||
timestamps() | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
default: &default | ||
adapter: postgresql | ||
schema_search_path: "waydowntown,public" | ||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | ||
timeout: 5000 | ||
|
||
development: | ||
<<: *default | ||
database: waydowntown_development | ||
database: registrations_dev | ||
|
||
# Warning: The database defined as "test" will be erased and | ||
# re-generated from your development database when you run "rake". | ||
# Do not set this db to the same as development or production. | ||
test: | ||
<<: *default | ||
database: waydowntown_test | ||
database: registrations_test | ||
|
||
production: | ||
<<: *default | ||
database: waydowntown_production | ||
database: registrations_prod |
15 changes: 0 additions & 15 deletions
15
waydowntown/waydowntown_server/db/migrate/20240622195313_create_incarnations.rb
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
waydowntown/waydowntown_server/db/migrate/20240628151327_create_games.rb
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.