Skip to content

Commit

Permalink
removed more differences
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Aug 23, 2024
1 parent 6ff2a9b commit 33f2800
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion server/backend/migration/20220713000000.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// InitialCafeteria stores all Available cafeterias in the format of the eat-api
type InitialCafeteria struct {
Cafeteria int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteria;type:int;not null;" json:"canteen" `
Name string `gorm:"column:name;type:mediumtext;not null;" json:"name" `
Name string `gorm:"column:name;type:text;not null;" json:"name" `
Address string `gorm:"column:address;type:text;not null;" json:"address" `
Latitude float32 `gorm:"column:latitude;type:float;not null;" json:"latitude" `
Longitude float32 `gorm:"column:longitude;type:float;not null;" json:"longitude"`
Expand Down
2 changes: 1 addition & 1 deletion server/backend/migration/static_data/source-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ create table if not exists devices
osVersion text default ('') not null,
appVersion text default ('') not null,
counter int default 0 not null,
pk longtext null,
pk text null,
pkActive enum ('true', 'false') default 'false' not null,
gcmToken text null,
gcmStatus varchar(200) null,
Expand Down
2 changes: 1 addition & 1 deletion server/model/cafeteria.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package model
// Cafeteria stores all Available cafeterias in the format of the eat-api
type Cafeteria struct {
Cafeteria int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteria;type:int;not null;" json:"canteen" `
Name string `gorm:"column:name;type:mediumtext;not null;" json:"name" `
Name string `gorm:"column:name;type:text;not null;" json:"name" `
Address string `gorm:"column:address;type:text;not null;" json:"address" `
Latitude float32 `gorm:"column:latitude;type:float;not null;" json:"latitude" `
Longitude float32 `gorm:"column:longitude;type:float;not null;" json:"longitude"`
Expand Down
8 changes: 4 additions & 4 deletions server/model/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ type Device struct {
UUID string `gorm:"column:uuid;type:varchar(50);not null" json:"uuid"`
Created null.Time `gorm:"column:created;type:timestamp;" json:"created"`
LastAccess time.Time `gorm:"column:lastAccess;type:timestamp;default:CURRENT_TIMESTAMP;OnUpdate:CURRENT_TIMESTAMP;not null" json:"last_access"`
LastAPI string `gorm:"column:lastApi;type:text;not null" json:"last_api"`
LastAPI string `gorm:"column:lastApi;type:text;not null;default:('')" json:"last_api"`
Developer string `gorm:"column:developer;type:enum('true','false');default:'false';not null" json:"developer"`
OsVersion string `gorm:"column:osVersion;type:text;not null" json:"os_version"`
AppVersion string `gorm:"column:appVersion;type:text;not null" json:"app_version"`
OsVersion string `gorm:"column:osVersion;type:text;not null;default:('')" json:"os_version"`
AppVersion string `gorm:"column:appVersion;type:text;not null;default:('')" json:"app_version"`
Counter int32 `gorm:"column:counter;type:int;default:0;not null" json:"counter"`
Pk null.String `gorm:"column:pk;type:text;size:4294967295;" json:"pk"`
Pk null.String `gorm:"column:pk;type:text;" json:"pk"`
PkActive string `gorm:"column:pkActive;type:enum('true', 'false');default:'false';not null" json:"pk_active"`
GcmToken null.String `gorm:"column:gcmToken;type:text;size:65535;" json:"gcm_token"`
GcmStatus null.String `gorm:"column:gcmStatus;type:varchar(200);" json:"gcm_status"`
Expand Down

0 comments on commit 33f2800

Please sign in to comment.