Merge remote-tracking branch 'origin/1920-feature-create-contribution-link-table' into 1921-feature-contribution-link-crud-in-admin-resolver

This commit is contained in:
Claus-Peter Hübner 2022-06-09 22:40:24 +02:00
commit 4fdaebe8db
3 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
*.log
*.bak
/node_modules/*
messages.pot
nbproject

View File

@ -72,8 +72,8 @@ export class ContributionLinks extends BaseEntity {
})
minGapHours: number | null
@Column({ name: 'created_at', type: 'datetime', nullable: true, default: null })
createdAt: Date | null
@Column({ name: 'created_at', type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
createdAt: Date
@DeleteDateColumn()
deletedAt: Date | null
@ -81,6 +81,6 @@ export class ContributionLinks extends BaseEntity {
@Column({ length: 24, nullable: true, collation: 'utf8mb4_unicode_ci' })
code: string
@Column({ name: 'link_enabled', type: 'boolean', nullable: true, default: null })
linkEnabled: boolean | null
@Column({ name: 'link_enabled', type: 'boolean', default: true })
linkEnabled: boolean
}

View File

@ -24,7 +24,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
\`created_at\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
\`deleted_at\` datetime NULL DEFAULT NULL,
\`code\` varchar(24) COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
\`link_enabled\` tinyint(4) NOT NULL DEFAULT '0',
\`link_enabled\` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (\`id\`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`)
}