Skip to content

Commit d3c56ba

Browse files
committed
chore: fix failing CI checks
Frontend static check: prettier formatting in getProgressData.test.ts. Schema check: regenerate apiSchema.generated.ts for the two new error codes (plan_incomplete_usd_pricing, self_hosted_plan_usd_price_only_for_hosted_words). Migration check: declare @ColumnDefault on the word columns. The DB defaults were added by the changesets but not by the entities, so the diff wanted to drop them. Their sibling columns all carry the annotation; keeping the defaults means a non-JPA insert still has a fallback for the NOT NULL constraint.
1 parent 80f41f9 commit d3c56ba

4 files changed

Lines changed: 10 additions & 1 deletion

File tree

ee/backend/app/src/main/kotlin/io/tolgee/ee/model/EeSubscription.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,13 @@ class EeSubscription :
105105
/**
106106
* How many words are included in the subscription plan
107107
*/
108+
@ColumnDefault("0")
108109
var includedWords: Long = 0L
109110

110111
/**
111112
* How many words can a customer use until they reach spending limit
112113
*/
114+
@ColumnDefault("-1")
113115
var wordsLimit: Long = -1L
114116

115117
/**

ee/backend/app/src/main/kotlin/io/tolgee/ee/model/UsageToReport.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import io.tolgee.model.AuditModel
55
import jakarta.persistence.Entity
66
import jakarta.persistence.Id
77
import jakarta.persistence.Table
8+
import org.hibernate.annotations.ColumnDefault
89
import java.util.Date
910

1011
/**
@@ -36,6 +37,7 @@ class UsageToReport :
3637
/**
3738
* Number of words reported in the last report
3839
*/
40+
@ColumnDefault("0")
3941
override var lastReportedWords: Long = 0
4042

4143
/**
@@ -51,6 +53,7 @@ class UsageToReport :
5153
/**
5254
* Number of words that need to be reported in the next report
5355
*/
56+
@ColumnDefault("0")
5457
override var wordsToReport: Long = 0
5558

5659
/**

webapp/src/ee/billing/component/getProgressData.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('usage progress', () => {
2222
currentWords: 100,
2323
isPayAsYouGo: false,
2424
...overrides,
25-
}) as any;
25+
} as any);
2626

2727
it('hides the seat bar when seats are not enforced', () => {
2828
const { seatsProgress } = getProgressData({ usage: usage() });

webapp/src/service/apiSchema.generated.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3060,6 +3060,8 @@ export interface components {
30603060
| "cannot_create_free_plan_without_fixed_type"
30613061
| "cannot_modify_plan_free_status"
30623062
| "plan_invoiced_requires_free"
3063+
| "plan_incomplete_usd_pricing"
3064+
| "self_hosted_plan_usd_price_only_for_hosted_words"
30633065
| "key_id_not_provided"
30643066
| "free_self_hosted_seat_limit_exceeded"
30653067
| "advanced_params_not_supported"
@@ -6987,6 +6989,8 @@ export interface components {
69876989
| "cannot_create_free_plan_without_fixed_type"
69886990
| "cannot_modify_plan_free_status"
69896991
| "plan_invoiced_requires_free"
6992+
| "plan_incomplete_usd_pricing"
6993+
| "self_hosted_plan_usd_price_only_for_hosted_words"
69906994
| "key_id_not_provided"
69916995
| "free_self_hosted_seat_limit_exceeded"
69926996
| "advanced_params_not_supported"

0 commit comments

Comments
 (0)