summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-03-25 12:12:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-03-25 12:12:15 +0000
commit16f9f50f50dbac49b1f791c7c2892420a354bc43 (patch)
treeefaebfb9dd13bde6d45afa36b39063772d9116de /db
parent6f1dcdc08f401923ac77254ca22fd520582bcf6f (diff)
downloadredmine-16f9f50f50dbac49b1f791c7c2892420a354bc43.tar.gz
redmine-16f9f50f50dbac49b1f791c7c2892420a354bc43.zip
SVN commits are now stored in the database, and added to the activity view and the search engine.
New commits are automatically retrieved and stored when consulting the repository in the app. This behaviour can be disabled by unchecking 'Autofecth commits' in configuration settings. Commits can be fetched offline by running (recommanded at least for the initial import of past commits): ruby script/runner "Repository.fetch_changesets" It will load commits for all of the repositories. git-svn-id: http://redmine.rubyforge.org/svn/trunk@377 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r--db/migrate/034_create_changesets.rb16
-rw-r--r--db/migrate/035_create_changes.rb16
2 files changed, 32 insertions, 0 deletions
diff --git a/db/migrate/034_create_changesets.rb b/db/migrate/034_create_changesets.rb
new file mode 100644
index 000000000..a78c8e36f
--- /dev/null
+++ b/db/migrate/034_create_changesets.rb
@@ -0,0 +1,16 @@
+class CreateChangesets < ActiveRecord::Migration
+ def self.up
+ create_table :changesets do |t|
+ t.column :repository_id, :integer, :null => false
+ t.column :revision, :integer, :null => false
+ t.column :committer, :string, :limit => 30
+ t.column :committed_on, :datetime, :null => false
+ t.column :comment, :text
+ end
+ add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
+ end
+
+ def self.down
+ drop_table :changesets
+ end
+end
diff --git a/db/migrate/035_create_changes.rb b/db/migrate/035_create_changes.rb
new file mode 100644
index 000000000..fa0cfac3f
--- /dev/null
+++ b/db/migrate/035_create_changes.rb
@@ -0,0 +1,16 @@
+class CreateChanges < ActiveRecord::Migration
+ def self.up
+ create_table :changes do |t|
+ t.column :changeset_id, :integer, :null => false
+ t.column :action, :string, :limit => 1, :default => "", :null => false
+ t.column :path, :string, :default => "", :null => false
+ t.column :from_path, :string
+ t.column :from_revision, :integer
+ end
+ add_index :changes, [:changeset_id], :name => :changesets_changeset_id
+ end
+
+ def self.down
+ drop_table :changes
+ end
+end