From ab4f96261fe043ba704616e8b6f7cf77e79817bf Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 22 Feb 2025 11:09:27 +0000 Subject: [PATCH] Drop explicit lengths from bigint columns --- .annotaterb.yml | 2 +- app/models/acl.rb | 2 +- app/models/changeset.rb | 4 ++-- app/models/changeset_comment.rb | 4 ++-- app/models/changeset_tag.rb | 2 +- app/models/diary_comment.rb | 6 +++--- app/models/diary_entry.rb | 4 ++-- app/models/diary_entry_subscription.rb | 4 ++-- app/models/follow.rb | 6 +++--- app/models/message.rb | 6 +++--- app/models/node.rb | 8 ++++---- app/models/node_tag.rb | 2 +- app/models/note.rb | 6 +++--- app/models/note_comment.rb | 6 +++--- app/models/note_subscription.rb | 4 ++-- app/models/oauth2_application.rb | 4 ++-- app/models/old_node.rb | 8 ++++---- app/models/old_node_tag.rb | 4 ++-- app/models/old_relation.rb | 6 +++--- app/models/old_relation_member.rb | 6 +++--- app/models/old_relation_tag.rb | 4 ++-- app/models/old_way.rb | 6 +++--- app/models/old_way_node.rb | 8 ++++---- app/models/old_way_tag.rb | 4 ++-- app/models/redaction.rb | 2 +- app/models/relation.rb | 6 +++--- app/models/relation_member.rb | 4 ++-- app/models/relation_tag.rb | 2 +- app/models/trace.rb | 6 +++--- app/models/tracepoint.rb | 4 ++-- app/models/tracetag.rb | 4 ++-- app/models/user.rb | 4 ++-- app/models/user_block.rb | 6 +++--- app/models/user_mute.rb | 6 +++--- app/models/user_preference.rb | 2 +- app/models/user_role.rb | 6 +++--- app/models/way.rb | 6 +++--- app/models/way_node.rb | 6 +++--- app/models/way_tag.rb | 2 +- 39 files changed, 91 insertions(+), 91 deletions(-) diff --git a/.annotaterb.yml b/.annotaterb.yml index ccc1cbf67..eab2bb917 100644 --- a/.annotaterb.yml +++ b/.annotaterb.yml @@ -39,7 +39,7 @@ :command: :debug: false :hide_default_column_types: '' -:hide_limit_column_types: 'integer,boolean' +:hide_limit_column_types: 'integer,bigint,boolean' :ignore_columns: :ignore_routes: :models: true diff --git a/app/models/acl.rb b/app/models/acl.rb index aa503f40c..81e720159 100644 --- a/app/models/acl.rb +++ b/app/models/acl.rb @@ -2,7 +2,7 @@ # # Table name: acls # -# id :bigint(8) not null, primary key +# id :bigint not null, primary key # address :inet # k :string not null # v :string diff --git a/app/models/changeset.rb b/app/models/changeset.rb index e6bde19a5..50b30c1a4 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -2,8 +2,8 @@ # # Table name: changesets # -# id :bigint(8) not null, primary key -# user_id :bigint(8) not null +# id :bigint not null, primary key +# user_id :bigint not null # created_at :datetime not null # min_lat :integer # max_lat :integer diff --git a/app/models/changeset_comment.rb b/app/models/changeset_comment.rb index d825c9ed5..09eabe893 100644 --- a/app/models/changeset_comment.rb +++ b/app/models/changeset_comment.rb @@ -3,8 +3,8 @@ # Table name: changeset_comments # # id :integer not null, primary key -# changeset_id :bigint(8) not null -# author_id :bigint(8) not null +# changeset_id :bigint not null +# author_id :bigint not null # body :text not null # created_at :datetime not null # visible :boolean not null diff --git a/app/models/changeset_tag.rb b/app/models/changeset_tag.rb index da9fbce51..6b848e1c9 100644 --- a/app/models/changeset_tag.rb +++ b/app/models/changeset_tag.rb @@ -2,7 +2,7 @@ # # Table name: changeset_tags # -# changeset_id :bigint(8) not null, primary key +# changeset_id :bigint not null, primary key # k :string default(""), not null, primary key # v :string default(""), not null # diff --git a/app/models/diary_comment.rb b/app/models/diary_comment.rb index ad23c9f65..539e7532c 100644 --- a/app/models/diary_comment.rb +++ b/app/models/diary_comment.rb @@ -2,9 +2,9 @@ # # Table name: diary_comments # -# id :bigint(8) not null, primary key -# diary_entry_id :bigint(8) not null -# user_id :bigint(8) not null +# id :bigint not null, primary key +# diary_entry_id :bigint not null +# user_id :bigint not null # body :text not null # created_at :datetime not null # updated_at :datetime not null diff --git a/app/models/diary_entry.rb b/app/models/diary_entry.rb index 089c7e6c6..ad9659438 100644 --- a/app/models/diary_entry.rb +++ b/app/models/diary_entry.rb @@ -2,8 +2,8 @@ # # Table name: diary_entries # -# id :bigint(8) not null, primary key -# user_id :bigint(8) not null +# id :bigint not null, primary key +# user_id :bigint not null # title :string not null # body :text not null # created_at :datetime not null diff --git a/app/models/diary_entry_subscription.rb b/app/models/diary_entry_subscription.rb index 93b8847f4..31a5806eb 100644 --- a/app/models/diary_entry_subscription.rb +++ b/app/models/diary_entry_subscription.rb @@ -2,8 +2,8 @@ # # Table name: diary_entry_subscriptions # -# user_id :bigint(8) not null, primary key -# diary_entry_id :bigint(8) not null, primary key +# user_id :bigint not null, primary key +# diary_entry_id :bigint not null, primary key # # Indexes # diff --git a/app/models/follow.rb b/app/models/follow.rb index ebf3ad735..6dd1bfe03 100644 --- a/app/models/follow.rb +++ b/app/models/follow.rb @@ -2,9 +2,9 @@ # # Table name: friends # -# id :bigint(8) not null, primary key -# user_id :bigint(8) not null -# friend_user_id :bigint(8) not null +# id :bigint not null, primary key +# user_id :bigint not null +# friend_user_id :bigint not null # created_at :datetime # # Indexes diff --git a/app/models/message.rb b/app/models/message.rb index 665e2d721..28320af78 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -2,13 +2,13 @@ # # Table name: messages # -# id :bigint(8) not null, primary key -# from_user_id :bigint(8) not null +# id :bigint not null, primary key +# from_user_id :bigint 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 :bigint(8) not null +# to_user_id :bigint 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 diff --git a/app/models/node.rb b/app/models/node.rb index 1bec9a33c..baf0c180f 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -2,14 +2,14 @@ # # Table name: current_nodes # -# id :bigint(8) not null, primary key +# id :bigint not null, primary key # latitude :integer not null # longitude :integer not null -# changeset_id :bigint(8) not null +# changeset_id :bigint not null # visible :boolean not null # timestamp :datetime not null -# tile :bigint(8) not null -# version :bigint(8) not null +# tile :bigint not null +# version :bigint not null # # Indexes # diff --git a/app/models/node_tag.rb b/app/models/node_tag.rb index 18e502439..fa82b6a3c 100644 --- a/app/models/node_tag.rb +++ b/app/models/node_tag.rb @@ -2,7 +2,7 @@ # # Table name: current_node_tags # -# node_id :bigint(8) not null, primary key +# node_id :bigint not null, primary key # k :string default(""), not null, primary key # v :string default(""), not null # diff --git a/app/models/note.rb b/app/models/note.rb index 0a1f4abd7..2ec72a03a 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -2,16 +2,16 @@ # # Table name: notes # -# id :bigint(8) not null, primary key +# id :bigint not null, primary key # latitude :integer not null # longitude :integer not null -# tile :bigint(8) not null +# tile :bigint not null # updated_at :datetime not null # created_at :datetime not null # status :enum not null # closed_at :datetime # description :text default(""), not null -# user_id :bigint(8) +# user_id :bigint # user_ip :inet # # Indexes diff --git a/app/models/note_comment.rb b/app/models/note_comment.rb index d318c5e95..3f34368fa 100644 --- a/app/models/note_comment.rb +++ b/app/models/note_comment.rb @@ -2,12 +2,12 @@ # # Table name: note_comments # -# id :bigint(8) not null, primary key -# note_id :bigint(8) not null +# id :bigint not null, primary key +# note_id :bigint not null # visible :boolean not null # created_at :datetime not null # author_ip :inet -# author_id :bigint(8) +# author_id :bigint # body :text # event :enum # diff --git a/app/models/note_subscription.rb b/app/models/note_subscription.rb index 76e8a226c..2532738bc 100644 --- a/app/models/note_subscription.rb +++ b/app/models/note_subscription.rb @@ -2,8 +2,8 @@ # # Table name: note_subscriptions # -# user_id :bigint(8) not null, primary key -# note_id :bigint(8) not null, primary key +# user_id :bigint not null, primary key +# note_id :bigint not null, primary key # # Indexes # diff --git a/app/models/oauth2_application.rb b/app/models/oauth2_application.rb index 834f1ded5..9a099e304 100644 --- a/app/models/oauth2_application.rb +++ b/app/models/oauth2_application.rb @@ -2,9 +2,9 @@ # # Table name: oauth_applications # -# id :bigint(8) not null, primary key +# id :bigint not null, primary key # owner_type :string not null -# owner_id :bigint(8) not null +# owner_id :bigint not null # name :string not null # uid :string not null # secret :string not null diff --git a/app/models/old_node.rb b/app/models/old_node.rb index f29eed9dd..bb4022ba3 100644 --- a/app/models/old_node.rb +++ b/app/models/old_node.rb @@ -2,14 +2,14 @@ # # Table name: nodes # -# node_id :bigint(8) not null, primary key +# node_id :bigint not null, primary key # latitude :integer not null # longitude :integer not null -# changeset_id :bigint(8) not null +# changeset_id :bigint not null # visible :boolean not null # timestamp :datetime not null -# tile :bigint(8) not null -# version :bigint(8) not null, primary key +# tile :bigint not null +# version :bigint not null, primary key # redaction_id :integer # # Indexes diff --git a/app/models/old_node_tag.rb b/app/models/old_node_tag.rb index ee2d78c57..cae61a2c5 100644 --- a/app/models/old_node_tag.rb +++ b/app/models/old_node_tag.rb @@ -2,8 +2,8 @@ # # Table name: node_tags # -# node_id :bigint(8) not null, primary key -# version :bigint(8) not null, primary key +# node_id :bigint not null, primary key +# version :bigint not null, primary key # k :string default(""), not null, primary key # v :string default(""), not null # diff --git a/app/models/old_relation.rb b/app/models/old_relation.rb index 9f551d839..42f363f0e 100644 --- a/app/models/old_relation.rb +++ b/app/models/old_relation.rb @@ -2,10 +2,10 @@ # # Table name: relations # -# relation_id :bigint(8) not null, primary key -# changeset_id :bigint(8) not null +# relation_id :bigint not null, primary key +# changeset_id :bigint not null # timestamp :datetime not null -# version :bigint(8) not null, primary key +# version :bigint not null, primary key # visible :boolean default(TRUE), not null # redaction_id :integer # diff --git a/app/models/old_relation_member.rb b/app/models/old_relation_member.rb index f4bdab321..2e723c5bd 100644 --- a/app/models/old_relation_member.rb +++ b/app/models/old_relation_member.rb @@ -2,11 +2,11 @@ # # Table name: relation_members # -# relation_id :bigint(8) not null, primary key +# relation_id :bigint not null, primary key # member_type :enum not null -# member_id :bigint(8) not null +# member_id :bigint not null # member_role :string not null -# version :bigint(8) default(0), not null, primary key +# version :bigint default(0), not null, primary key # sequence_id :integer default(0), not null, primary key # # Indexes diff --git a/app/models/old_relation_tag.rb b/app/models/old_relation_tag.rb index d2070a683..081745412 100644 --- a/app/models/old_relation_tag.rb +++ b/app/models/old_relation_tag.rb @@ -2,10 +2,10 @@ # # Table name: relation_tags # -# relation_id :bigint(8) not null, primary key +# relation_id :bigint not null, primary key # k :string default(""), not null, primary key # v :string default(""), not null -# version :bigint(8) not null, primary key +# version :bigint not null, primary key # # Foreign Keys # diff --git a/app/models/old_way.rb b/app/models/old_way.rb index 0c53f90bd..a9c55cf30 100644 --- a/app/models/old_way.rb +++ b/app/models/old_way.rb @@ -2,10 +2,10 @@ # # Table name: ways # -# way_id :bigint(8) not null, primary key -# changeset_id :bigint(8) not null +# way_id :bigint not null, primary key +# changeset_id :bigint not null # timestamp :datetime not null -# version :bigint(8) not null, primary key +# version :bigint not null, primary key # visible :boolean default(TRUE), not null # redaction_id :integer # diff --git a/app/models/old_way_node.rb b/app/models/old_way_node.rb index 810acc066..714b38648 100644 --- a/app/models/old_way_node.rb +++ b/app/models/old_way_node.rb @@ -2,10 +2,10 @@ # # Table name: way_nodes # -# 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 +# way_id :bigint not null, primary key +# node_id :bigint not null +# version :bigint not null, primary key +# sequence_id :bigint not null, primary key # # Indexes # diff --git a/app/models/old_way_tag.rb b/app/models/old_way_tag.rb index 7b881bb24..32aea5b15 100644 --- a/app/models/old_way_tag.rb +++ b/app/models/old_way_tag.rb @@ -2,10 +2,10 @@ # # Table name: way_tags # -# way_id :bigint(8) not null, primary key +# way_id :bigint not null, primary key # k :string not null, primary key # v :string not null -# version :bigint(8) not null, primary key +# version :bigint not null, primary key # # Foreign Keys # diff --git a/app/models/redaction.rb b/app/models/redaction.rb index 5e9e0decd..7b25c6323 100644 --- a/app/models/redaction.rb +++ b/app/models/redaction.rb @@ -7,7 +7,7 @@ # description :text not null # created_at :datetime # updated_at :datetime -# user_id :bigint(8) not null +# user_id :bigint not null # description_format :enum default("markdown"), not null # # Foreign Keys diff --git a/app/models/relation.rb b/app/models/relation.rb index 69e2acfd1..0742976e8 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -2,11 +2,11 @@ # # Table name: current_relations # -# id :bigint(8) not null, primary key -# changeset_id :bigint(8) not null +# id :bigint not null, primary key +# changeset_id :bigint not null # timestamp :datetime not null # visible :boolean not null -# version :bigint(8) not null +# version :bigint not null # # Indexes # diff --git a/app/models/relation_member.rb b/app/models/relation_member.rb index 2b72cd2b1..c9723e48b 100644 --- a/app/models/relation_member.rb +++ b/app/models/relation_member.rb @@ -2,9 +2,9 @@ # # Table name: current_relation_members # -# relation_id :bigint(8) not null, primary key +# relation_id :bigint not null, primary key # member_type :enum not null -# member_id :bigint(8) not null +# member_id :bigint not null # member_role :string not null # sequence_id :integer default(0), not null, primary key # diff --git a/app/models/relation_tag.rb b/app/models/relation_tag.rb index 500b7d910..d23192b8e 100644 --- a/app/models/relation_tag.rb +++ b/app/models/relation_tag.rb @@ -2,7 +2,7 @@ # # Table name: current_relation_tags # -# relation_id :bigint(8) not null, primary key +# relation_id :bigint not null, primary key # k :string default(""), not null, primary key # v :string default(""), not null # diff --git a/app/models/trace.rb b/app/models/trace.rb index 4d71b4b29..3001d052c 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -2,11 +2,11 @@ # # Table name: gpx_files # -# id :bigint(8) not null, primary key -# user_id :bigint(8) not null +# id :bigint not null, primary key +# user_id :bigint not null # visible :boolean default(TRUE), not null # name :string default(""), not null -# size :bigint(8) +# size :bigint # latitude :float # longitude :float # timestamp :datetime not null diff --git a/app/models/tracepoint.rb b/app/models/tracepoint.rb index d36ceb8c3..198d8cd3e 100644 --- a/app/models/tracepoint.rb +++ b/app/models/tracepoint.rb @@ -6,9 +6,9 @@ # trackid :integer not null # latitude :integer not null # longitude :integer not null -# gpx_id :bigint(8) not null +# gpx_id :bigint not null # timestamp :datetime -# tile :bigint(8) +# tile :bigint # # Indexes # diff --git a/app/models/tracetag.rb b/app/models/tracetag.rb index b1dde095c..0e9fe126d 100644 --- a/app/models/tracetag.rb +++ b/app/models/tracetag.rb @@ -2,9 +2,9 @@ # # Table name: gpx_file_tags # -# gpx_id :bigint(8) not null +# gpx_id :bigint not null # tag :string not null -# id :bigint(8) not null, primary key +# id :bigint not null, primary key # # Indexes # diff --git a/app/models/user.rb b/app/models/user.rb index 8d061e26b..a63846e42 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -3,7 +3,7 @@ # Table name: users # # email :string not null -# id :bigint(8) not null, primary key +# id :bigint not null, primary key # pass_crypt :string not null # creation_time :datetime not null # display_name :string default(""), not null @@ -28,7 +28,7 @@ # diary_entries_count :integer default(0), not null # image_use_gravatar :boolean default(FALSE), not null # auth_provider :string -# home_tile :bigint(8) +# home_tile :bigint # tou_agreed :datetime # diary_comments_count :integer default(0) # note_comments_count :integer default(0) diff --git a/app/models/user_block.rb b/app/models/user_block.rb index 61235c418..f25bd47b8 100644 --- a/app/models/user_block.rb +++ b/app/models/user_block.rb @@ -3,12 +3,12 @@ # Table name: user_blocks # # id :integer not null, primary key -# user_id :bigint(8) not null -# creator_id :bigint(8) not null +# user_id :bigint not null +# creator_id :bigint not null # reason :text not null # ends_at :datetime not null # needs_view :boolean default(FALSE), not null -# revoker_id :bigint(8) +# revoker_id :bigint # created_at :datetime # updated_at :datetime # reason_format :enum default("markdown"), not null diff --git a/app/models/user_mute.rb b/app/models/user_mute.rb index 9bee39b8d..68f3bb679 100644 --- a/app/models/user_mute.rb +++ b/app/models/user_mute.rb @@ -2,9 +2,9 @@ # # Table name: user_mutes # -# id :bigint(8) not null, primary key -# owner_id :bigint(8) not null -# subject_id :bigint(8) not null +# id :bigint not null, primary key +# owner_id :bigint not null +# subject_id :bigint not null # created_at :datetime not null # updated_at :datetime not null # diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 5b91bbda9..35412c9e7 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -2,7 +2,7 @@ # # Table name: user_preferences # -# user_id :bigint(8) not null, primary key +# user_id :bigint not null, primary key # k :string not null, primary key # v :string not null # diff --git a/app/models/user_role.rb b/app/models/user_role.rb index 332848e42..d374b4084 100644 --- a/app/models/user_role.rb +++ b/app/models/user_role.rb @@ -3,11 +3,11 @@ # Table name: user_roles # # id :integer not null, primary key -# user_id :bigint(8) not null -# role :enum not null +# user_id :bigint not null # created_at :datetime # updated_at :datetime -# granter_id :bigint(8) not null +# role :enum not null +# granter_id :bigint not null # # Indexes # diff --git a/app/models/way.rb b/app/models/way.rb index 203d3b703..7357a280f 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -2,11 +2,11 @@ # # Table name: current_ways # -# id :bigint(8) not null, primary key -# changeset_id :bigint(8) not null +# id :bigint not null, primary key +# changeset_id :bigint not null # timestamp :datetime not null # visible :boolean not null -# version :bigint(8) not null +# version :bigint not null # # Indexes # diff --git a/app/models/way_node.rb b/app/models/way_node.rb index c57d3be79..b77827ada 100644 --- a/app/models/way_node.rb +++ b/app/models/way_node.rb @@ -2,9 +2,9 @@ # # Table name: current_way_nodes # -# way_id :bigint(8) not null, primary key -# node_id :bigint(8) not null -# sequence_id :bigint(8) not null, primary key +# way_id :bigint not null, primary key +# node_id :bigint not null +# sequence_id :bigint not null, primary key # # Indexes # diff --git a/app/models/way_tag.rb b/app/models/way_tag.rb index 04ce7abf5..2bf7fa887 100644 --- a/app/models/way_tag.rb +++ b/app/models/way_tag.rb @@ -2,7 +2,7 @@ # # Table name: current_way_tags # -# way_id :bigint(8) not null, primary key +# way_id :bigint not null, primary key # k :string default(""), not null, primary key # v :string default(""), not null # -- 2.39.5