# |
Oct 3rd 2018, 14:44 |
ricksaccous |
my choices are a ) junk data b) truncate or i guess c ) column can be nullable (even though it shouldn't) |
# |
Oct 3rd 2018, 14:43 |
ricksaccous |
before i figured i would just put junk data in it and they would realize it and fix it later or something, but it's prob better to just truncate it |
# |
Oct 3rd 2018, 14:43 |
lubos |
don't truncate if it is not what you (your next app stage) should do |
# |
Oct 3rd 2018, 14:42 |
ricksaccous |
are you sure |
# |
Oct 3rd 2018, 14:42 |
ricksaccous |
hey dude, you are truncating x table |
# |
Oct 3rd 2018, 14:42 |
ricksaccous |
and want to give a message somehow |
# |
Oct 3rd 2018, 14:42 |
ricksaccous |
lol |
# |
Oct 3rd 2018, 14:42 |
ricksaccous |
i just don't want another dev to be surprised that the table got truncated |
# |
Oct 3rd 2018, 14:42 |
btx |
im sure lots of people don’t - I just don’t have the expertise to know how to safely automate them |
# |
Oct 3rd 2018, 14:42 |
ricksaccous |
yeah, we should too at this point |
# |
Oct 3rd 2018, 14:42 |
btx |
yeah |
# |
Oct 3rd 2018, 14:41 |
btx |
migrations are some of the most destructive changes you can make |
# |
Oct 3rd 2018, 14:41 |
ricksaccous |
you run migrations manually? |
# |
Oct 3rd 2018, 14:41 |
btx |
you’re more trusting than I am I guess |
# |
Oct 3rd 2018, 14:41 |
ricksaccous |
we'll have to fix that |
# |
Oct 3rd 2018, 14:41 |
ricksaccous |
we do i think but it's kind of borked |
# |
Oct 3rd 2018, 14:40 |
btx |
do you have an automated migrations routine? (eg a deployment bot that auto-triggers migrations) |
# |
Oct 3rd 2018, 14:40 |
ricksaccous |
but i'm still worried about the prospect of half pushing it up for some reason |
# |
Oct 3rd 2018, 14:40 |
ricksaccous |
now we are not even close to being in production for this, we have no client data for this table |
# |
Oct 3rd 2018, 14:39 |
ricksaccous |
and it pretty much requires a truncate |
# |
Oct 3rd 2018, 14:39 |
ricksaccous |
because i'm adding a non-nullable fk to a table |
# |
Oct 3rd 2018, 14:39 |
btx |
lol |
# |
Oct 3rd 2018, 14:39 |
ricksaccous |
and halt if they choose no |
# |
Oct 3rd 2018, 14:39 |
ricksaccous |
just to say "are you sure you want to run this?" |
# |
Oct 3rd 2018, 14:38 |
ricksaccous |
no |
# |
Oct 3rd 2018, 14:38 |
btx |
@ricksaccous you mean to exclude specific migrations? |
# |
Oct 3rd 2018, 14:37 |
ricksaccous |
to run it or something |
# |
Oct 3rd 2018, 14:37 |
ricksaccous |
in cake migrations is it possible to offer a y/n option |
# |
Oct 3rd 2018, 14:14 |
lubos |
that's why to merge question at first place |
# |
Oct 3rd 2018, 14:14 |
lubos |
I know I could and I do... but than I need to have datetime for both inputs :slightly_smiling_face: |
# |
Oct 3rd 2018, 14:14 |
neon1024 |
It’s certainly worth proposing @lubos for sure! |
# |
Oct 3rd 2018, 14:13 |
neon1024 |
You could format a datetime to display just the time :slightly_smiling_face: |
# |
Oct 3rd 2018, 14:13 |
lubos |
Regards DateTime classess, I have to admit I rather open Chronos docs instead of Cake DateTIme because it is better documented even when I use FrozenDate = know I can do whatever I did with Chronos... should we update Cake book DateTime part to be like Chronos docs? |
# |
Oct 3rd 2018, 14:13 |
neon1024 |
Why not keep what you had and change the UI? |
# |
Oct 3rd 2018, 14:11 |
lubos |
or well, the DB i have install_from and install_to and which is datetime and I had those two form inputs... then client changed its mind and wants install_date and install_time_from + install_time_to because date is same all the time so I have decided keeping DB schema as is just play with inputs |
# |
Oct 3rd 2018, 14:10 |
neon1024 |
But each to their own! :slightly_smiling_face: |
# |
Oct 3rd 2018, 14:10 |
neon1024 |
I would probably just wrap it with a div and use css to do that |
# |
Oct 3rd 2018, 14:10 |
lubos |
easier form than building custome form widget (need it at 2 rows) |
# |
Oct 3rd 2018, 14:10 |
neon1024 |
https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-datetime-controls |
# |
Oct 3rd 2018, 14:09 |
neon1024 |
Why not use a single input? |
# |
Oct 3rd 2018, 14:07 |
lubos |
It is fun to work with those objects nowdays :slightly_smiling_face: |