def define
      namespace :db do
        desc "Write Null dimension records"
        task :create_null_records do
          # TODO: replace this with proper logging.
          warn "Loading NULL records."
          @schema.dimensions.each do |dimension| 
            dimension.create_null_records(@staging_db) 
          end
        end

        desc "Writes a migration file to change the database based on defined Facts & Dimensions"
        task :write_migrations do
          writer = Database::MigrationFileWriter.new
          writer.write_migration_file(@staging_db, @schema,
                                      staging_directory)

          if @presentation_db
            writer.write_migration_file(@presentation_db, @schema, 
                                        presentation_directory, false)
          end
        end
      end
    end
def define
      namespace :db do
        desc "Write Null dimension records"
        task :create_null_records do
          # TODO: replace this with proper logging.
          warn "Loading NULL records."
          @schema.dimensions.each do |dimension| 
            dimension.create_null_records(@staging_db) 
          end
        end

        desc "Writes a migration file to change the database based on defined Facts & Dimensions"
        task :write_migrations do
          writer = Database::MigrationFileWriter.new
          writer.write_migration_file(@staging_db, @schema,
                                      staging_directory)

          if @presentation_db
            writer.write_migration_file(@presentation_db, @schema, 
                                        presentation_directory, false)
          end
        end
      end
    end
Defines the rake tasks.

 @api private