-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial documentation instructions for schema
- Loading branch information
Christopher Browne
committed
Jun 16, 2016
1 parent
a69883b
commit 2adb433
Showing
4 changed files
with
99 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sqitch.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |