-
Notifications
You must be signed in to change notification settings - Fork 4
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
Doorkeeper trying to look for table that doesn't exists yet. #6
Comments
Full backtrace (hope it helps):
|
@gencer yep, now I know what the root of the problem and I'm gonna find a way how to fix it. Currently you can comment |
@gencer I refactored generators code so now you can use another commands for migrations: Previous version was based on Rails Generators that load all the application code (doorkeeper initializer, Sequel ORM), so Sequel models can't be initialized without real database tables (frozen datasets, remember?) and raises an error. |
@nbulaj, Thank you the quick fix. Migration generator works, however, there is still one more issue. Let me explain in order:
When I try to execute migrations against database, doorkeeper again trying to look for table that doesn't exists yet. Also last migration |
Ah, it' a problem with Sequel Model |
@nbulaj, I'm so glad and thankful for your help on this issue. I will closely watch this repo, so I can test on every commit you made and report back to you. ;) BTW, Is there any channel or something that I can join and ask a question about doorkeeper-sequel and grape-oauth2 gems that maintained by you? I have a really one strict problem with them on my project. (I tried and injected both gems one by one to my project) |
One more question: what gem stack do you use? Sequel 5, sequel-rails? What more (maybe provide your There are the same problems even for [sequel-rails project](Sequel deprecation warning creating session migration). Possible way to fix this is to use |
I am using sequel-rails with sequel5. Here is my gist: Also kindly awaiting a reply if possible on my other question if you have any slack and/or google groups for my a very basic "concept" question to understand those gems better, so i can continue confidently. |
Correction: https://gist.github.com/gencer/4bea62136a28e6a384f2d265a6472c43 I was mistakenly upload Gemfile but not lockfile. |
Hi @gencer . Checkout this branch: gem 'doorkeeper-sequel', git: 'https://github.com/nbulaj/doorkeeper-sequel.git', branch: 'sequel_fix' I checked it with brand new Rails 5.2 + Sequel 5 + Sequel-Rails and it works (rake db:create, rake db:migrate, rails c -> What about Slack or any other chat - sorry, but it is just a small extension for Doorkeeper, so there are no special method of contact :) But you can contact me via email if you need (bulajnikita [at] gmail.com) |
@nbulaj, Due to issues, I was unable to test until now. It just works as expected. I think this solution (making valid_tables false and true after init) will work without any problem. Thank you for your help & efforts. |
I installed gem, install the doorkeeper and changed orm to sequel. Everything is fine until here. Now, whenever I try to generate migration like you pointed in your installation doc, I get an error that says:
Basically, Doorkeeper trying to query oauth_access_grants before I migrate them. Now, problem is, When I deploy this app to production server, doorkeeper initialization file will be there and when it comes to migrate, it will fail.
How can we solve this problem?
The text was updated successfully, but these errors were encountered: