db/migrate/20131014135042_katello_tables.rb in katello-2.4.5 vs db/migrate/20131014135042_katello_tables.rb in katello-3.0.0.rc1

- old
+ new

@@ -1,11 +1,11 @@ class KatelloTables < ActiveRecord::Migration def self.up create_table "katello_activation_keys", :force => true do |t| - t.string "name" + t.string "name", :limit => 255 t.text "description" t.integer "organization_id", :null => false t.integer "environment_id", :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false @@ -37,18 +37,18 @@ add_index "katello_changeset_users", ["changeset_id"], :name => "index_changeset_users_on_changeset_id" add_index "katello_changeset_users", ["user_id"], :name => "index_changeset_users_on_user_id" create_table "katello_changesets", :force => true do |t| t.integer "environment_id" - t.string "name" + t.string "name", :limit => 255 t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.datetime "promotion_date" - t.string "state", :default => "new", :null => false + t.string "state", :default => "new", :null => false, :limit => 255 t.integer "task_status_id" t.text "description" - t.string "type", :default => "Katello::PromotionChangeset" + t.string "type", :default => "Katello::PromotionChangeset", :limit => 255 end add_index "katello_changesets", ["environment_id"], :name => "index_changesets_on_environment_id" add_index "katello_changesets", ["name", "environment_id"], :name => "index_changesets_on_name_and_environment_id", :unique => true add_index "katello_changesets", ["task_status_id"], :name => "index_changesets_on_task_status_id" @@ -61,18 +61,18 @@ end add_index "katello_component_content_views", ["content_view_definition_id", "content_view_id"], :name => "component_content_views_index" create_table "katello_content_view_definition_bases", :force => true do |t| - t.string "name" - t.string "label", :null => false + t.string "name", :limit => 255 + t.string "label", :null => false, :limit => 255 t.text "description" t.integer "organization_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.boolean "composite", :default => false, :null => false - t.string "type" + t.string "type", :limit => 255 t.integer "source_id" end add_index "katello_content_view_definition_bases", ["name", "organization_id"], :name => "index_content_view_definitions_on_name_and_organization_id" @@ -93,13 +93,13 @@ end add_index "katello_content_view_definition_repositories", ["content_view_definition_id", "repository_id"], :name => "cvd_repo_index" create_table "katello_content_view_environments", :force => true do |t| - t.string "name" - t.string "label", :null => false - t.string "cp_id" + t.string "name", :limit => 255 + t.string "label", :null => false, :limit => 255 + t.string "cp_id", :limit => 255 t.integer "content_view_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "environment_id", :null => false end @@ -127,12 +127,12 @@ end add_index "katello_content_view_versions", ["id", "content_view_id"], :name => "cvv_cv_index" create_table "katello_content_views", :force => true do |t| - t.string "name" - t.string "label", :null => false + t.string "name", :limit => 255 + t.string "label", :null => false, :limit => 255 t.text "description" t.integer "content_view_definition_id" t.integer "organization_id" t.boolean "default", :default => false, :null => false t.datetime "created_at", :null => false @@ -143,14 +143,14 @@ add_index "katello_content_views", ["name", "organization_id"], :name => "index_content_views_on_name_and_organization_id" add_index "katello_content_views", ["organization_id", "label"], :name => "index_content_views_on_organization_id_and_label", :unique => true add_index "katello_content_views", ["organization_id"], :name => "index_content_views_on_organization_id" create_table "katello_custom_info", :force => true do |t| - t.string "keyname" - t.string "value", :default => "" + t.string "keyname", :limit => 255 + t.string "value", :default => "", :limit => 255 t.integer "informable_id" - t.string "informable_type" + t.string "informable_type", :limit => 255 t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.boolean "org_default", :default => false end @@ -162,23 +162,23 @@ t.text "handler" t.text "last_error" t.datetime "run_at" t.datetime "locked_at" t.datetime "failed_at" - t.string "locked_by" + t.string "locked_by", :limit => 255 t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "queue" + t.string "queue", :limit => 255 end add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" create_table "katello_distributors", :force => true do |t| - t.string "uuid" - t.string "name" + t.string "uuid", :limit => 255 + t.string "name", :limit => 255 t.text "description" - t.string "location" + t.string "location", :limit => 255 t.integer "environment_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "content_view_id" end @@ -193,25 +193,25 @@ add_index "katello_environment_priors", ["environment_id"], :name => "index_environment_priors_on_environment_id" add_index "katello_environment_priors", ["prior_id"], :name => "index_environment_priors_on_prior_id" create_table "katello_environments", :force => true do |t| - t.string "name", :null => false + t.string "name", :null => false, :limit => 255 t.text "description" t.boolean "library", :default => false, :null => false t.integer "organization_id", :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "label", :null => false + t.string "label", :null => false, :limit => 255 end add_index "katello_environments", ["label", "organization_id"], :name => "index_environments_on_label_and_organization_id", :unique => true add_index "katello_environments", ["name", "organization_id"], :name => "index_environments_on_name_and_organization_id", :unique => true add_index "katello_environments", ["organization_id"], :name => "index_environments_on_organization_id" create_table "katello_filter_rules", :force => true do |t| - t.string "type" + t.string "type", :limit => 255 t.text "parameters" t.integer "filter_id", :null => false t.boolean "inclusion", :default => true t.datetime "created_at", :null => false t.datetime "updated_at", :null => false @@ -219,11 +219,11 @@ add_index "katello_filter_rules", ["filter_id"], :name => "index_filter_rules_on_filter_id" create_table "katello_filters", :force => true do |t| t.integer "content_view_definition_id" - t.string "name", :null => false + t.string "name", :null => false, :limit => 255 t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end add_index "katello_filters", ["content_view_definition_id"], :name => "index_filters_on_content_view_definition_id" @@ -246,21 +246,21 @@ add_index "katello_filters_repositories", ["filter_id", "repository_id"], :name => "index_filters_repositories_on_filter_id_and_repository_id", :unique => true add_index "katello_filters_repositories", ["filter_id"], :name => "index_filters_repositories_on_filter_id" add_index "katello_filters_repositories", ["repository_id"], :name => "index_filters_repositories_on_repository_id" create_table "katello_gpg_keys", :force => true do |t| - t.string "name", :null => false + t.string "name", :null => false, :limit => 255 t.integer "organization_id", :null => false t.text "content", :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end add_index "katello_gpg_keys", ["organization_id", "name"], :name => "index_gpg_keys_on_organization_id_and_name", :unique => true create_table "katello_help_tips", :force => true do |t| - t.string "key" + t.string "key", :limit => 255 t.integer "user_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end @@ -274,12 +274,12 @@ add_index "katello_job_tasks", ["job_id"], :name => "index_job_tasks_on_job_id" add_index "katello_job_tasks", ["task_status_id"], :name => "index_job_tasks_on_task_status_id" create_table "katello_jobs", :force => true do |t| t.integer "job_owner_id" - t.string "job_owner_type" - t.string "pulp_id", :null => false + t.string "job_owner_type", :limit => 255 + t.string "pulp_id", :null => false, :limit => 255 end add_index "katello_jobs", ["job_owner_id"], :name => "index_jobs_on_job_owner_id" add_index "katello_jobs", ["pulp_id"], :name => "index_jobs_on_pulp_id" @@ -309,84 +309,84 @@ create_table "katello_notices", :force => true do |t| t.string "text", :limit => 1024, :null => false t.text "details" t.boolean "global", :default => false, :null => false - t.string "level", :null => false + t.string "level", :null => false, :limit => 255 t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "request_type" + t.string "request_type", :limit => 255 t.integer "organization_id" end add_index "katello_notices", ["organization_id"], :name => "index_notices_on_organization_id" create_table "katello_pools", :force => true do |t| - t.string "cp_id", :null => false + t.string "cp_id", :null => false, :limit => 255 t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end add_index "katello_pools", ["cp_id"], :name => "index_pools_on_cp_id" create_table "katello_products", :force => true do |t| - t.string "name" + t.string "name", :limit => 255 t.text "description" - t.string "cp_id" + t.string "cp_id", :limit => 255 t.integer "multiplier" t.integer "provider_id", :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "gpg_key_id" - t.string "type", :default => "Katello::Product", :null => false + t.string "type", :default => "Katello::Product", :null => false, :limit => 255 t.integer "sync_plan_id" - t.string "label", :null => false + t.string "label", :null => false, :limit => 255 t.boolean "cdn_import_success", :default => true, :null => false end add_index "katello_products", ["cp_id"], :name => "index_products_on_cp_id" add_index "katello_products", ["gpg_key_id"], :name => "index_products_on_gpg_key_id" add_index "katello_products", ["provider_id"], :name => "index_products_on_provider_id" add_index "katello_products", ["sync_plan_id"], :name => "index_products_on_sync_plan_id" create_table "katello_providers", :force => true do |t| - t.string "name" + t.string "name", :limit => 255 t.text "description" - t.string "repository_url" - t.string "provider_type" + t.string "repository_url", :limit => 255 + t.string "provider_type", :limit => 255 t.integer "organization_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "task_status_id" - t.string "discovery_url" + t.string "discovery_url", :limit => 255 t.text "discovered_repos" t.integer "discovery_task_id" end add_index "katello_providers", ["name", "organization_id"], :name => "index_providers_on_name_and_organization_id", :unique => true add_index "katello_providers", ["organization_id"], :name => "index_providers_on_organization_id" add_index "katello_providers", ["task_status_id"], :name => "index_providers_on_task_status_id" create_table "katello_repositories", :force => true do |t| - t.string "name" - t.string "pulp_id", :null => false + t.string "name", :limit => 255 + t.string "pulp_id", :null => false, :limit => 255 t.boolean "enabled", :default => true t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "major" - t.string "minor" + t.string "minor", :limit => 255 t.integer "gpg_key_id" - t.string "cp_label" + t.string "cp_label", :limit => 255 t.integer "library_instance_id" - t.string "content_id", :null => false - t.string "arch", :default => "noarch", :null => false - t.string "label", :null => false + t.string "content_id", :null => false, :limit => 255 + t.string "arch", :default => "noarch", :null => false, :limit => 255 + t.string "label", :null => false, :limit => 255 t.integer "content_view_version_id", :null => false - t.string "relative_path", :null => false - t.string "feed" + t.string "relative_path", :null => false, :limit => 255 + t.string "feed", :limit => 255 t.boolean "unprotected", :default => false, :null => false - t.string "content_type", :default => "yum", :null => false + t.string "content_type", :default => "yum", :null => false, :limit => 255 t.integer "product_id" t.integer "environment_id" end add_index "katello_repositories", ["content_view_version_id"], :name => "index_repositories_on_content_view_version_id" @@ -396,34 +396,34 @@ add_index "katello_repositories", ["library_instance_id"], :name => "index_repositories_on_library_instance_id" add_index "katello_repositories", ["product_id"], :name => "index_repositories_on_product_id" add_index "katello_repositories", ["pulp_id"], :name => "index_repositories_on_pulp_id" create_table "katello_search_favorites", :force => true do |t| - t.string "params" - t.string "path" + t.string "params", :limit => 255 + t.string "path", :limit => 255 t.integer "user_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end add_index "katello_search_favorites", ["user_id"], :name => "index_search_favorites_on_user_id" create_table "katello_search_histories", :force => true do |t| - t.string "params" - t.string "path" + t.string "params", :limit => 255 + t.string "path", :limit => 255 t.integer "user_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end add_index "katello_search_histories", ["user_id"], :name => "index_search_histories_on_user_id" create_table "katello_sync_plans", :force => true do |t| - t.string "name" + t.string "name", :limit => 255 t.text "description" t.datetime "sync_date" - t.string "interval" + t.string "interval", :limit => 255 t.integer "organization_id", :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end @@ -437,11 +437,11 @@ add_index "katello_system_activation_keys", ["activation_key_id"], :name => "index_system_activation_keys_on_activation_key_id" add_index "katello_system_activation_keys", ["system_id"], :name => "index_system_activation_keys_on_system_id" create_table "katello_system_groups", :force => true do |t| - t.string "name", :null => false + t.string "name", :null => false, :limit => 255 t.text "description" t.integer "max_systems", :default => -1, :null => false t.integer "organization_id", :null => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false @@ -459,39 +459,39 @@ add_index "katello_system_system_groups", ["system_group_id"], :name => "index_system_system_groups_on_system_group_id" add_index "katello_system_system_groups", ["system_id"], :name => "index_system_system_groups_on_system_id" create_table "katello_systems", :force => true do |t| - t.string "uuid" - t.string "name" + t.string "uuid", :limit => 255 + t.string "name", :limit => 255 t.text "description" - t.string "location" + t.string "location", :limit => 255 t.integer "environment_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "type", :default => "Katello::System" + t.string "type", :default => "Katello::System", :limit => 255 t.integer "content_view_id" end add_index "katello_systems", ["content_view_id"], :name => "index_systems_on_content_view_id" add_index "katello_systems", ["environment_id"], :name => "index_systems_on_environment_id" create_table "katello_task_statuses", :force => true do |t| - t.string "type" + t.string "type", :limit => 255 t.integer "organization_id" t.string "uuid", :null => false - t.string "state" + t.string "state", :limit => 255 t.text "result" t.text "progress" t.datetime "start_time" t.datetime "finish_time" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.text "parameters" - t.string "task_type" + t.string "task_type", :limit => 255 t.integer "user_id", :default => 0, :null => false t.integer "task_owner_id" - t.string "task_owner_type" + t.string "task_owner_type", :limit => 255 end add_index "katello_task_statuses", ["organization_id"], :name => "index_task_statuses_on_organization_id" add_index "katello_task_statuses", ["task_owner_id"], :name => "index_task_statuses_on_task_owner_id" add_index "katello_task_statuses", ["user_id"], :name => "index_task_statuses_on_user_id"