diff options
author | gitlabhq <m@gitlabhq.com> | 2011-10-09 00:36:38 +0300 |
---|---|---|
committer | gitlabhq <m@gitlabhq.com> | 2011-10-09 00:36:38 +0300 |
commit | 9ba1224867665844b117fa037e1465bb706b3685 (patch) | |
tree | 52fbfc1cdb55df21843965479c97be0c91121a9a /db/migrate/20110924214549_create_rails_admin_histories_table.rb | |
parent | 93efff945215a4407afcaf0cba15ac601b56df0d (diff) | |
download | gitlab-ce-9ba1224867665844b117fa037e1465bb706b3685.tar.gz |
init commit
Diffstat (limited to 'db/migrate/20110924214549_create_rails_admin_histories_table.rb')
-rw-r--r-- | db/migrate/20110924214549_create_rails_admin_histories_table.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20110924214549_create_rails_admin_histories_table.rb b/db/migrate/20110924214549_create_rails_admin_histories_table.rb new file mode 100644 index 00000000000..3c743aa2874 --- /dev/null +++ b/db/migrate/20110924214549_create_rails_admin_histories_table.rb @@ -0,0 +1,18 @@ +class CreateRailsAdminHistoriesTable < ActiveRecord::Migration + def self.up + create_table :rails_admin_histories do |t| + t.text :message # title, name, or object_id + t.string :username + t.integer :item + t.string :table + t.integer :month, :limit => 2 + t.integer :year, :limit => 5 + t.timestamps + end + add_index(:rails_admin_histories, [:item, :table, :month, :year], :name => 'index_rails_admin_histories' ) + end + + def self.down + drop_table :rails_admin_histories + end +end |