Go inside a clay project directory (i.e.: clay-starter)
Spin up an instance of clay with make
Open another terminal window or tab and make sure adminer is up and running using docker-compose up -d adminer
Make your way into the app directory (or where the package.json file is located) and link the previously mentioned packages with npm link amphora && npm link amphora-storage-postgres (make sure the packages are in the correct branch and linked)
Restart the clay instance with rs. After it's done, you should a message stating Migrations Complete
Go into http://localhost:8080 an login the db (system, server, username and database are all postgres; password is example)
Check that the schemas of all public tables have the following columns: created_at, which should default to the date the row was created; updated_at, which should default to the date the row was created and update itself if the data changes; and site_id, which should contain the site slug
Bootstrap the starter data with make bootstrap (where the Makefile is located)
You should be able to see in all the public tables new entries with all the previous columns plus the new ones.
You should be able to update, publish, archive and everything else without ay problems
Description
publish
,create
andputLatest
methods fromservices/pages
to be able to send thesiteSlug
to the db.put
, methods fromservices/uris
to be able to send thesiteSlug
to the db.putRouteFromDB
, methods fromservices/response
to be able to send thesiteSlug
to the db.QA
In order to be able to test this feature, you should link this package and https://github.com/clay/amphora-storage-postgres/pull/45 in a clay project. I've been using https://github.com/clay/clay-starter to develop this feature, that's a good starting point.
Testing steps
clay-starter
)make
adminer
is up and running usingdocker-compose up -d adminer
app
directory (or where thepackage.json
file is located) and link the previously mentioned packages withnpm link amphora && npm link amphora-storage-postgres
(make sure the packages are in the correct branch and linked)rs
. After it's done, you should a message statingMigrations Complete
postgres
; password isexample
)created_at
, which should default to the date the row was created;updated_at
, which should default to the date the row was created and update itself if the data changes; andsite_id
, which should contain the site slugmake bootstrap
(where theMakefile
is located)