Skip to content

Remodel DB with paid actions at center? #1717

@huumn

Description

@huumn

As I'm working on satistics I'm realizing a lot of db model could use refactoring now that paid actions are pretty ubiquitous.

Something like a PaidAction table that's a parent of ItemAct, SubAct, etc. so it can include other things like buying CCs (needs its own special table otherwise), giving invite gifts (currently inferred), rewards, etc.

PaidAction {
    type
    state
    cost
    senderId
    receiverId
    paymentMethod
}

Then relevant rows in other tables (should they be needed) would belong to a PaidAction. This might make retries and other types of associations easier.

It's maybe not a high priority thing but it's longterm optimal afaict.

Metadata

Metadata

Assignees

Labels

questionfurther information is required

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions