Commit graph

8 commits

Author SHA1 Message Date
Eelco Dolstra 9afaf322b3 Use latest DBIx::Class::Schema::Loader 2015-07-30 16:55:11 +02:00
Shea Levy 002ac9ef63 Merge in the first bits of the API work
The catalyst-action-rest branch from shlevy/hydra was an exploration of
using Catalyst::Action::REST to create a JSON API for hydra. This commit
merges in the best bits from that experiment, with the goal that further
API endpoints can be added incrementally.

In addition to migrating more endpoints, there is potential for
improvement in what's already been done:
* The web interface can be updated to use the same non-GET endpoints as
  the JSON interface (using x-tunneled-method) instead of having a
  separate endpoint
* The web rendering should use the $c->stash->{resource} data structure
  where applicable rather than putting the same data in two places in
  the stash
* Which columns to render for each endpoint is a completely debatable
  question
* Hydra::Component::ToJSON should turn has_many relations that have
  strings as their primary keys into objects instead of arrays

Fixes NixOS/hydra#98

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-02 14:00:46 -04:00
Eelco Dolstra 1cf2a1592a Add missing upgrade-*.sql files 2012-04-15 23:23:01 +00:00
Ludovic Courtès 2b68e41ee4 Actually add SQL files to the distribution. 2012-03-13 17:49:18 +01:00
Ludovic Courtès ace94192ac Update the list of SQL files to be installed.
This fixes `hydra-init', which would otherwise not find `upgrade-*.sql',
thus skipping the update altogether.
2012-03-13 17:45:14 +01:00
Eelco Dolstra 541238030d Provide a command ‘hydra-init’ to initialise/upgrade the database
For schema upgrades, hydra-init executes the files
src/sql/upgrade-<N>.sql, each of which upgrades the schema from
version N-1 to N.  The upgrades are wrapped in a transaction.
2012-02-28 20:16:16 +01:00
Eelco Dolstra 9032c55aa6 Keep track of the database schema version
The singleton table SchemaVersion contains the current version
of the Hydra database schema.  This can be used to upgrade the
schema on the fly.

Also reran the DBIx::Class schema loader.
2011-12-05 14:29:29 +01:00
Rob Vermaas c37b90ee3e hydra: use autoconf/-make 2010-09-30 14:29:15 +00:00
Renamed from src/sql/Makefile (Browse further)