Skip to content

Commit

Permalink
Add initial documentation instructions for schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Browne committed Jun 16, 2016
1 parent a69883b commit 2adb433
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 13 deletions.
61 changes: 61 additions & 0 deletions INSTALL.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
* Installation of Schemaverse

** Installation of dependencies

Schemaverse depends on several things:

- PostgreSQL version 9.3 (or better; later could be a lot better, who knows???)
- If you're planning to install Schemaverse, you most likely
already know how to manage a PostgreSQL instance
- Perl and DBD, reasonably recent versions
- Easy to get from common distribution makers
- For installation, [[https://github.com/theory/sqitch.git][sqitch]]
- Which is not included even in modern versions of Debian
- Which depends on Perl Dist:Zilla
- Where parts are included in modern Debian, but other parts not...

** Installing Schemaverse Database using Squitch

Requires:
- PostgreSQL 9.3 or so
- A suitable user
- sqitch
- Head to the schema directory and customize sqitch.conf.

A sample sqitch-sample.conf is provided; uncomment things to
correspond to your preferred configuration:
- Favored client (e.g. - where to find binaries for psql)
- User name, database name, port, host, and such
- This is used to assemble the Perl DBI URI in TARGET, such as the following:
- Note that the name that /sqitch/ wants used is ~sqitch.conf~;
the sample that we provide is marked as ignorable by Git, so
you can have your own copy.
#+BEGIN_EXAMPLE
target = db:pg://cbbrowne@localhost:7099/schemaverse
#+END_EXAMPLE
- Create the desired database via PostgreSQL ~createdb~ or SQL ~CREATE DATABASE~.
- When ready to deploy:
#+BEGIN_EXAMPLE
Deploying changes to db:pg://cbbrowne@localhost:7099/schemaverse
+ role-players ....................... ok
+ sequence-round_seq ................. ok
+ sequence-tic_seq ................... ok
+ function-generate_string ........... ok
+ table-player ....................... ok
+ sequence-player_id_seq ............. ok
+ data-schemaverse_player ............ ok
+ view-my_player ..................... ok
... lots omitted ...
+ table-player_round_stats ........... ok
+ table-player_overall_stats ......... ok
+ view-current_round_stats ........... ok
+ table-round_stats .................. ok
+ function-round_control ............. ok
+ indexes ............................ ok
+ permissions ........................ ok
cbbrowne@cbbrowne ~/P/s/schema>
#+END_EXAMPLE
- There should now be a database consisting of a series of tables,
views, and functions, implementing the database engine side of
Schemaverse. Congratulations
- There is also a schema called ~sqitch~ containing metadata about the installation of the database.
1 change: 1 addition & 0 deletions schema/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sqitch.conf
20 changes: 20 additions & 0 deletions schema/sqitch-sample.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[core]
engine = pg
plan_file = sqitch.plan
top_dir = .
deploy_dir = deploy
revert_dir = revert
verify_dir = verify
extension = sql
[core "pg"]
# client = /var/lib/postgresql/dbs/postgresql-HEAD/bin/psql
# username = cbbrowne
# password =
# cb_name = schemaverse
# host = localhost
# port = 7099
# sqitch_schema = sqitch
[engine "pg"]
target = db:pg://cbbrowne@localhost:7099/schemaverse
client = /var/lib/postgresql/dbs/postgresql-HEAD/bin/psql
sqitch_schema = sqitch
30 changes: 17 additions & 13 deletions schema/sqitch.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
[core]
engine = pg
# plan_file = sqitch.plan
# top_dir = .
# deploy_dir = deploy
# revert_dir = revert
# verify_dir = verify
# extension = sql
# [core "pg"]
# client = /usr/local/pgsql/bin/psql
# username =
plan_file = sqitch.plan
top_dir = .
deploy_dir = deploy
revert_dir = revert
verify_dir = verify
extension = sql
[core "pg"]
client = /var/lib/postgresql/dbs/postgresql-HEAD/bin/psql
username = cbbrowne
# password =
# db_name =
# host =
# port =
# sqitch_schema = sqitch
db_name = schemaverse
host = localhost
port = 7099
sqitch_schema = sqitch
[engine "pg"]
target = db:pg://cbbrowne@localhost:7099/schemaverse
client = /var/lib/postgresql/dbs/postgresql-HEAD/bin/psql
sqitch_schema = sqitch

0 comments on commit 2adb433

Please sign in to comment.