Postgres: Operations, Hooks, OAuth login, Files support (#2528)

* Adds files related tests through fs-adapter with PG

* Schema deletions implementations

* Adds Hooks spec

* Fix test

* Adds support for containsAll (numbers and strings)

* Better support for deleteFields and deleteClass

* Recursive JSON update for authData

* Adds node_modules to travis cache

* Disable temporarily to make tests pass

* Adds _perishable_token support for _User class

* ignore when a table creation fails at init (table exists)

* Adds support for AddUnique and Remove

* PG 9.4 compatible functions

* Re-enable tests

* nit

* Better handling of schema creation race
This commit is contained in:
Florent Vilmart
2016-08-18 18:05:26 -04:00
committed by GitHub
parent 3164b478ea
commit 9ecb9a3595
18 changed files with 350 additions and 130 deletions

View File

@@ -86,6 +86,12 @@ const defaultColumns = Object.freeze({
"errorMessage": {type:'Object'},
"sentPerType": {type:'Object'},
"failedPerType":{type:'Object'},
},
_Hooks: {
"functionName": {type:'String'},
"className": {type:'String'},
"triggerName": {type:'String'},
"url": {type:'String'}
}
});
@@ -258,13 +264,13 @@ const injectDefaultSchema = ({className, fields, classLevelPermissions}) => ({
classLevelPermissions,
});
const VolatileClassesSchemas = volatileClasses.map((className) => {
return convertSchemaToAdapterSchema(injectDefaultSchema({
className,
const _HooksSchema = {className: "_Hooks", fields: defaultColumns._Hooks};
const _PushStatusSchema = convertSchemaToAdapterSchema(injectDefaultSchema({
className: "_PushStatus",
fields: {},
classLevelPermissions: {}
}));
});
}));
const VolatileClassesSchemas = [_HooksSchema, _PushStatusSchema];
const dbTypeMatchesObjectType = (dbType, objectType) => {
if (dbType.type !== objectType.type) return false;