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

ActiveRecord::NotNullViolation (PG::NotNullViolation: ERROR: null value in column "resource_owner_id" #22

Closed
chridubois opened this issue May 30, 2023 · 0 comments · Fixed by #23

Comments

@chridubois
Copy link

Hi,

i've tried to do what you suggest in #11 . I've created a new migration :

class ChangeUuidColumnType < ActiveRecord::Migration[7.0] def change change_column :devise_api_tokens, :resource_owner_id, :primary_key end end

and I get this error :

== 20230529143952 ChangeUuidColumnType: migrating =============================
-- change_column(:devise_api_tokens, :resource_owner_id, :primary_key)
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::SyntaxError: ERROR: syntax error at or near "primary"
LINE 1: ..." ALTER COLUMN "resource_owner_id" TYPE bigserial primary ke...

Did I miss something ?

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 a pull request may close this issue.

1 participant