diff --git a/app/models/project.rb b/app/models/project.rb index 3a11b85a5..f11fc6380 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -204,7 +204,7 @@ class Project < ActiveRecord::Base end def get_project_tag_sha1(tag, format) - format_id = ProjectTag::Formats["#{tag_file_format(format)}"] + format_id = ProjectTag::FORMATS["#{tag_file_format(format)}"] project_tag = project_tags.where(:tag_name => tag.name, :format_id => format_id).first return project_tag.sha1 if project_tag && project_tag.commit_id == tag.commit.id diff --git a/db/schema.rb b/db/schema.rb index 0c49cf208..adaee4672 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130207101148) do +ActiveRecord::Schema.define(:version => 20130214101404) do create_table "activity_feeds", :force => true do |t| t.integer "user_id", :null => false @@ -339,6 +339,16 @@ ActiveRecord::Schema.define(:version => 20130207101148) do add_index "project_imports", ["platform_id", "name"], :name => "index_project_imports_on_name_and_platform_id", :unique => true, :case_sensitive => false + create_table "project_tags", :force => true do |t| + t.integer "project_id" + t.string "commit_id" + t.string "sha1" + t.string "tag_name" + t.integer "format_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "project_to_repositories", :force => true do |t| t.integer "project_id" t.integer "repository_id"