Тёмный
No video :(

The ULTIMATE Guide to Room Migration in Android (Database Migration Tutorial) 

Philipp Lackner
Подписаться 179 тыс.
Просмотров 24 тыс.
50% 1

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/...
💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
pl-coding.com/...
Subscribe to my FREE newsletter for regular Android, Kotlin & Architecture advice!
pl-coding.com/...
Join this channel to get access to perks:
/ @philipplackner
Get the source code for this video here:
github.com/phi...
Join my Discord server:
/ discord
Regular programming advice on my Instagram page: / _philipplackner_
Checkout my GitHub: github.com/phi...
You like my free content? Here you can buy me a coffee:
www.buymeacoff...

Опубликовано:

 

25 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 78   
@yasserakbbach708
@yasserakbbach708 Год назад
This man is doing Google a huge favor 😂😂
@PhilippLackner
@PhilippLackner Год назад
😂 💪
@tch.777
@tch.777 Год назад
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!! 🤗
@PhilippLackner
@PhilippLackner Год назад
❤️
@HaSeebpjr01
@HaSeebpjr01 4 месяца назад
everytime i stuck on something for long time this man saves me::: thanks alot
@xD-saleem
@xD-saleem Год назад
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.
@PhilippLackner
@PhilippLackner Год назад
Thanks for staying that long!
@hiteshchalise3988
@hiteshchalise3988 Год назад
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. 🙂
@swaminathbera6407
@swaminathbera6407 10 месяцев назад
yes the blog is amazing and well-written. Philipp explains easily.
@sijanneupane
@sijanneupane Год назад
guide that nobody asked for but everyone needed!
@mahdiporkar236
@mahdiporkar236 4 месяца назад
Great job philipp!
@duhankazanci
@duhankazanci 4 месяца назад
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
@samsammaniamantap
@samsammaniamantap Год назад
Now I know why my migration with a new table didn't work well. Thanks Phil
@emirhanozer
@emirhanozer Год назад
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!
@tinoutech5016
@tinoutech5016 Год назад
I love your ULTIMATE guides, thank you very much.
@behnawm
@behnawm Год назад
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!)
@annguyenhoang3589
@annguyenhoang3589 Год назад
I wait too long for this. Love your content
@Daaaaaaavid
@Daaaaaaavid Год назад
It would be better to use the extension function ".use{}" instead of "apply" at 29:31
@osisuper98
@osisuper98 Год назад
This feels so good. Thank you Philipp.
@hossamqandel5638
@hossamqandel5638 Год назад
Thanks Philipp for this useful content and for simple explaining
@Guilo583
@Guilo583 Год назад
Thanks a lot. this is exactly what I was looking for
@pmockevicius
@pmockevicius 2 месяца назад
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
@neronguyenvn
@neronguyenvn Год назад
You are saving my life ! Thanks !!
@Akshaykumar-xr9yj
@Akshaykumar-xr9yj Год назад
Thank you so much. That's what i wanted to know from long time
@ChrisAthanas
@ChrisAthanas Год назад
So much better than the Google documentation
@vengateshm2122
@vengateshm2122 Год назад
Terrific explanation. Thank you.
@zoltanbalazskozma2360
@zoltanbalazskozma2360 Год назад
Very well explained. Do you have any information about what thread are these migrations run in? I could not find any information about that.
@alihosseinnezhad2957
@alihosseinnezhad2957 Год назад
Interesting like before. Thank you phillip.
@lancevincentoliveros7799
@lancevincentoliveros7799 Год назад
now i am in a good mood
@NiMa-1629
@NiMa-1629 Год назад
Thanks for your great video 😊
@uafraid
@uafraid Год назад
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
@FreedivingTrainer
@FreedivingTrainer Год назад
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 ?))
@ChrisAthanas
@ChrisAthanas Год назад
2013 is almost ten years ago and things are so different now!
@muzamilabdallah6768
@muzamilabdallah6768 Год назад
it's awesome As usual
@vbcv1
@vbcv1 5 месяцев назад
what about backing up and restoring a database (export/import) what would the best way to do that ?
@azamovdev
@azamovdev Год назад
Nice Work
@achalbadgujar9519
@achalbadgujar9519 Год назад
Much needed video
@Lethans11
@Lethans11 Год назад
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.
@surendramaran
@surendramaran Год назад
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.
@PhilippLackner
@PhilippLackner Год назад
Glad it helps, I'm from Germany :)
@Ibeatuphomelesspeople
@Ibeatuphomelesspeople Год назад
@@PhilippLackner how is germany? thinking about visiting eastern europe or germany
@mustafaammar551
@mustafaammar551 Год назад
very cool video thank you bro you are the best
@AzadKumar-zi5lm
@AzadKumar-zi5lm Год назад
the language you use very simple to understand Sir, could you make video on full guide exoplayer
@ChrisAthanas
@ChrisAthanas Год назад
He has a video on that, check his backlog for Spotify clone
@user-yb6tz2vl6f
@user-yb6tz2vl6f Год назад
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?
@amruta210189
@amruta210189 Год назад
How to add new table in room database without deleting existing data please help asap
@lyawileh.a8741
@lyawileh.a8741 Год назад
When does exportedSchema set to true in the database annotation?
@mayur9840
@mayur9840 10 месяцев назад
Thank you
@saraasadi3094
@saraasadi3094 6 месяцев назад
How can I mgrate a table with a relationship ???
@azamovdev
@azamovdev Год назад
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?
@akpapps5988
@akpapps5988 Год назад
Please do a video about how to implement refresh token in Android. I am using hilt, clean architecture,
@ClarkWSandholtz
@ClarkWSandholtz Год назад
This is excellent. Can you do this same thing for SQLDelight for Kotlin Multiplatform?
@yoman796
@yoman796 Год назад
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
@andisilaban3159
@andisilaban3159 Год назад
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
@saha123456789s
@saha123456789s Год назад
hello, can you tell me, I need to make a request to the datastore after / during the migration, is it possible ?
@AmitJayant
@AmitJayant Год назад
What's the color scheme and font you using in Android Studio?
@Daaaaaaavid
@Daaaaaaavid Год назад
@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?
@Monarch_943
@Monarch_943 Год назад
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.
@johnlopez9420
@johnlopez9420 Год назад
@Philipp Lackner do you maybe have a discount code for your courses?
@ChrisAthanas
@ChrisAthanas Год назад
He doesn’t do discounts much anymore. Usually around the launch of a new course but it’s usually for a very limited time
@mlookmero1004
@mlookmero1004 Год назад
not wNice tutorialle quarantine but how r u doing is that hard ?
@ZsP3X
@ZsP3X Год назад
5 minutes in and tNice tutorials is 10 tis harder than garageband on my phone
@alanesaugarciagutierrez6025
If we try to migrate from 1 to 4 the automigrations runs 1 to 2, 2 to 3 and 3 to 4?
@ChrisAthanas
@ChrisAthanas Год назад
Yes
@domonk7450
@domonk7450 Год назад
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
@ookie218
@ookie218 Год назад
I'm lost on this too
@naveensuyambu6222
@naveensuyambu6222 Год назад
Please do the same for realm as well Philip
@ChrisAthanas
@ChrisAthanas Год назад
Likely won’t happen since it’s not recommend by Google anymore
@orangasli2943
@orangasli2943 Год назад
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
@PhilippLackner
@PhilippLackner Год назад
What
@ChrisAthanas
@ChrisAthanas Год назад
This question needs to be rephrased and made more succinct
@gstarentertainmentedits2415
👌👌🙏🙏
@chani_vlogs
@chani_vlogs Год назад
i love u
@dusknews9939
@dusknews9939 Год назад
can you please start explaining instead of just writing codes,
@ProfMohamedAtef
@ProfMohamedAtef Год назад
Your effort is very nice, but why @RenameColumn, @DeleteColumn, @ RenamTable, @DeleteTable, are not working with AutoMigrationSpec ?
@nguyencodervn
@nguyencodervn Год назад
Thank you
Далее
🎙А не СПЕТЬ ли мне ПЕСНЮ?
3:09:39
Просмотров 1,6 млн
СМАЗАЛ ДВЕРЬ
00:31
Просмотров 125 тыс.
How to Encrypt DataStore in Android
15:58
Просмотров 21 тыс.
Make Your Code Clean With the SOLID Principles
18:24
Просмотров 98 тыс.
Writing My Own Database From Scratch
42:00
Просмотров 212 тыс.
Room Database - Using Foreign Keys!
10:05
Просмотров 2,9 тыс.
The Full Guide to ANNOTATIONS In Kotlin
21:32
Просмотров 30 тыс.
🎙А не СПЕТЬ ли мне ПЕСНЮ?
3:09:39
Просмотров 1,6 млн