The ULTIMATE Guide to Room Migration in Android (Database Migration Tutorial)
Вставка
- Опубліковано 13 вер 2022
- Whenever you change your database schema, you will need to provide a migration, so Room knows what to do with existing data. In this video I will show you how that works.
⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/premium-courses...
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/drop-table-ment...
Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!
pl-coding.com/newsletter
Join this channel to get access to perks:
/ @philipplackner
Get the source code for this video here:
github.com/philipplackner/And...
Join my Discord server:
/ discord
Regular programming advice on my Instagram page: / _philipplackner_
Checkout my GitHub: github.com/philipplackner
You like my free content? Here you can buy me a coffee:
www.buymeacoffee.com/philippl...
This man is doing Google a huge favor 😂😂
😂 💪
Every time I encounter a problem, you just release a video of a solution, there is no one like you!!
I'm a big fan!! 🤗
❤️
everytime i stuck on something for long time this man saves me::: thanks alot
guide that nobody asked for but everyone needed!
I love your ULTIMATE guides, thank you very much.
I wait too long for this. Love your content
Thanks Philipp for this useful content and for simple explaining
This feels so good. Thank you Philipp.
Thx for another great video Philipp! A quick short video about Moshi would be great. (also a long one can be great too cause it has too many features!)
Great job philipp!
Terrific explanation. Thank you.
Thank you so much. That's what i wanted to know from long time
Room migration blog by Florina was excellent, but glancing at the Migration Testing blog, it looked scary to me, until I saw this video. Turns out it wasn't scary at all and was very straight forward. Thank you for this video. 🙂
yes the blog is amazing and well-written. Philipp explains easily.
Thanks a lot. this is exactly what I was looking for
Very well explained. Do you have any information about what thread are these migrations run in? I could not find any information about that.
Interesting like before.
Thank you phillip.
You are saving my life !
Thanks !!
Very well explained, thanks for the video. The automigration would not work in case of having, already done, several manual migrations? or at least i would have to generate a JSON migration file for all the versions of the database.
Great video as always Phil. I dont know if its because video was created a year ago from today and things changed since then but at this moment room automigration supports adding a new table and there is no need to do manual migration for that. Please correct me if i m wrong
Now I know why my migration with a new table didn't work well. Thanks Phil
I just changed the Device from asio to SPDIF-out (soft blaster z) TNice tutorials improved the soft quality dramatically. I tNice tutorialnk tNice tutorials did the trick!
Thanks for your great video 😊
I remember when u were 1k subs. We talked about brexit that it'll wont seperate us. now you have 82k + subs. Keep it going bro.
Thanks for staying that long!
@Phlilipp was it an error at 29:31 to declare "var db = " if you are also doing "db =" below? Or does this have some implications and must be done?
So much better than the Google documentation
What if I want to delete the old instance of the database along with its data? It'd be a pain to migrate each change while debugging the app or internal testing it.
Nice Work
When using the Automigration feature, I often mess up my databases in a way, where my code can't comprehend the new data and crashes when fetching the Rows from the table. Until they make it even easier to migrate, I will continue modifying my tables manually with DB Browser :D
what about backing up and restoring a database (export/import) what would the best way to do that ?
Hey, I just wanted to check briesofty if there is a way for to import a new soft into the program, for example softs or sotNice tutorialng that
This is excellent. Can you do this same thing for SQLDelight for Kotlin Multiplatform?
very cool video
thank you bro
you are the best
Please do a video about how to implement refresh token in Android. I am using hilt, clean architecture,
it's awesome As usual
Much needed video
So, you renamed only field in User class from create to createdAt, but you did not rename ColumnInfo from create to createdAt. I renamed ColumnInfo and this migration did not work. So this example does not work for renaming ColumnInfo
When does exportedSchema set to true in the database annotation?
What's the color scheme and font you using in Android Studio?
Hey Philipp. I am from android & learning android from ur tutorial. I have question as a beginner. Actually I was making todo app entity has three fields id(int), text(string), ischecked(Boolean). My app works fine for chekbox for every task. But when I added many task It simply failed. Can u please fix this?
hello, can you tell me, I need to make a request to the datastore after / during the migration, is it possible ?
Second migration did not really do anything, since you changed the field name to "createdAt", but column name inside @ColumnInfo was still "created". App works fine without this migration
now i am in a good mood
Dude, I have a question for you guys, if you don't mind it being silly. There are 2 applications. Is it possible to connect application 2 to the database through application 1?
It would be better to use the extension function ".use{}" instead of "apply" at 29:31
How to add new table in room database without deleting existing data please help asap
How can I mgrate a table with a relationship ???
Thank you
For may old project (started in 2013) I decided to leave Content Provider with SQLite cursor 👌
Maybe video about migration from content provider to room ?))
2013 is almost ten years ago and things are so different now!
the language you use very simple to understand
Sir, could you make video on full guide exoplayer
He has a video on that, check his backlog for Spotify clone
not wNice tutorialle quarantine but how r u doing is that hard ?
what do you do if you've already been working with the db and are not on version 1, how would you generate the version 1 json file? did the file get generated because you had automigration from 1 to 2? that part is just not very clear
I'm lost on this too
@Philipp Lackner do you maybe have a discount code for your courses?
He doesn’t do discounts much anymore. Usually around the launch of a new course but it’s usually for a very limited time
If we try to migrate from 1 to 4 the automigrations runs 1 to 2, 2 to 3 and 3 to 4?
Yes
I love your videos, you are doing such a great job dude. I've already learned a lot from you.
Can anyone tell me which country he belongs to? Just curious.
Glad it helps, I'm from Germany :)
@@PhilippLackner how is germany? thinking about visiting eastern europe or germany
Bro I really hope that manifest.xml in
android studio will be compiled into java byte code because if not what if somebody able to convert that into JSON and change settings using JavaScript
What
This question needs to be rephrased and made more succinct
Please do the same for realm as well Philip
Likely won’t happen since it’s not recommend by Google anymore
👌👌🙏🙏
5 minutes in and tNice tutorials is 10 tis harder than garageband on my phone
i love u
can you please start explaining instead of just writing codes,
Your effort is very nice, but why @RenameColumn, @DeleteColumn, @ RenamTable, @DeleteTable, are not working with AutoMigrationSpec ?
Thank you