Home
/
risinglegends.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7a8ccf
)
fix: add missing migration
author
xangelo
<me@xangelo.ca>
Fri, 29 Sep 2023 16:17:02 +0000
(12:17 -0400)
committer
xangelo
<me@xangelo.ca>
Fri, 29 Sep 2023 16:17:02 +0000
(12:17 -0400)
migrations/20230929141329_location_levels.ts
[new file with mode: 0644]
patch
|
blob
diff --git a/migrations/20230929141329_location_levels.ts
b/migrations/20230929141329_location_levels.ts
new file mode 100644
(file)
index 0000000..
e712f0b
--- /dev/null
+++ b/
migrations/20230929141329_location_levels.ts
@@ -0,0
+1,16
@@
+import { Knex } from "knex";
+
+
+export async function up(knex: Knex): Promise<void> {
+ return knex.schema.alterTable('locations', function(table) {
+ table.integer('min_level').defaultTo(1);
+ });
+}
+
+
+export async function down(knex: Knex): Promise<void> {
+ return knex.schema.alterTable('locations', function(table) {
+ table.dropColumn('min_level');
+ });
+}
+