From 150517528813399ba1490923aaafdbc07e16fb8f Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Sun, 16 Feb 2014 11:55:11 +0600 Subject: [PATCH] Migration file based on #83 I choosed Rev3, because Rev2 will be about "open invitations" feature. --- .../201402211147_github_enterprise_support.go | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pkg/database/migrate/201402211147_github_enterprise_support.go diff --git a/pkg/database/migrate/201402211147_github_enterprise_support.go b/pkg/database/migrate/201402211147_github_enterprise_support.go new file mode 100644 index 00000000..2c2eb3a3 --- /dev/null +++ b/pkg/database/migrate/201402211147_github_enterprise_support.go @@ -0,0 +1,23 @@ +package migrate + +type Rev3 struct{} + +var GitHubEnterpriseSupport = &Rev3{} + +func (r *Rev3) Revision() int64 { + return 201402211147 +} + +func (r *Rev3) Up(op Operation) error { + _, err := op.AddColumn("settings", "github_domain VARCHAR(255)") + if err { + return err + } + _, err = op.AddColumn("settings", "github_apiurl VARCHAR(255)") + return err +} + +func (r *Rev3) Down(op Operation) error { + _, err := op.DropColumns("settings", []string{"github_domain", "github_apiurl"}) + return err +}