Skip to content

Commit

Permalink
modified: database/migrations/20220719152232-create-projects.js
Browse files Browse the repository at this point in the history
	modified:   database/models/projects.js
	modified:   package.json
	modified:   schema/v1/projects.json
  • Loading branch information
AnasMubarakYasin committed Jul 21, 2022
1 parent 94c05f8 commit d2883fc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
4 changes: 4 additions & 0 deletions database/migrations/20220719152232-create-projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ module.exports = {
type: Sequelize.ARRAY(Sequelize.FLOAT),
allowNull: false,
},
address: {
type: Sequelize.ARRAY(Sequelize.STRING),
allowNull: false,
},

created_at: {
allowNull: false,
Expand Down
4 changes: 4 additions & 0 deletions database/models/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ module.exports = (sequelize, DataTypes) => {
type: DataTypes.ARRAY(DataTypes.FLOAT),
allowNull: false,
},
address: {
type: DataTypes.ARRAY(DataTypes.STRING),
allowNull: false,
},
},
{
sequelize,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expressjs",
"version": "0.2.0",
"name": "gis-server",
"version": "0.2.1",
"description": "Server",
"author": "Anas <bladerlaiga@gmail.com>",
"license": "MIT",
Expand Down
13 changes: 8 additions & 5 deletions schema/v1/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"progress",
"fund_source",
"fiscal_year",
"coordinate"
"coordinate",
"address"
],
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -60,6 +61,10 @@
"type": "array",
"items": { "type": "number" }
},
"address": {
"type": "array",
"items": { "type": "string" }
},
"createdAt": {
"type": "string"
},
Expand All @@ -69,14 +74,12 @@
},
"definitions": {
"create": {
"$ref": "projects.json",
"errorMessage": {}
"$ref": "projects.json"
},
"update": {
"$ref": "projects.json",
"type": "object",
"required": [],
"errorMessage": {}
"required": []
}
}
}

0 comments on commit d2883fc

Please sign in to comment.