-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from icefoganalytics/main
Centres
- Loading branch information
Showing
36 changed files
with
832 additions
and
503 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as knex from "knex"; | ||
|
||
exports.up = function (knex: knex.Knex, Promise: any) { | ||
console.log("Created visitor_centre table"); | ||
|
||
return knex.schema.createTable("visitor_centre", function (t) { | ||
t.increments("id").primary(); | ||
t.string("name", 200).notNullable().unique(); | ||
t.string("community", 200).notNullable(); | ||
t.string("region", 200).notNullable(); | ||
t.boolean("is_active").notNullable().defaultTo(true); | ||
}); | ||
}; | ||
|
||
exports.down = function (knex: knex.Knex, Promise: any) { | ||
console.log("Dropped visitor_centre table"); | ||
|
||
return knex.schema.dropTable("visitor_centre"); | ||
}; |
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,21 @@ | ||
import * as knex from "knex"; | ||
|
||
exports.up = function (knex: knex.Knex, Promise: any) { | ||
console.log("Created visitor_centre_season table"); | ||
|
||
return knex.schema.createTable("visitor_centre_season", function (t) { | ||
t.increments("id").primary(); | ||
t.integer("visitor_centre_id").notNullable().references("visitor_centre.id"); | ||
t.string("year", 4).notNullable(); | ||
t.date("open_date").notNullable(); | ||
t.date("close_date").notNullable(); | ||
t.integer("projected_visitors").notNullable().defaultTo(-1); | ||
t.string("notes", 2000).nullable(); | ||
}); | ||
}; | ||
|
||
exports.down = function (knex: knex.Knex, Promise: any) { | ||
console.log("Dropped visitor_centre_season table"); | ||
|
||
return knex.schema.dropTable("visitor_centre_season"); | ||
}; |
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 was deleted.
Oops, something went wrong.
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,8 +1,3 @@ | ||
import * as knex from "knex"; | ||
import { DB_CONFIG } from "../config"; | ||
|
||
export * from "./user-router"; | ||
export * from "./config-router"; | ||
export * from "./permission-router"; | ||
|
||
export const sqldb = knex.knex(DB_CONFIG); | ||
export * from "./visitor-centre-router"; |
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
Oops, something went wrong.