On Thu, 2010-06-03 at 20:32 +0200, [email protected] wrote:
> From: Jan Provaznik <[email protected]>
> 
> - added models and migrations for image_descriptor and image_descriptor_target
> - added util/repository_manager.rb used for downloading/parsing  repository 
> xml files
> - added util/image_descriptor_xml.rb used for creating/parsing image xml file
> ---
> diff --git a/src/db/migrate/20100527095400_create_image_descriptors.rb 
> b/src/db/migrate/20100527095400_create_image_descriptors.rb
> new file mode 100644
> index 0000000..9f91629
> --- /dev/null
> +++ b/src/db/migrate/20100527095400_create_image_descriptors.rb
> @@ -0,0 +1,14 @@
> +class CreateImageDescriptors < ActiveRecord::Migration
> +  def self.up
> +    create_table :image_descriptors do |t|
> +      t.binary :xml, :null => false
> +      t.string :uri
> +      t.boolean :complete
One note I forgot:
Perhaps 'complete' should be defaulted to false ^, as that is what it is
until you finish all the steps in the form.  When I pulled back an
in-progress object from the rails console, I noticed it was nil, false
would be better (though yes, you could use nil as false, but I don't
think that is as deliberate).

> +      t.timestamps
> +    end
> +  end
> +
> +  def self.down
> +    drop_table :image_descriptors
> +  end
> +end
> diff --git a/src/db/migrate/20100527095428_create_image_descriptor_targets.rb 
> b/src/db/migrate/20100527095428_create_image_descriptor_targets.rb
> new file mode 100644
> index 0000000..2cb49da
> --- /dev/null
> +++ b/src/db/migrate/20100527095428_create_image_descriptor_targets.rb
> @@ -0,0 +1,15 @@
> +class CreateImageDescriptorTargets < ActiveRecord::Migration
> +  def self.up
> +    create_table :image_descriptor_targets do |t|
> +      t.string :name, :null => false
> +      t.integer :build_id
> +      t.string :status
> +      t.integer :image_descriptor_id
> +      t.timestamps
> +    end
> +  end
> +
> +  def self.down
> +    drop_table :image_descriptor_targets
> +  end
> +end

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to