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

Add uuid helper function #5617

Merged
merged 4 commits into from Jul 8, 2023
Merged

Add uuid helper function #5617

merged 4 commits into from Jul 8, 2023

Conversation

arbezerra
Copy link
Contributor

Meant to be used in the schema creation:

await knex.schema
    .createTable('users', table => {
      table.uuid('id').defaultTo(knex.fn.uuid());
      table.string('user_name');
    })

Can someone confirm that there is no uuid function in Redshift?

@coveralls
Copy link

coveralls commented Jul 3, 2023

Coverage Status

coverage: 92.797% (+0.005%) from 92.792% when pulling 2134d2d on arbezerra:master into 5e747f1 on knex:master.

@arbezerra arbezerra force-pushed the master branch 7 times, most recently from ba56207 to 27cbe5c Compare July 4, 2023 03:06
Copy link
Collaborator

@OlivierCavadenti OlivierCavadenti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arbezerra
Copy link
Contributor Author

The coverage decreased because oracle and redshift aren't tested. Should I make a test to cover those lines or put a comment to ignore coverage?

@OlivierCavadenti
Copy link
Collaborator

OlivierCavadenti commented Jul 7, 2023

The coverage decreased because oracle and redshift aren't tested. Should I make a test to cover those lines or put a comment to ignore coverage?

Can you add tests for OracleDB (same that Oracle) and for Redshift that test that the uuid function throw an Error with "Redshift does not have a uuid function" and it's seems good !

Can you also add a documentation ?
https://github.com/knex/documentation

@arbezerra
Copy link
Contributor Author

I think everything is ok now.
Opened PR knex/documentation#527

@OlivierCavadenti OlivierCavadenti merged commit 440fe50 into knex:master Jul 8, 2023
53 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants