mirror of
https://github.com/getAlby/hub.git
synced 2026-08-15 12:50:56 +02:00
* feat: track last settled transaction time for apps * fix: use default subwallet ordering and app_id logging in event handler * chore: rename to last_settled_transaction_at and remove last tx migration * chore: split app settlement update and budget check * chore: extract app display name helper into utils function |
||
|---|---|---|
| .. | ||
| 202401191539_initial_migration.go | ||
| 202401191539_initial_migration.sql.tmpl | ||
| 202403171120_delete_ldk_payments.go | ||
| 202404021909_nullable_expires_at.go | ||
| 202405302121_store_decrypted_request.go | ||
| 202406061259_delete_content.go | ||
| 202406071726_vacuum.go | ||
| 202406301207_rename_request_methods.go | ||
| 202407012100_transactions.go | ||
| 202407151352_autoincrement.go | ||
| 202407201604_transactions_indexes.go | ||
| 202407262257_remove_invalid_scopes.go | ||
| 202408061737_add_boostagrams_and_use_json.go | ||
| 202408191242_transaction_failure_reason.go | ||
| 202408291715_app_metadata.go | ||
| 202410141503_add_wallet_pubkey.go | ||
| 202412212345_fix_types.go | ||
| 202504231037_add_indexes.go | ||
| 202504231037_hold_invoices.go | ||
| 202506170342_swaps.go | ||
| 202508041712_delete_non_cascade_deleted_records.go | ||
| 202508041737_postgres_amount_bigint.go | ||
| 202508041738_app_last_used.go | ||
| 202508041739_response_events_index.go | ||
| 202508151405_swap_xpub.go | ||
| 202508192137_forwards.go | ||
| 202509031250_transactions_updated_at_index.go | ||
| 202604081200_app_last_settled_transaction.go | ||
| migrate.go | ||
| README.md | ||
Creating a new migration
- Create a new file based on the current date and time (see existing migration format)
- Copy the following code and update MY_ID_HERE and MY_COMMENT_HERE and DO_SOMETHING_HERE
- Add the ID to the list of migrations in migrate.go
package migrations
import (
"github.com/go-gormigrate/gormigrate/v2"
"gorm.io/gorm"
)
// MY_COMMENT_HERE
var _MY_ID_HERE = &gormigrate.Migration {
ID: "MY_ID_HERE",
Migrate: func(tx *gorm.DB) error {
return DO_SOMETHING_HERE.Error;
},
Rollback: func(tx *gorm.DB) error {
return nil;
},
}