correct nullable columns vs nullable attributes

This commit is contained in:
Claus-Peter Hübner 2022-06-09 22:54:26 +02:00
parent 4fdaebe8db
commit e769390868
2 changed files with 11 additions and 11 deletions

View File

@ -31,8 +31,8 @@ export class ContributionLink {
@Field(() => String)
code: string
@Field(() => Date, { nullable: true })
createdAt: Date | null
@Field(() => Date)
createdAt: Date
@Field(() => String)
cycle: string
@ -46,17 +46,17 @@ export class ContributionLink {
@Field(() => Int)
id?: number
@Field(() => Boolean, { nullable: true })
linkEnabled: boolean | null
@Field(() => Boolean)
linkEnabled: boolean
@Field(() => String)
link: string
@Field(() => Decimal)
maxAccountBalance: Decimal
@Field(() => Decimal, { nullable: true })
maxAccountBalance: Decimal | null
@Field(() => Decimal)
maxAmountPerMonth: Decimal
@Field(() => Decimal, { nullable: true })
maxAmountPerMonth: Decimal | null
@Field(() => String)
memo: string
@ -70,8 +70,8 @@ export class ContributionLink {
@Field(() => Int)
repetition: number
@Field(() => Date, { nullable: true })
startDate: Date | null
@Field(() => Date)
startDate: Date
@Field(() => Int, { nullable: true })
totalMaxCountOfContribution: number | null

View File

@ -12,7 +12,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
\`id\` int(10) unsigned NOT NULL AUTO_INCREMENT,
\`name\` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
\`memo\` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
\`valid_from\` datetime NULL,
\`valid_from\` datetime NOT NULL,
\`valid_to\` datetime NULL,
\`amount\` bigint(20) NOT NULL,
\`cycle\` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ONCE',