-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aca81f5
commit 2eb24c7
Showing
31 changed files
with
606 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
var _knex = require("knex"); | ||
var _knex2 = _interopRequireDefault(_knex); | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _knex = require('knex'); var _knex2 = _interopRequireDefault(_knex); | ||
|
||
var _knexfile = require("../../knexfile"); | ||
var _knexfile2 = _interopRequireDefault(_knexfile); | ||
var _knexfile = require('../../knexfile'); var _knexfile2 = _interopRequireDefault(_knexfile); | ||
|
||
const connection = _knex2.default.call(void 0, _knexfile2.default.development); | ||
|
||
exports.default = connection; | ||
exports. default = connection; |
14 changes: 14 additions & 0 deletions
14
BeTheHero/backend/dist/database/migrations/20200325153220_create_ongs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict";exports.up = function (knex) { | ||
return knex.schema.createTable("ongs", function (table) { | ||
table.string("id").primary(); | ||
table.string("name").notNullable(); | ||
table.string("email").notNullable(); | ||
table.string("whatsapp").notNullable(); | ||
table.string("city").notNullable(); | ||
table.string("uf", 2).notNullable(); | ||
}); | ||
}; | ||
|
||
exports.down = function (knex) { | ||
return knex.schema.dropTable("ongs"); | ||
}; |
17 changes: 17 additions & 0 deletions
17
BeTheHero/backend/dist/database/migrations/20200325154425_create_incidents.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use strict";exports.up = function (knex) { | ||
return knex.schema.createTable("incidents", function (table) { | ||
table.increments(); | ||
|
||
table.string("title").notNullable(); | ||
table.string("description").notNullable(); | ||
table.decimal("value").notNullable(); | ||
|
||
table.string("ong_id").notNullable(); | ||
|
||
table.foreign("ong_id").references("id").inTable("ongs"); | ||
}); | ||
}; | ||
|
||
exports.down = function (knex) { | ||
return knex.schema.dropTable("incidents"); | ||
}; |
Oops, something went wrong.