Files
kami-parse-server/spec
Paulo Reis cb8f038ca8 #4338 pg schema upgrade (#4375)
* Method to upgrade schemas in Postgres;

Adds:
  - schemaUpgrade method which check the fields to add and delete from old schema;

* Remove the columns delete in schemaUpgrade method;

* ESLint fix and PostgresStorageAdapter.schemaUpgrade spec test

Adds:
  - Add PostgresStorageAdapter.schemaUpgrade spec tests: creates a table,
    simulates the addition of a new field and checks if its present in the database
Chores:
  - ESLint eol-last fix;

* Add check columns before and after schema upgrade, and remove the unnecessary piece of code

Add:
  - Check the right columns is present before schema upgrade and the new field is not,
    then check if the right columns is present and the new field;
Remove:
  - Piece of code unnecessary because it not need to remove diff columns;

* Optimize the schemaUpgrade method following @vitaly-t instructions, and more tests;

* If the class does not have any columns and needs an upgrade the code would
return without doing so. Fixed this.

Chore:
  - Allows class with no column to be upgraded;
  - Test for class with no columns being upgraded;

* Update PostgresStorageAdapter.js

rewriting method schemaUpgrade

* Update PostgresStorageAdapter.spec.js

* Update PostgresStorageAdapter.spec.js
2018-01-03 03:23:05 +00:00
..
2016-05-19 13:38:16 -07:00
2016-04-04 20:02:34 -04:00
2017-10-26 16:23:27 -04:00
2017-11-17 08:32:58 -05:00
2017-09-04 20:47:49 -04:00
2016-02-29 18:55:14 -05:00
2017-02-21 15:06:45 -05:00
2016-02-17 08:06:30 -05:00
2016-03-18 12:32:31 -07:00
2017-12-01 09:16:58 -05:00
2016-08-07 20:02:53 -07:00