Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
services
organizations
Commits
65fee32e
Commit
65fee32e
authored
Jan 07, 2019
by
ncastejon
Browse files
Add elasticSearchMd5 property to Organization entity + migration
parent
39b38fdc
Pipeline
#2406
passed with stages
in 1 minute and 19 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/migrations/1546865861884-addESMd5.ts
0 → 100644
View file @
65fee32e
import
{
MigrationInterface
,
QueryRunner
}
from
'
typeorm
'
;
export
class
AddESMd51546865861884
implements
MigrationInterface
{
public
async
up
(
queryRunner
:
QueryRunner
):
Promise
<
any
>
{
await
queryRunner
.
query
(
`ALTER TABLE "organization" ADD "elasticSearchMd5" character varying(100)`
);
}
public
async
down
(
queryRunner
:
QueryRunner
):
Promise
<
any
>
{
await
queryRunner
.
query
(
`ALTER TABLE "organization" DROP COLUMN "elasticSearchMd5"`
);
}
}
src/organizations/organization.dto.ts
View file @
65fee32e
...
...
@@ -2,6 +2,7 @@ import { Organization } from './organization.entity';
import
{
Link
}
from
'
../links/link.dto
'
;
import
{
ApiModelProperty
,
ApiModelPropertyOptional
}
from
'
@nestjs/swagger
'
;
import
{
IsString
,
IsOptional
,
IsArray
,
MaxLength
,
IsDefined
}
from
'
class-validator
'
;
import
{
isString
}
from
'
util
'
;
export
class
OrganizationDTO
{
@
ApiModelProperty
()
...
...
@@ -13,6 +14,10 @@ export class OrganizationDTO {
@
IsString
()
description
:
string
;
@
ApiModelPropertyOptional
()
@
IsString
()
elasticSearchMd5
?:
string
;
@
ApiModelPropertyOptional
()
@
IsOptional
()
@
IsString
()
...
...
src/organizations/organization.entity.ts
View file @
65fee32e
...
...
@@ -7,9 +7,12 @@ export class Organization {
@
PrimaryGeneratedColumn
()
id
:
number
;
@
Column
({
length
:
200
})
@
Column
({
length
:
200
})
name
:
string
;
@
Column
({
length
:
100
,
nullable
:
true
})
elasticSearchMd5
:
string
;
@
Column
(
'
text
'
)
description
:
string
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment