<div dir="ltr">Hi Tobiah!<br><br>Soon we will release a migration tool which should help with updating the database schema.<br><br>Until this, during the early stage of development you can drop all tables and re-create them:<br><br> # update_db.py<br><br> from models import db<br> from settings import db_params<br> from initial_data import populate_database<br><br> db.bind(**db_params)<br> db.generate_mapping(check_tables=False)<br> db.drop_all_tables(with_all_data=True)<br> db.create_tables()<br> populate_database()<br><br><br>Best regards,<br>Alexander Kozlovsky<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 3, 2017 at 12:05 AM, Tobiah <span dir="ltr"><<a href="mailto:toby@tobiah.org" target="_blank">toby@tobiah.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm new to ORMs in general. I used the online tool to<br>
create a set of entities and used the resulting python<br>
class set in a python program to automatically generate<br>
a mysql database.<br>
<br>
Now I've decided that I want to change one of my 'int' types to<br>
a 'str'. I did this in the corresponding class and re-ran<br>
the program, but my database field type was not updated.<br>
How does one normally handle a changing schema during<br>
development? Do you have to puff the database and rebuild<br>
every time there is a change?<br>
<br>
Also, does anyone ever somehow generate the Pony classes at<br>
runtime based on introspection of the database?<br>
<br>
<br>
Thanks,<br>
<br>
<br>
Tobiah<br>
______________________________<wbr>_________________<br>
ponyorm-list mailing list<br>
<a href="mailto:ponyorm-list@ponyorm.org" target="_blank">ponyorm-list@ponyorm.org</a><br>
<a href="/ponyorm-list" rel="noreferrer" target="_blank">https://mailman-mail5.webfacti<wbr>on.com/listinfo/ponyorm-list</a><br>
</blockquote></div><br></div>