Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c078d695a8 | |||
| 55ffadc742 | |||
| 56574d43ce | |||
| e16f02ce12 | |||
| c34fad3502 | |||
| 156006053b |
@@ -22,7 +22,7 @@ steps:
|
|||||||
from_secret: docs_deploy_key
|
from_secret: docs_deploy_key
|
||||||
port: 22
|
port: 22
|
||||||
source: extollo_api_documentation.tar.gz
|
source: extollo_api_documentation.tar.gz
|
||||||
target: /var/nfs/general/static/sites/extollo
|
target: /var/nfs/storage/static/sites/extollo
|
||||||
when:
|
when:
|
||||||
event: promote
|
event: promote
|
||||||
target: docs
|
target: docs
|
||||||
@@ -38,7 +38,7 @@ steps:
|
|||||||
from_secret: docs_deploy_key
|
from_secret: docs_deploy_key
|
||||||
port: 22
|
port: 22
|
||||||
script:
|
script:
|
||||||
- cd /var/nfs/general/static/sites/extollo
|
- cd /var/nfs/storage/static/sites/extollo
|
||||||
- rm -rf docs
|
- rm -rf docs
|
||||||
- tar xzf extollo_api_documentation.tar.gz
|
- tar xzf extollo_api_documentation.tar.gz
|
||||||
- rm -rf extollo_api_documentation.tar.gz
|
- rm -rf extollo_api_documentation.tar.gz
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@extollo/lib",
|
"name": "@extollo/lib",
|
||||||
"version": "0.5.2",
|
"version": "0.5.4",
|
||||||
"description": "The framework library that lifts up your code.",
|
"description": "The framework library that lifts up your code.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
|||||||
@@ -11,3 +11,5 @@ export * from './directive/options/PositionalOption'
|
|||||||
export * from './directive/ShellDirective'
|
export * from './directive/ShellDirective'
|
||||||
export * from './directive/TemplateDirective'
|
export * from './directive/TemplateDirective'
|
||||||
export * from './directive/UsageDirective'
|
export * from './directive/UsageDirective'
|
||||||
|
|
||||||
|
export * from './decorators'
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import {Inject, Injectable} from '../di'
|
||||||
|
import {ConstraintType, DatabaseService, FieldType, Migration, Schema} from '../orm'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration that creates the sessions table used by the ORMSession backend.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export default class CreateSessionsTableMigration extends Migration {
|
||||||
|
@Inject()
|
||||||
|
protected readonly db!: DatabaseService
|
||||||
|
|
||||||
|
async up(): Promise<void> {
|
||||||
|
const schema: Schema = this.db.get().schema()
|
||||||
|
const table = await schema.table('sessions')
|
||||||
|
|
||||||
|
table.primaryKey('session_uuid', FieldType.varchar)
|
||||||
|
.required()
|
||||||
|
|
||||||
|
table.column('session_data')
|
||||||
|
.type(FieldType.json)
|
||||||
|
.required()
|
||||||
|
.default('{}')
|
||||||
|
|
||||||
|
table.constraint('session_uuid_ck')
|
||||||
|
.type(ConstraintType.Check)
|
||||||
|
.expression('LENGTH(session_uuid) > 0')
|
||||||
|
|
||||||
|
await schema.commit(table)
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(): Promise<void> {
|
||||||
|
const schema: Schema = this.db.get().schema()
|
||||||
|
const table = await schema.table('sessions')
|
||||||
|
|
||||||
|
table.dropIfExists()
|
||||||
|
|
||||||
|
await schema.commit(table)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import {Inject, Injectable} from '../di'
|
||||||
|
import {DatabaseService, FieldType, Migration, Schema} from '../orm'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration that creates the users table used by @extollo/lib.auth.
|
||||||
|
*/
|
||||||
|
@Injectable()
|
||||||
|
export default class CreateUsersTableMigration extends Migration {
|
||||||
|
@Inject()
|
||||||
|
protected readonly db!: DatabaseService
|
||||||
|
|
||||||
|
async up(): Promise<void> {
|
||||||
|
const schema: Schema = this.db.get().schema()
|
||||||
|
const table = await schema.table('users')
|
||||||
|
|
||||||
|
table.primaryKey('user_id')
|
||||||
|
.required()
|
||||||
|
|
||||||
|
table.column('first_name')
|
||||||
|
.type(FieldType.varchar)
|
||||||
|
.nullable()
|
||||||
|
|
||||||
|
table.column('last_name')
|
||||||
|
.type(FieldType.varchar)
|
||||||
|
.nullable()
|
||||||
|
|
||||||
|
table.column('password_hash')
|
||||||
|
.type(FieldType.text)
|
||||||
|
.nullable()
|
||||||
|
|
||||||
|
table.column('username')
|
||||||
|
.type(FieldType.varchar)
|
||||||
|
.required()
|
||||||
|
.unique()
|
||||||
|
|
||||||
|
await schema.commit(table)
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(): Promise<void> {
|
||||||
|
const schema: Schema = this.db.get().schema()
|
||||||
|
const table = await schema.table('users')
|
||||||
|
|
||||||
|
table.dropIfExists()
|
||||||
|
|
||||||
|
await schema.commit(table)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user