Skip to content

Commit

Permalink
chore: fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
luke88jones committed Jan 29, 2024
1 parent b53570a commit 04a3e23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ export class BasicAdapter<T extends keyof Instance> implements Adapter {
}

private async createTable(): Promise<void> {
if (await this.knex.schema.hasTable(CasbinRuleTable)) return;

const createTableSQL = this.knex.schema
.createTableIfNotExists(CasbinRuleTable, (table) => {
.createTable(CasbinRuleTable, (table) => {
table.increments();
table.string('ptype').notNullable();
for (const i of ['v0', 'v1', 'v2', 'v3', 'v4', 'v5']) {
Expand Down

0 comments on commit 04a3e23

Please sign in to comment.