Skip to content

Commit

Permalink
Refactor budget elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
deeravenger committed Oct 19, 2024
1 parent 707d3be commit cc1b39c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/EconumoOneBundle/Domain/Entity/BudgetElementOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class BudgetElementOption
{
public const POSITION_UNSET = -1;
public const POSITION_UNSET = 0;

private DateTimeImmutable $createdAt;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<field name="updatedAt" type="datetime" column="updated_at" nullable="false"/>
<field name="position" type="smallint" column="position" nullable="false">
<options>
<option name="unsigned">false</option>
<option name="unsigned">true</option>
<option name="default">0</option>
</options>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function up(Schema $schema) : void
, currency_id CHAR(36) DEFAULT NULL --(DC2Type:uuid)
, folder_id CHAR(36) DEFAULT NULL --(DC2Type:uuid)
, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
, updated_at DATETIME NOT NULL, position SMALLINT DEFAULT 0 NOT NULL, PRIMARY KEY(element_id, element_type, budget_id))');
, updated_at DATETIME NOT NULL, position SMALLINT UNSIGNED DEFAULT 0 NOT NULL, PRIMARY KEY(element_id, element_type, budget_id))');
$this->addSql('CREATE INDEX IDX_519D432336ABA6B8 ON budgets_elements_options (budget_id)');
$this->addSql('CREATE INDEX IDX_519D432338248176 ON budgets_elements_options (currency_id)');
$this->addSql('CREATE INDEX IDX_519D4323162CB942 ON budgets_elements_options (folder_id)');
Expand Down

0 comments on commit cc1b39c

Please sign in to comment.