Closed timwis closed 7 years ago
postgrest + lapidus gets you realtime
I don't think postgresql will let you change a field type if it will make existing values invalid
I started building on PostgREST but I'm looking over my shoulder now because there's no built-in way to add/alter/drop columns, so we'll have to use stored procedures (plus figure out how to send a HUP signal to the postgrest application) (#13), and that feels a bit like starting to make our own back-end...
On a separate note, I came across a related API generator from IBM called LoopBack. Probably the cool part of IBM.
Things are pretty well underway with postgrest. It's been abstracted to the point where I don't expect it would be too dramatic to change, but I expect we can close this issue for now.
Below are all the things I imagine the back-end will need to perform.
Reading
Writing (also notifications if other users write)
Relationships
We want users to be able to associate a record in one table with a record in another table. Fieldbook takes the approach of always making this relationship many-to-many. My assumption is because that relationship is easiest for less technical users to understand: records are simply "associated" with one another, so why shouldn't a
post
have more than oneuser
associated with it?If many-to-many meets the most use cases then I think we should build for that. The question is whether there's a use case that many-to-many can't accommodate?
As far as how to accomplish this, one way (perhaps the only) is to have a
joins
table withleft
andright
fields containing the record ids. Although what if you want yourposts
table to have anauthor
field and aneditor
field, both linking to theusers
table? We'd need to associate thejoins
table records with a particular relationship, requiring arelationships
table. Too complex?Back-end options
PostgresT
Kinto
Thoughts? Other options?