Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change plural table names? #34

Open
viniciussvl opened this issue Jan 15, 2020 · 2 comments
Open

How to change plural table names? #34

viniciussvl opened this issue Jan 15, 2020 · 2 comments

Comments

@viniciussvl
Copy link

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?

@this-is-allan
Copy link

this-is-allan commented Feb 19, 2020

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()
    })
  }

@viniciussvl
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants