Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/lsat manual migration lsat #796

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dist/src/controllers/lsats.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/controllers/lsats.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/src/utils/migrate.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/controllers/lsats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export async function saveLsat(
}

try {
console.log('We are trying to save LSAT, means there was a database error')
lsat.setPreimage(preimage)
await models.Lsat.create({
macaroon,
Expand All @@ -170,6 +171,7 @@ export async function saveLsat(

return success(res, { lsat: lsat.toToken() })
} catch (e) {
sphinxLogger.error(`Tobi logging error: ${JSON.stringify(e)}`)
return failure(res, `failed to save lsat: ${e.message || e}`)
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/utils/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ export default async function migrate(): Promise<void> {
try {
sphinxLogger.info('adding lsat table', logging.DB)
await sequelize.query(`
CREATE TABLE sphinx_relay_lsats (
id BIGINT NOT NULL PRIMARY KEY,
lsat_identifier TEXT,
CREATE TABLE sphinx_lsats (
id INTEGER PRIMARY KEY AUTOINCREMENT,
identifier TEXT,
created_at DATETIME,
updated_at DATETIME,
macaroon TEXT,
Expand Down
Loading