Skip to content

DB migration for box monetary value and stock#831

Open
pylipp wants to merge 1 commit into
masterfrom
db-migration-box-monetary-value-weight
Open

DB migration for box monetary value and stock#831
pylipp wants to merge 1 commit into
masterfrom
db-migration-box-monetary-value-weight

Conversation

@pylipp

@pylipp pylipp commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds database support for storing per-stock weight and monetary value, plus a camp-level currency field to contextualize monetary values.

Changes:

  • Adds weight_display_unit_id, weight, and monetary_value columns to stock and links the unit to units(id) via a foreign key.
  • Adds a currency column to camps (defaulting to EUR).

Comment on lines +10 to +15
->addColumn('weight_display_unit_id', 'integer', [
'null' => true,
'default' => 1, // kilogram
'signed' => false,
'after' => 'size_id',
])
->save()
;
$this->table('camps')
->addColumn('currency', 'string', [

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @HaGuesto currencyname is the freeshop currency, e.g. 'Tokens'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants