#
# Table name: acls
#
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
# address :inet
# k :string not null
# v :string
#
# Table name: changesets
#
-# id :integer not null, primary key
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
# created_at :datetime not null
# min_lat :integer
# max_lat :integer
#
# Indexes
#
-# changesets_bbox_idx (min_lat,max_lat,min_lon,max_lon)
+# 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)
# Table name: changeset_comments
#
# id :integer not null, primary key
-# changeset_id :integer not null
-# author_id :integer not null
+# changeset_id :bigint(8) not null
+# author_id :bigint(8) not null
# body :text not null
# created_at :datetime not null
# visible :boolean not null
#
# Table name: changeset_tags
#
-# changeset_id :integer not null, primary key
+# changeset_id :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
#
# Table name: diary_comments
#
-# id :integer not null, primary key
-# diary_entry_id :integer not null
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# diary_entry_id :bigint(8) not null
+# user_id :bigint(8) not null
# body :text not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Table name: diary_entries
#
-# id :integer not null, primary key
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
# title :string not null
# body :text not null
# created_at :datetime not null
#
# Table name: diary_entry_subscriptions
#
-# user_id :integer not null, primary key
-# diary_entry_id :integer not null, primary key
+# user_id :bigint(8) not null, primary key
+# diary_entry_id :bigint(8) not null, primary key
#
# Indexes
#
#
# Table name: friends
#
-# id :integer not null, primary key
-# user_id :integer not null
-# friend_user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
+# friend_user_id :bigint(8) not null
#
# Indexes
#
#
# Table name: messages
#
-# id :integer not null, primary key
-# from_user_id :integer not null
+# id :bigint(8) not null, primary key
+# from_user_id :bigint(8) not null
# title :string not null
# body :text not null
# sent_on :datetime not null
# message_read :boolean default(FALSE), not null
-# to_user_id :integer not null
+# to_user_id :bigint(8) not null
# to_user_visible :boolean default(TRUE), not null
# from_user_visible :boolean default(TRUE), not null
# body_format :enum default("markdown"), not null
#
# Table name: current_nodes
#
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
# latitude :integer not null
# longitude :integer not null
-# changeset_id :integer not null
+# changeset_id :bigint(8) not null
# visible :boolean not null
# timestamp :datetime not null
-# tile :integer not null
-# version :integer not null
+# tile :bigint(8) not null
+# version :bigint(8) not null
#
# Indexes
#
#
# Table name: current_node_tags
#
-# node_id :integer not null, primary key
+# node_id :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
#
# Table name: notes
#
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
# latitude :integer not null
# longitude :integer not null
-# tile :integer not null
+# tile :bigint(8) not null
# updated_at :datetime not null
# created_at :datetime not null
# status :enum not null
#
# Table name: note_comments
#
-# id :integer not null, primary key
-# note_id :integer not null
+# id :bigint(8) not null, primary key
+# note_id :bigint(8) not null
# visible :boolean not null
# created_at :datetime not null
# author_ip :inet
-# author_id :integer
+# author_id :bigint(8)
# body :text
# event :enum
#
# Indexes
#
-# index_note_comments_on_body (to_tsvector('english'::regconfig, body))
+# index_note_comments_on_body (to_tsvector('english'::regconfig, body)) USING gin
# index_note_comments_on_created_at (created_at)
# note_comments_note_id_idx (note_id)
#
#
# Table name: nodes
#
-# node_id :integer not null, primary key
+# node_id :bigint(8) not null, primary key
# latitude :integer not null
# longitude :integer not null
-# changeset_id :integer not null
+# changeset_id :bigint(8) not null
# visible :boolean not null
# timestamp :datetime not null
-# tile :integer not null
-# version :integer not null, primary key
+# tile :bigint(8) not null
+# version :bigint(8) not null, primary key
# redaction_id :integer
#
# Indexes
#
# Table name: node_tags
#
-# node_id :integer not null, primary key
-# version :integer not null, primary key
+# node_id :bigint(8) not null, primary key
+# version :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
#
# Table name: relations
#
-# relation_id :integer default(0), not null, primary key
-# changeset_id :integer not null
+# relation_id :bigint(8) default(0), not null, primary key
+# changeset_id :bigint(8) not null
# timestamp :datetime not null
-# version :integer not null, primary key
+# version :bigint(8) not null, primary key
# visible :boolean default(TRUE), not null
# redaction_id :integer
#
#
# Table name: relation_members
#
-# relation_id :integer default(0), not null, primary key
+# relation_id :bigint(8) default(0), not null, primary key
# member_type :enum not null
-# member_id :integer not null
+# member_id :bigint(8) not null
# member_role :string not null
-# version :integer default(0), not null, primary key
+# version :bigint(8) default(0), not null, primary key
# sequence_id :integer default(0), not null, primary key
#
# Indexes
#
# Table name: relation_tags
#
-# relation_id :integer default(0), not null, primary key
+# relation_id :bigint(8) default(0), not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
-# version :integer not null, primary key
+# version :bigint(8) not null, primary key
#
# Foreign Keys
#
#
# Table name: ways
#
-# way_id :integer default(0), not null, primary key
-# changeset_id :integer not null
+# way_id :bigint(8) default(0), not null, primary key
+# changeset_id :bigint(8) not null
# timestamp :datetime not null
-# version :integer not null, primary key
+# version :bigint(8) not null, primary key
# visible :boolean default(TRUE), not null
# redaction_id :integer
#
#
# Table name: way_nodes
#
-# way_id :integer not null, primary key
-# node_id :integer not null
-# version :integer not null, primary key
-# sequence_id :integer not null, primary key
+# way_id :bigint(8) not null, primary key
+# node_id :bigint(8) not null
+# version :bigint(8) not null, primary key
+# sequence_id :bigint(8) not null, primary key
#
# Indexes
#
#
# Table name: way_tags
#
-# way_id :integer default(0), not null, primary key
+# way_id :bigint(8) default(0), not null, primary key
# k :string not null, primary key
# v :string not null
-# version :integer not null, primary key
+# version :bigint(8) not null, primary key
#
# Foreign Keys
#
# description :text
# created_at :datetime
# updated_at :datetime
-# user_id :integer not null
+# user_id :bigint(8) not null
# description_format :enum default("markdown"), not null
#
# Foreign Keys
#
# Table name: current_relations
#
-# id :integer not null, primary key
-# changeset_id :integer not null
+# id :bigint(8) not null, primary key
+# changeset_id :bigint(8) not null
# timestamp :datetime not null
# visible :boolean not null
-# version :integer not null
+# version :bigint(8) not null
#
# Indexes
#
#
# Table name: current_relation_members
#
-# relation_id :integer not null, primary key
+# relation_id :bigint(8) not null, primary key
# member_type :enum not null
-# member_id :integer not null
+# member_id :bigint(8) not null
# member_role :string not null
# sequence_id :integer default(0), not null, primary key
#
#
# Table name: current_relation_tags
#
-# relation_id :integer not null, primary key
+# relation_id :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#
#
# Table name: gpx_files
#
-# id :integer not null, primary key
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
# visible :boolean default(TRUE), not null
# name :string default(""), not null
-# size :integer
+# size :bigint(8)
# latitude :float
# longitude :float
# timestamp :datetime not null
# trackid :integer not null
# latitude :integer not null
# longitude :integer not null
-# gpx_id :integer not null
+# gpx_id :bigint(8) not null
# timestamp :datetime
-# tile :integer
+# tile :bigint(8)
#
# Indexes
#
#
# Table name: gpx_file_tags
#
-# gpx_id :integer default(0), not null
+# gpx_id :bigint(8) default(0), not null
# tag :string not null
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
#
# Indexes
#
# Table name: users
#
# email :string not null
-# id :integer not null, primary key
+# id :bigint(8) not null, primary key
# pass_crypt :string not null
# creation_time :datetime not null
# display_name :string default(""), not null
# image_use_gravatar :boolean default(FALSE), not null
# image_content_type :string
# auth_provider :string
-# home_tile :integer
+# home_tile :bigint(8)
# tou_agreed :datetime
#
# Indexes
# Table name: user_blocks
#
# id :integer not null, primary key
-# user_id :integer not null
-# creator_id :integer not null
+# user_id :bigint(8) not null
+# creator_id :bigint(8) not null
# reason :text not null
# ends_at :datetime not null
# needs_view :boolean default(FALSE), not null
-# revoker_id :integer
+# revoker_id :bigint(8)
# created_at :datetime
# updated_at :datetime
# reason_format :enum default("markdown"), not null
#
# Table name: user_preferences
#
-# user_id :integer not null, primary key
+# user_id :bigint(8) not null, primary key
# k :string not null, primary key
# v :string not null
#
# Table name: user_roles
#
# id :integer not null, primary key
-# user_id :integer not null
+# user_id :bigint(8) not null
# role :enum not null
# created_at :datetime
# updated_at :datetime
-# granter_id :integer not null
+# granter_id :bigint(8) not null
#
# Indexes
#
#
# Table name: user_tokens
#
-# id :integer not null, primary key
-# user_id :integer not null
+# id :bigint(8) not null, primary key
+# user_id :bigint(8) not null
# token :string not null
# expiry :datetime not null
# referer :text
#
# Table name: current_ways
#
-# id :integer not null, primary key
-# changeset_id :integer not null
+# id :bigint(8) not null, primary key
+# changeset_id :bigint(8) not null
# timestamp :datetime not null
# visible :boolean not null
-# version :integer not null
+# version :bigint(8) not null
#
# Indexes
#
#
# Table name: current_way_nodes
#
-# way_id :integer not null, primary key
-# node_id :integer not null
-# sequence_id :integer not null, primary key
+# way_id :bigint(8) not null, primary key
+# node_id :bigint(8) not null
+# sequence_id :bigint(8) not null, primary key
#
# Indexes
#
#
# Table name: current_way_tags
#
-# way_id :integer not null, primary key
+# way_id :bigint(8) not null, primary key
# k :string default(""), not null, primary key
# v :string default(""), not null
#