adonis-acl icon indicating copy to clipboard operation
adonis-acl copied to clipboard

How to change plural table names?

Open viniciussvl opened this issue 5 years ago • 2 comments

Hello everyone, My database uses a unique naming, would you like to know if it is possible to change the table names from roles to role and permissions to permission?

viniciussvl avatar Jan 15 '20 12:01 viniciussvl

Hello, @viniciussvl, I believe that you need to change the name of the table in the migration

up () {
    this.create('permission', table => {
      table.increments()
      table.string('slug').notNullable().unique()
      table.string('name').notNullable().unique()
      table.text('description').nullable()
      table.timestamps()
    })
  }

this-is-allan avatar Feb 19 '20 14:02 this-is-allan

Hello, @viniciussvl, I believe that you need to change the name of the table in the migration

    this.create('permission', table => {
      table.increments()
      table.string('slug').notNullable().unique()
      table.string('name').notNullable().unique()
      table.text('description').nullable()
      table.timestamps()
    })
  }```

Thank you!

viniciussvl avatar Feb 19 '20 14:02 viniciussvl