change Cycle Type in tabel ContributionLinks

This commit is contained in:
Claus-Peter Hübner 2022-06-07 22:13:27 +02:00
parent 74bcdaf8c4
commit bb35332e2e
6 changed files with 73 additions and 25 deletions

View File

@ -0,0 +1,2 @@
'U<EFBFBD>[V<EFBFBD>$<EFBFBD><EFBFBD>8%<EFBFBD>k<EFBFBD>ِQN<EFBFBD><EFBFBD>,
<EFBFBD>ؤـ`W<EFBFBD>-T3NvU<EFBFBD><EFBFBD>ظ{<EFBFBD>ية<EFBFBD><EFBFBD><EFBFBD>هه<EFBFBD><EFBFBD><EFBFBD>HK­~ح,<EFBFBD><EFBFBD>DXدpX<EFBFBD><EFBFBD>.g/¤<EFBFBD>،:<EFBFBD>ِ?B9|<EFBFBD><EFBFBD>GZn>¤بؤ/

View File

@ -0,0 +1,33 @@
{
"folders": {},
"connections": {
"mariaDB-1813fbbc7bc-107c0b3aeaeb91ab": {
"provider": "mysql",
"driver": "mariaDB",
"name": "gradido",
"save-password": true,
"read-only": false,
"configuration": {
"host": "localhost",
"port": "3306",
"database": "gradido",
"url": "jdbc:mariadb://localhost:3306/gradido",
"home": "mysql_client",
"type": "dev",
"auth-model": "native",
"handlers": {}
}
}
},
"connection-types": {
"dev": {
"name": "Development",
"color": "255,255,255",
"description": "Regular development database",
"auto-commit": true,
"confirm-execute": false,
"confirm-data-change": false,
"auto-close-transactions": false
}
}
}

View File

@ -0,0 +1,3 @@
4ƒk׀ךֻ1°,<EFBFBD>fעbלAלqִ¬cי<EFBFBD>#¾צ¾ר#s8-ְ1&»;נצד"¢פשל7d¥jM?bljfB¼ƒqֱ=
<EFBFBD>ײmyפ¿
vת·´V 

View File

@ -0,0 +1,32 @@
{
"folders": {},
"connections": {
"mariaDB-1813fbbc7bc-107c0b3aeaeb91ab": {
"provider": "mysql",
"driver": "mariaDB",
"name": "gradido",
"save-password": true,
"read-only": false,
"configuration": {
"host": "localhost",
"port": "3306",
"url": "jdbc:mariadb://localhost:3306/",
"home": "mysql_client",
"type": "dev",
"auth-model": "native",
"handlers": {}
}
}
},
"connection-types": {
"dev": {
"name": "Development",
"color": "255,255,255",
"description": "Regular development database",
"auto-commit": true,
"confirm-execute": false,
"confirm-data-change": false,
"auto-close-transactions": false
}
}
}

View File

@ -2,28 +2,6 @@ import Decimal from 'decimal.js-light'
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer'
export enum CycleTypes {
ONCE = 1,
HOUR = 2,
TWOHOURS = 3,
FOURHOURS = 4,
EIGHTHOURS = 5,
HALFDAY = 6,
DAY = 7,
TWODAYS = 8,
THREEDAYS = 9,
FOURDAYS = 10,
FIVEDAYS = 11,
SIXDAYS = 12,
WEEK = 13,
TWOWEEKS = 14,
MONTH = 15,
TWOMONTH = 16,
QUARTER = 17,
HALFYEAR = 18,
YEAR = 19,
}
@Entity('contribution_links')
export class ContributionLinks extends BaseEntity {
@PrimaryGeneratedColumn('increment', { unsigned: true })
@ -50,8 +28,8 @@ export class ContributionLinks extends BaseEntity {
})
amount: Decimal
@Column({ name: 'cycle', unsigned: true, nullable: false })
cycle: number
@Column({ length: 12, nullable: false, collation: 'utf8mb4_unicode_ci' })
cycle: string
@Column({ name: 'max_per_cycle', unsigned: true, nullable: false, default: 1 })
maxPerCycle: number

View File

@ -15,7 +15,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
\`valid_from\` datetime NULL,
\`valid_to\` datetime NULL,
\`amount\` bigint(20) NOT NULL,
\`cycle\` int(10) unsigned NOT NULL DEFAULT '1',
\`cycle\` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'NONE',
\`max_per_cycle\` int(10) unsigned NOT NULL DEFAULT '1',
\`max_amount_per_month\` bigint(20) NULL DEFAULT NULL,
\`total_max_count_of_contribution\` int(10) unsigned NULL DEFAULT NULL,