mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Commit migrations from domains
This commit is contained in:
parent
02ecd19f58
commit
a03056863e
2 changed files with 37 additions and 0 deletions
14
migrations/085_gandi_contact_handle.rb
Normal file
14
migrations/085_gandi_contact_handle.rb
Normal file
|
@ -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
|
23
migrations/086_create_domains.rb
Normal file
23
migrations/086_create_domains.rb
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue