Sha256: e6cc84a19e55ca9ea9d6d43fd519ef70378bcd0a6403ac82a1759204e567876b

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

class Puppet::Rails::Database < ActiveRecord::Migration
    require 'sqlite3'

    def self.up
        if ActiveRecord::Migration.respond_to?(:verbose)
            ActiveRecord::Migration.verbose = false
        end

        create_table :rails_objects do |table|
            table.column :name, :string, :null => false
            table.column :ptype,  :string, :null => false
            table.column :tags, :string
            table.column :file, :string
            table.column :line, :integer
            table.column :host_id, :integer
            table.column :collectable, :boolean
        end

        create_table :rails_parameters do |table|
            table.column :name, :string, :null => false
            table.column :value,  :string, :null => false
            table.column :rails_object_id,  :integer
        end

        create_table :hosts do |table|
            table.column :name, :string, :null => false
            table.column :ip, :string
            table.column :facts, :string
            table.column :connect, :date
            table.column :success, :date
            table.column :classes, :string
        end
    end

    def self.down
        drop_table :rails_objects
        drop_table :rails_parameters
        drop_table :hosts
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puppet-0.18.4 lib/puppet/rails/database.rb