-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental postgres backend to GitRekt.Git
See #2 for more details.
- Loading branch information
Showing
10 changed files
with
692 additions
and
24 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
apps/gitgud/priv/db/migrations/20190411211844_add_git_objects_table.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,13 @@ | ||
defmodule GitGud.DB.Migrations.AddGitObjectsTable do | ||
use Ecto.Migration | ||
|
||
def change do | ||
create table("git_objects", primary_key: false) do | ||
add :oid, :binary, primary_key: true | ||
add :repo_id, references("repositories", on_delete: :delete_all), primary_key: true | ||
add :type, :integer, null: false | ||
add :size, :integer, null: false | ||
add :data, :binary | ||
end | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
apps/gitgud/priv/db/migrations/20190411212320_add_git_references_table.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 GitGud.DB.Migrations.AddGitReferencesTable do | ||
use Ecto.Migration | ||
|
||
def change do | ||
create table("git_references", primary_key: false) do | ||
add :name, :string, primary_key: true | ||
add :repo_id, references("repositories", on_delete: :delete_all), primary_key: true | ||
add :symlink, :string | ||
add :oid, :binary | ||
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
Oops, something went wrong.