Files

701 lines
25 KiB
Ruby

# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
# to create the application database on another system, you should be using db:schema:load, not running
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110802100859) do
create_table "activations", :force => true do |t|
t.integer "order_id", :null => false
t.integer "build", :null => false
t.string "computer_id", :null => false
t.string "product"
t.datetime "created_at"
t.datetime "updated_at"
t.string "serial_key"
t.string "ip"
t.text "final_judgement"
end
add_index "activations", ["order_id"], :name => "order_id"
create_table "allowed_values", :force => true do |t|
t.string "type"
t.string "code"
t.string "value"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
create_table "articles", :force => true do |t|
t.string "title", :null => false
t.string "slug", :null => false
t.text "content", :null => false
t.date "date", :null => false
t.string "status", :default => "draft"
t.string "keywords"
t.text "custom_subtemplate"
t.integer "screenshot_id"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "articles", ["slug"], :name => "index_articles_on_slug", :unique => true
add_index "articles", ["screenshot_id"], :name => "screenshot_id"
create_table "autoresponders", :force => true do |t|
t.integer "subscription_list_id", :null => false
t.string "subject", :null => false
t.text "message", :null => false
t.integer "delay", :default => 0
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "autoresponders", ["subscription_list_id"], :name => "subscription_list_id"
create_table "comics", :force => true do |t|
t.date "publish_on", :null => false
t.string "image_file_name", :null => false
t.string "image_content_type"
t.integer "image_file_size"
t.datetime "image_updated_at"
t.string "name"
t.text "story"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "number", :null => false
end
create_table "contacts", :force => true do |t|
t.string "email"
t.string "first_name"
t.string "last_name"
t.string "country"
t.integer "active_subscriptions", :default => 0
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
create_table "customers", :force => true do |t|
t.string "first_name"
t.string "last_name"
t.string "email"
t.string "company"
t.text "customer_attributes"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
create_table "customers_visitors", :id => false, :force => true do |t|
t.integer "customer_id"
t.integer "visitor_id"
end
add_index "customers_visitors", ["customer_id"], :name => "customer_id"
add_index "customers_visitors", ["visitor_id"], :name => "visitor_id"
create_table "download_logs", :force => true do |t|
t.integer "product_id"
t.text "request"
t.datetime "created_at"
end
add_index "download_logs", ["product_id"], :name => "product_id"
create_table "emails", :force => true do |t|
t.string "from"
t.string "to"
t.integer "last_send_attempt", :default => 0
t.text "mail"
t.datetime "created_on"
end
create_table "failed_activations", :force => true do |t|
t.string "serial_key"
t.integer "build"
t.string "computer_id"
t.string "product"
t.string "ip"
t.string "result"
t.text "final_judgement"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "faq_categories", :force => true do |t|
t.integer "product_id"
t.string "url_param"
t.string "name"
t.string "description"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "faq_categories", ["product_id"], :name => "product_id"
create_table "faqs", :force => true do |t|
t.integer "faq_category_id"
t.string "url_param"
t.text "question"
t.text "answer"
t.boolean "featured", :default => false
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "faqs", ["faq_category_id"], :name => "faq_category_id"
create_table "latests", :force => true do |t|
t.string "title"
t.string "link"
t.text "body"
t.date "date"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
create_table "meta_tags", :force => true do |t|
t.string "path"
t.string "title"
t.text "keywords"
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "newsletter_allowed_values", :force => true do |t|
t.string "type"
t.string "code"
t.string "value"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
create_table "orders", :force => true do |t|
t.integer "customer_id"
t.integer "orderable_id"
t.string "orderable_type"
t.text "license_key"
t.text "order_attributes"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "orders", ["customer_id"], :name => "customer_id"
create_table "pad_values", :force => true do |t|
t.integer "product_id"
t.string "key"
t.text "value"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "pad_values", ["product_id"], :name => "product_id"
create_table "page_includes", :force => true do |t|
t.string "path"
t.string "description"
t.text "inklude"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "product_categories", :force => true do |t|
t.string "code"
t.string "name"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "product_categories", ["code"], :name => "index_product_categories_on_code", :unique => true
create_table "product_descriptions", :force => true do |t|
t.integer "product_description_type_id"
t.integer "product_id"
t.string "title"
t.text "value"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "product_descriptions", ["product_description_type_id"], :name => "product_description_type_id"
add_index "product_descriptions", ["product_id"], :name => "product_id"
create_table "product_discounts", :force => true do |t|
t.integer "product_id"
t.integer "product_edition_id"
t.string "discount_type"
t.string "discount_code"
t.decimal "price", :precision => 10, :scale => 2
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "product_discounts", ["product_id"], :name => "product_id"
add_index "product_discounts", ["product_edition_id"], :name => "product_edition_id"
create_table "product_editions", :force => true do |t|
t.integer "product_id"
t.string "code"
t.string "internal_code"
t.integer "bmtID"
t.string "name"
t.text "description"
t.decimal "price", :precision => 10, :scale => 2
t.decimal "regular_price", :precision => 10, :scale => 2
t.boolean "initial", :default => false
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "product_editions", ["internal_code"], :name => "index_product_editions_on_internal_code", :unique => true
add_index "product_editions", ["product_id"], :name => "product_id"
create_table "product_icons", :force => true do |t|
t.integer "product_id"
t.string "icon"
t.integer "size"
t.datetime "created_at"
t.datetime "updated_at"
t.string "icon_file_name"
t.string "icon_content_type"
t.integer "icon_file_size"
t.datetime "icon_updated_at"
end
add_index "product_icons", ["product_id"], :name => "product_id"
create_table "product_images", :force => true do |t|
t.integer "product_id"
t.string "image"
t.string "alt"
t.string "label"
t.datetime "created_at"
t.datetime "updated_at"
t.string "image_file_name"
t.string "image_content_type"
t.integer "image_file_size"
t.datetime "image_updated_at"
end
add_index "product_images", ["product_id"], :name => "product_id"
create_table "product_offers", :force => true do |t|
t.integer "product_id"
t.integer "related_product_id"
t.integer "bmtID"
t.string "name"
t.text "description"
t.decimal "price", :precision => 10, :scale => 2
t.datetime "begins_at"
t.datetime "expires_at"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.string "internal_code"
end
add_index "product_offers", ["product_id"], :name => "product_id"
add_index "product_offers", ["related_product_id"], :name => "related_product_id"
create_table "product_pages", :force => true do |t|
t.integer "parent_id"
t.integer "product_id"
t.boolean "tab", :default => false
t.string "code"
t.string "name"
t.text "html"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "product_pages", ["parent_id"], :name => "parent_id"
add_index "product_pages", ["product_id"], :name => "product_id"
create_table "product_upgrades", :force => true do |t|
t.string "upgrade_type"
t.string "bmtID"
t.decimal "price", :precision => 10, :scale => 2
t.datetime "created_at"
t.datetime "updated_at"
t.integer "upgradable_id"
t.integer "upgradable_to_id"
t.string "upgradable_type", :default => "ProductEdition"
t.string "upgradable_to_type"
end
create_table "product_url_params", :force => true do |t|
t.integer "product_id"
t.integer "url_destination_id"
t.string "url_param"
t.boolean "default", :default => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "product_url_params", ["product_id"], :name => "product_id"
add_index "product_url_params", ["url_destination_id"], :name => "url_destination_id"
create_table "products", :force => true do |t|
t.integer "product_category_id"
t.string "code"
t.string "internal_code"
t.string "file"
t.string "name"
t.string "label"
t.boolean "promoted", :default => false
t.boolean "homepage", :default => false
t.decimal "price", :precision => 10, :scale => 2
t.decimal "regular_price", :precision => 10, :scale => 2
t.integer "bmtID"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
t.string "setup_file_file_name"
t.string "setup_file_content_type"
t.integer "setup_file_file_size"
t.datetime "setup_file_updated_at"
end
add_index "products", ["code"], :name => "index_products_on_code", :unique => true
add_index "products", ["internal_code"], :name => "index_products_on_internal_code", :unique => true
add_index "products", ["product_category_id"], :name => "product_category_id"
create_table "products_promotions", :id => false, :force => true do |t|
t.integer "product_id"
t.integer "promotion_id"
end
add_index "products_promotions", ["product_id"], :name => "product_id"
add_index "products_promotions", ["promotion_id"], :name => "promotion_id"
create_table "redirects", :force => true do |t|
t.integer "source_type_id"
t.string "name"
t.string "redirect_path", :null => false
t.string "redirect_to", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "redirects", ["source_type_id"], :name => "source_type_id"
create_table "releases", :force => true do |t|
t.integer "product_id"
t.string "version"
t.integer "build"
t.text "description"
t.text "changelog"
t.date "date"
t.datetime "postpone_till"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "announce", :default => true
t.boolean "exclude_from_autoupdate", :default => false
end
add_index "releases", ["product_id"], :name => "product_id"
create_table "screenshots", :force => true do |t|
t.integer "product_id"
t.string "image"
t.string "alt"
t.string "label"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.string "image_file_name"
t.string "image_content_type"
t.integer "image_file_size"
t.datetime "image_updated_at"
end
add_index "screenshots", ["product_id"], :name => "product_id"
create_table "sent_autoresponders", :force => true do |t|
t.integer "autoresponder_id", :null => false
t.integer "contact_id", :null => false
t.datetime "sent_at"
end
add_index "sent_autoresponders", ["autoresponder_id"], :name => "autoresponder_id"
add_index "sent_autoresponders", ["contact_id"], :name => "contact_id"
create_table "site_settings", :force => true do |t|
t.text "settings"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "sitemap_titles", :force => true do |t|
t.string "path"
t.string "title"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "static_pages", :force => true do |t|
t.string "code"
t.string "url_param"
t.string "name"
t.text "html"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "static_pages", ["code"], :name => "index_static_pages_on_code", :unique => true
create_table "subscription_list_types_subscription_locations", :id => false, :force => true do |t|
t.integer "subscription_list_type_id"
t.integer "subscription_location_id"
end
add_index "subscription_list_types_subscription_locations", ["subscription_list_type_id"], :name => "subscription_list_type_id"
add_index "subscription_list_types_subscription_locations", ["subscription_location_id"], :name => "subscription_location_id"
create_table "subscription_lists", :force => true do |t|
t.integer "subscription_list_type_id"
t.integer "product_id"
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "subscription_lists", ["subscription_list_type_id"], :name => "subscription_list_type_id"
add_index "subscription_lists", ["product_id"], :name => "product_id"
create_table "subscriptions", :force => true do |t|
t.integer "subscription_list_id"
t.integer "contact_id"
t.datetime "started_at"
t.datetime "ended_at"
t.boolean "active", :default => true
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
t.integer "subscription_location_id"
end
add_index "subscriptions", ["subscription_list_id"], :name => "subscription_list_id"
add_index "subscriptions", ["contact_id"], :name => "contact_id"
add_index "subscriptions", ["subscription_location_id"], :name => "subscription_location_id"
create_table "subtemplates", :force => true do |t|
t.integer "subtemplate_type_id"
t.string "name"
t.text "content"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "subtemplates", ["subtemplate_type_id"], :name => "subtemplate_type_id"
create_table "support_requests", :force => true do |t|
t.integer "support_request_origin_id"
t.string "name"
t.string "email"
t.integer "product_id"
t.string "subject"
t.text "message"
t.boolean "mail_sent", :default => false
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "support_requests", ["support_request_origin_id"], :name => "support_request_origin_id"
add_index "support_requests", ["product_id"], :name => "product_id"
create_table "testimonial_positions", :force => true do |t|
t.integer "testimonial_id"
t.integer "testimonial_location_id"
t.integer "product_id"
t.text "extract"
t.integer "position"
end
add_index "testimonial_positions", ["testimonial_id"], :name => "testimonial_id"
add_index "testimonial_positions", ["testimonial_location_id"], :name => "testimonial_location_id"
add_index "testimonial_positions", ["product_id"], :name => "product_id"
create_table "testimonials", :force => true do |t|
t.integer "product_id"
t.text "text"
t.string "author"
t.boolean "hidden", :default => false
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
add_index "testimonials", ["product_id"], :name => "product_id"
create_table "users", :force => true do |t|
t.string "first_name"
t.string "last_name"
t.string "login", :null => false
t.string "email", :null => false
t.string "crypted_password", :null => false
t.string "password_salt", :null => false
t.string "persistence_token", :null => false
t.string "single_access_token", :null => false
t.string "perishable_token", :null => false
t.integer "login_count", :default => 0, :null => false
t.integer "failed_login_count", :default => 0, :null => false
t.datetime "last_request_at"
t.datetime "current_login_at"
t.datetime "last_login_at"
t.string "current_login_ip"
t.string "last_login_ip"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
create_table "visitor_tracks", :force => true do |t|
t.integer "visitor_id"
t.text "track"
t.integer "trackable_id"
t.string "trackable_type"
t.integer "source_type_id"
t.string "source"
t.string "url"
t.string "keywords"
t.string "targetable"
t.boolean "download", :default => false
t.boolean "checkout", :default => false
t.boolean "order", :default => false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "visitor_tracks", ["visitor_id"], :name => "visitor_id"
add_index "visitor_tracks", ["source_type_id"], :name => "source_type_id"
create_table "visitors", :force => true do |t|
t.string "trackable_number"
t.string "user_agent"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "deleted_at"
end
create_table "volume_discounts", :force => true do |t|
t.integer "from"
t.integer "to"
t.integer "discount"
t.datetime "created_at"
t.datetime "updated_at"
end
add_foreign_key "activations", ["order_id"], "orders", ["id"], :name => "activations_ibfk_1"
add_foreign_key "articles", ["screenshot_id"], "screenshots", ["id"], :name => "articles_ibfk_1"
add_foreign_key "autoresponders", ["subscription_list_id"], "subscription_lists", ["id"], :name => "autoresponders_ibfk_1"
add_foreign_key "customers_visitors", ["customer_id"], "customers", ["id"], :name => "customers_visitors_ibfk_1"
add_foreign_key "customers_visitors", ["visitor_id"], "visitors", ["id"], :name => "customers_visitors_ibfk_2"
add_foreign_key "download_logs", ["product_id"], "products", ["id"], :name => "download_logs_ibfk_1"
add_foreign_key "faq_categories", ["product_id"], "products", ["id"], :name => "faq_categories_ibfk_1"
add_foreign_key "faqs", ["faq_category_id"], "faq_categories", ["id"], :name => "faqs_ibfk_1"
add_foreign_key "orders", ["customer_id"], "customers", ["id"], :name => "orders_ibfk_1"
add_foreign_key "pad_values", ["product_id"], "products", ["id"], :name => "pad_values_ibfk_1"
add_foreign_key "product_descriptions", ["product_description_type_id"], "allowed_values", ["id"], :name => "product_descriptions_ibfk_1"
add_foreign_key "product_descriptions", ["product_id"], "products", ["id"], :name => "product_descriptions_ibfk_2"
add_foreign_key "product_discounts", ["product_id"], "products", ["id"], :name => "product_discounts_ibfk_1"
add_foreign_key "product_discounts", ["product_edition_id"], "product_editions", ["id"], :name => "product_discounts_ibfk_2"
add_foreign_key "product_editions", ["product_id"], "products", ["id"], :name => "product_editions_ibfk_1"
add_foreign_key "product_icons", ["product_id"], "products", ["id"], :name => "product_icons_ibfk_1"
add_foreign_key "product_images", ["product_id"], "products", ["id"], :name => "product_images_ibfk_1"
add_foreign_key "product_offers", ["product_id"], "products", ["id"], :name => "product_offers_ibfk_1"
add_foreign_key "product_offers", ["related_product_id"], "products", ["id"], :name => "product_offers_ibfk_2"
add_foreign_key "product_pages", ["parent_id"], "product_pages", ["id"], :name => "product_pages_ibfk_1"
add_foreign_key "product_pages", ["product_id"], "products", ["id"], :name => "product_pages_ibfk_2"
add_foreign_key "product_url_params", ["product_id"], "products", ["id"], :name => "product_url_params_ibfk_1"
add_foreign_key "product_url_params", ["url_destination_id"], "allowed_values", ["id"], :name => "product_url_params_ibfk_2"
add_foreign_key "products", ["product_category_id"], "product_categories", ["id"], :name => "products_ibfk_1"
add_foreign_key "products_promotions", ["product_id"], "products", ["id"], :name => "products_promotions_ibfk_1"
add_foreign_key "products_promotions", ["promotion_id"], "allowed_values", ["id"], :name => "products_promotions_ibfk_2"
add_foreign_key "redirects", ["source_type_id"], "allowed_values", ["id"], :name => "redirects_ibfk_1"
add_foreign_key "releases", ["product_id"], "products", ["id"], :name => "releases_ibfk_1"
add_foreign_key "screenshots", ["product_id"], "products", ["id"], :name => "screenshots_ibfk_1"
add_foreign_key "sent_autoresponders", ["autoresponder_id"], "autoresponders", ["id"], :name => "sent_autoresponders_ibfk_1"
add_foreign_key "sent_autoresponders", ["contact_id"], "contacts", ["id"], :name => "sent_autoresponders_ibfk_2"
add_foreign_key "subscription_list_types_subscription_locations", ["subscription_list_type_id"], "newsletter_allowed_values", ["id"], :name => "subscription_list_types_subscription_locations_ibfk_1"
add_foreign_key "subscription_list_types_subscription_locations", ["subscription_location_id"], "newsletter_allowed_values", ["id"], :name => "subscription_list_types_subscription_locations_ibfk_2"
add_foreign_key "subscription_lists", ["subscription_list_type_id"], "newsletter_allowed_values", ["id"], :name => "subscription_lists_ibfk_1"
add_foreign_key "subscription_lists", ["product_id"], "products", ["id"], :name => "subscription_lists_ibfk_2"
add_foreign_key "subscriptions", ["subscription_location_id"], "newsletter_allowed_values", ["id"], :name => "subscriptions_ibfk_3"
add_foreign_key "subscriptions", ["subscription_list_id"], "subscription_lists", ["id"], :name => "subscriptions_ibfk_1"
add_foreign_key "subscriptions", ["contact_id"], "contacts", ["id"], :name => "subscriptions_ibfk_2"
add_foreign_key "subtemplates", ["subtemplate_type_id"], "allowed_values", ["id"], :name => "subtemplates_ibfk_1"
add_foreign_key "support_requests", ["support_request_origin_id"], "allowed_values", ["id"], :name => "support_requests_ibfk_1"
add_foreign_key "support_requests", ["product_id"], "products", ["id"], :name => "support_requests_ibfk_2"
add_foreign_key "testimonial_positions", ["testimonial_id"], "testimonials", ["id"], :name => "testimonial_positions_ibfk_1"
add_foreign_key "testimonial_positions", ["testimonial_location_id"], "allowed_values", ["id"], :name => "testimonial_positions_ibfk_2"
add_foreign_key "testimonial_positions", ["product_id"], "products", ["id"], :name => "testimonial_positions_ibfk_3"
add_foreign_key "testimonials", ["product_id"], "products", ["id"], :name => "testimonials_ibfk_1"
add_foreign_key "visitor_tracks", ["visitor_id"], "visitors", ["id"], :name => "visitor_tracks_ibfk_1"
add_foreign_key "visitor_tracks", ["source_type_id"], "allowed_values", ["id"], :name => "visitor_tracks_ibfk_2"
end