-
-
Save ianpward/727e93e8ec8e85218f0231ed1fb5ebfc to your computer and use it in GitHub Desktop.
Javascript file that maps Realm objects to Postgres schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Bus = { | |
name: 'Bus', | |
primaryKey: 'vehicle', | |
properties: { | |
Scheduleid: {type: 'Schedule'}, | |
vehicle: 'int', | |
fleet_id: { type: 'string', optional: true }, | |
last_main: { type: 'date', optional: true } | |
} | |
}; | |
const Driver = { | |
name: 'Driver', | |
primaryKey: 'id', | |
properties: { | |
Busvehicle: {type: 'Bus'}, | |
id: 'int', | |
name: { type: 'string', optional: true }, | |
employ_date: { type: 'date', optional: true } | |
} | |
}; | |
const Schedule = { | |
name: 'Schedule', | |
primaryKey: 'id', | |
properties: { | |
id: 'int', | |
Routeid: {type: 'Route'}, | |
departure: { type: 'date', optional: true }, | |
arrival: { type: 'date', optional: true } | |
} | |
}; | |
const Route = { | |
name: 'Route', | |
primaryKey: 'id', | |
properties: { | |
id: 'string' | |
} | |
}; | |
module.exports = [ | |
Bus, | |
Driver, | |
Schedule, | |
Route | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
looks like there is an issue in line 5 of this gist