Skip to content

Commit d43c028

Browse files
committed
Initial import
0 parents  commit d43c028

File tree

9 files changed

+111
-0
lines changed

9 files changed

+111
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
database
2+
*.tgz
3+
package

MIT-License.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2015-present Scott Bellware
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Postgres Message Store Database
2+
3+
Database definition and tools for PostgreSQL message store
4+
5+
## Installation
6+
7+
``` bash
8+
npm install @eventide/postgres-message-store
9+
```
10+
11+
## Documentation
12+
13+
See the message store documentation on the Eventide docs site:
14+
15+
[http://docs.eventide-project.org/user-guide/message-store/](http://docs.eventide-project.org/user-guide/message-store/)
16+
17+
## Database Definition Script Files
18+
19+
The database is defined by raw SQL scripts. You can examine them, or execute them directly with the `psql` command line tool.
20+
21+
[https://github.com/eventide-project/postgres-message-store-database/tree/master/database/](https://github.com/eventide-project/postgres-message-store-database/tree/master/database/)
22+
23+
## License
24+
25+
The `Postgres Message Store Database` library is released under the [MIT License](https://github.com/eventide-project/postgres-message-store-npm-package/blob/master/MIT-License.txt).

clean.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
rm -rf ./database
4+
rm -rf ./package
5+
rm -f eventide-postgres-message-store-*.tgz

import-database-scripts.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
echo
6+
echo "Importing Database Scripts to ./database"
7+
echo "= = ="
8+
9+
if [ -z ${MESSAGE_DB_HOME+x} ]; then
10+
echo "MESSAGE_DB_HOME is not set"
11+
exit
12+
fi
13+
14+
default_database_source="$MESSAGE_DB_HOME/message-db/database"
15+
if [ -z ${DATABASE_SOURCE+x} ]; then
16+
echo "(DATABASE_SOURCE is not set. Default will be used.)"
17+
database_source=$default_database_source
18+
else
19+
database_source=$DATABASE_SOURCE
20+
fi
21+
echo "Database source is: $database_source"
22+
23+
echo
24+
echo "Removing database directory (./database)"
25+
rm -rf ./database
26+
27+
echo "Copying database scripts from $database_source"
28+
cp -a $database_source ./database
29+
30+
echo
31+
echo '- - -'
32+
echo 'done'
33+
echo

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@eventide/message-db",
3+
"version": "1.0.0",
4+
"description": "Microservice native event store and message store for Postgres",
5+
"author": "Eventide Project",
6+
"license": "MIT",
7+
"homepage": "https://github.com/message-db/message-db",
8+
"files": [
9+
"MIT-License.txt",
10+
"README.md",
11+
"package.json",
12+
"database/*"
13+
]
14+
}

package.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
./import-database-scripts.sh
4+
rm eventide-postgres-message-store-*.tgz
5+
npm pack

publish.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
npm publish --access public

unpack.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
tar -xvzf ./eventide-postgres-message-store-*.tgz

0 commit comments

Comments
 (0)