aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/db/migrations/018_new_targets.rb')
-rw-r--r--web/db/migrations/018_new_targets.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/web/db/migrations/018_new_targets.rb b/web/db/migrations/018_new_targets.rb
new file mode 100644
index 0000000..b04ccac
--- /dev/null
+++ b/web/db/migrations/018_new_targets.rb
@@ -0,0 +1,22 @@
+Sequel.migration do
+ change do
+ add_column :packages, :sha1, String
+ add_column :builds, :target, String
+ add_column :repomans, :target, String
+ rename_column :builds, :time, :timestamp
+ rename_column :repomans, :time, :timestamp
+ rename_column :repomans, :current_result, :result
+ rename_column :repomans, :current_log, :log
+ drop_column :repomans, :next_result
+ drop_column :repomans, :next_log
+ drop_column :builds, :package_id
+ drop_column :repomans, :package_id
+ alter_table(:builds) do
+ add_foreign_key :package_id, :packages
+ end
+ alter_table(:repomans) do
+ add_foreign_key :package_id, :packages
+ end
+ end
+
+end