Hi there! I'm trying to uninstall the PayPal Solid...
# support
b
Hi there! I'm trying to uninstall the PayPal Solidus extension. But when I run the
rails db:rollback STEP=2
command, the
schema.rb
is modified in all the tables rather than only PayPal tables. The rollback command removes all the
null: false
from all the columns of all the tables....
I don't understand why and how this is done because the migrations files have nothing to do this...
Thanks in advance for your help. 🤯
This is my `db:rollback`terminal output.
I know that the null column option by default is false. But I want to know why and how the rollback command does it.
r
Wondering if something is going on with the activerecord migration versions. 🤔
k
I think that’s because you generated the schema on other system (and maybe with another database engine). I think this might happen whatever command you run that change the schema, so it should related to the rollback
if you open your database, you’ll find a
schema_migrations
table. what are the last 2 migrations there?
b
Yes @kennyadsl, I started my Solidus Store with Sqlite. And I've migrated to postgresql to upload it to my production server.
k
BTW, the schema is never used in production. Usually at deploy the migrations will run. Schema is for development usually, when you need to build a database quickly you can run:
bin/rails db:schema:load
b
The last two files in the
db/migrate
folder are the PayPal migration files...

https://solidusio.slack.com/files/U0467DJ7DB6/F04S9UAD03H/captura_desde_2023-03-07_10-59-46.png

k
ok, but you need to check if they are currently executed on your database. Rails keeps track of which migrations are executed with the db table I mentioned before
schema_migrations
. If you open that table, you’ll see which one are active and which is the last executed.
b
Sorry for my ignorance.🤯 What do you mean with open the table?
Hooray! I've found them. 🐒
The last 2 versions of my `schema_migrations`correspond to the last 2 versions before PayPal versions in my
db/migrate
folder.
In my pgAdmin4...
And in my
db/migrate
folder...
k
the last one (ending with 38) does not correspond with the ones from paypal (which end with 18 and 19), right?
I think we don’t need to do anything. the rollback worked
b
That's it, it worked. Thanks for your help and sorry for the inconvenience. 🙏🏻
k
No problem, we are here to help. If you have any other issue, feel free to ask!
b
👍🏻 🙏🏻
Ha ha ha! I've thousands of issues. My knowledge of Rails is quite small. I've made some small Rails apps but not like Solidus. It's so complicated for me. It would have been easier make my store with Prestashop, Wordpress, Shopify... But I love big challeges. I've learned a lot from you. I don't know if I will be able to finish my Solidus store but I'm really enjoying with Solidus. Thanks. 🤪
👍 1