Skip to content

Commit

Permalink
switch tile x and y to i32
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Nov 1, 2024
1 parent 6edaeab commit f42a2cf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions migrations/2024-11-01-080726_tile_cache/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
CREATE TABLE gtfs.tile_storage (
category smallint not null,
z smallint not null,
x smallint not null,
y smallint not null,
x int not null,
y int not null,
mvt_data bytea not null,
added_time Timestamptz not null,

Expand Down
4 changes: 2 additions & 2 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ pub struct IpToGeoAddr {
pub struct TileStorage {
pub category: i16,
pub z: i16,
pub x: i16,
pub y: i16,
pub x: i32,
pub y: i32,
pub mvt_data: Vec<u8>,
pub added_time: chrono::DateTime<chrono::Utc>
}
4 changes: 2 additions & 2 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ pub mod gtfs {
gtfs.tile_storage (category, z, x, y) {
category -> Int2,
z -> Int2,
x -> Int2,
y -> Int2,
x -> Int4,
y -> Int4,
mvt_data -> Bytea,
added_time -> Timestamptz,
}
Expand Down
3 changes: 3 additions & 0 deletions src/tile_save_and_get.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub fn insert_tile(z: i16, x: i32, y: i32) {

}

0 comments on commit f42a2cf

Please sign in to comment.