-class Changeset < ActiveRecord::Base
- require 'xml/libxml'
-
- belongs_to :user
-
- has_many :changeset_tags, :foreign_key => 'id'
+# == Schema Information
+#
+# Table name: changesets
+#
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
+# created_at :datetime not null
+# min_lat :integer
+# max_lat :integer
+# min_lon :integer
+# max_lon :integer
+# closed_at :datetime not null
+# num_changes :integer default(0), not null
+#
+# Indexes
+#
+# changesets_bbox_idx (min_lat,max_lat,min_lon,max_lon) USING gist
+# changesets_closed_at_idx (closed_at)
+# changesets_created_at_idx (created_at)
+# changesets_user_id_created_at_idx (user_id,created_at)
+# changesets_user_id_id_idx (user_id,id)
+# index_changesets_on_user_id_and_closed_at (user_id,closed_at)
+#
+# Foreign Keys
+#
+# changesets_user_id_fkey (user_id => users.id)
+#
+
+class Changeset < ApplicationRecord
+ require "xml/libxml"
+
+ belongs_to :user, :counter_cache => true
+
+ has_many :changeset_tags