From a03056863ef5a580801c3fa0f22054a776cfc6f7 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Thu, 7 Apr 2016 12:51:01 -0700 Subject: [PATCH] Commit migrations from domains --- migrations/085_gandi_contact_handle.rb | 14 ++++++++++++++ migrations/086_create_domains.rb | 23 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 migrations/085_gandi_contact_handle.rb create mode 100644 migrations/086_create_domains.rb diff --git a/migrations/085_gandi_contact_handle.rb b/migrations/085_gandi_contact_handle.rb new file mode 100644 index 00000000..a1f1a615 --- /dev/null +++ b/migrations/085_gandi_contact_handle.rb @@ -0,0 +1,14 @@ +Sequel.migration do + up { + DB.add_column :sites, :gandi_handle, :text, index: true + + # This is not as horrible as it looks. + # It basically serves as a temp password when account is released from reseller account. + DB.add_column :sites, :gandi_password, :text + } + + down { + DB.drop_column :sites, :gandi_handle + DB.drop_column :sites, :gandi_password + } +end diff --git a/migrations/086_create_domains.rb b/migrations/086_create_domains.rb new file mode 100644 index 00000000..0ce7c3db --- /dev/null +++ b/migrations/086_create_domains.rb @@ -0,0 +1,23 @@ +Sequel.migration do + up { + DB.drop_column :sites, :gandi_handle + DB.drop_column :sites, :gandi_password + + DB.create_table! :domains do + primary_key :id + Integer :site_id, index: true + String :gandi_handle + String :gandi_password + String :gandi_domain_id + String :name + DateTime :created_at + DateTime :released_at + end + } + + down { + DB.drop_table :domains + DB.add_column :sites, :gandi_handle, :text, index: true + DB.add_column :sites, :gandi_password, :text + } +end