Sha256: f91a947f101006ca70b0f023fc69b15c5e54eee1416616dccba346cdb137cda9

Contents?: true

Size: 716 Bytes

Versions: 105

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

# Creation and updates timestamps for Ansible Roles
class AutomaticallySetRoleTimestamps < ActiveRecord::Migration[4.2]
  def up
    change_column :ansible_roles, :created_at, :datetime, :null => true,
                                                          :default => nil
    change_column :ansible_roles, :updated_at, :datetime, :null => true,
                                                          :default => nil
  end

  def down
    change_column :ansible_roles, :created_at, :datetime,
                  :null => false, :default => Time.now.utc
    change_column :ansible_roles, :updated_at, :datetime,
                  :null => false, :default => Time.now.utc
  end
end

Version data entries

105 entries across 105 versions & 1 rubygems

Version Path
foreman_ansible-3.0.0 db/migrate/20161122154057_automatically_set_role_timestamps.rb
foreman_ansible-2.3.3 db/migrate/20161122154057_automatically_set_role_timestamps.rb
foreman_ansible-2.3.2 db/migrate/20161122154057_automatically_set_role_timestamps.rb
foreman_ansible-2.3.1 db/migrate/20161122154057_automatically_set_role_timestamps.rb
foreman_ansible-2.3.0 db/migrate/20161122154057_automatically_set_role_timestamps.rb