# |
Oct 11th 2019, 21:57 |
kazunanakama |
I want to know if there is a good way that I can find the latest post in a thread |
# |
Oct 11th 2019, 21:56 |
kazunanakama |
So I tried this a different way, but I have Projects, ForumCategories, Forums, Threads, and Posts |
# |
Oct 11th 2019, 20:07 |
tobse |
@this.impetus Silly question: did you already had a look for migrations? Maybe the project was developed using migrations. So it would be very easy to rebuild the database. |
# |
Oct 11th 2019, 18:36 |
slackebot1 |
<ron.rattie> |
# |
Oct 11th 2019, 18:35 |
this.impetus |
yeah, all of it, just... by hand haha. ok, cheers guys, I think if there were an easy solution here i'd have prompted it by now, thanks for reading |
# |
Oct 11th 2019, 18:34 |
ron.rattie |
should be able to glean some of the tables and relations by looking at the models |
# |
Oct 11th 2019, 18:34 |
this.impetus |
like I said, this is for a small academic lab. rewriting the tables by hand is like... one day. but it occured to me that all of this is info in implicitly modelled my cake, so, I was jut curious if there wwere a script somewhere in the cake CLI that could help |
# |
Oct 11th 2019, 18:32 |
ron.rattie |
that sucks |
# |
Oct 11th 2019, 18:32 |
this.impetus |
just me |
# |
Oct 11th 2019, 18:32 |
ron.rattie |
anyone working on the project not working directly on the db? they would have had a copy or a dump file |
# |
Oct 11th 2019, 18:32 |
this.impetus |
oh, no, if someone had to have done then it was me, and I periodically do this, but not since this project began, foolishly |
# |
Oct 11th 2019, 18:32 |
ron.rattie |
basically someone may have dumped the database or some tables into a .sql file |
# |
Oct 11th 2019, 18:32 |
this.impetus |
honestly guys I got phpmyadmin running and then never looked back, this isn't my jam at all |
# |
Oct 11th 2019, 18:31 |
this.impetus |
sql dumps—I've heard this phrase, point me to a path and I shall explore. backups will begin post-reinstall, I assure you :cold_sweat: |
# |
Oct 11th 2019, 18:30 |
ron.rattie |
backups? sql dumps ? |
# |
Oct 11th 2019, 18:30 |
this.impetus |
everyone has logged out of everything and changed their passwords, etc., |
# |
Oct 11th 2019, 18:27 |
this.impetus |
I don't know—I am managing this small, academic server, I'm pretty unqualified to do so, I'm a front-end dev who got roped into a fullstack gig. we are literally going to just nuke the drive and reinstall |
# |
Oct 11th 2019, 18:26 |
itmpls |
how did you . have a databreach if you dont mind me asking |
# |
Oct 11th 2019, 18:24 |
this.impetus |
Hey guys—is there way to rebuild a MySQL database from the a cakephp project? I had a databreach yesterday and all our tables were replaced with ransom notes. Luckily the project was very much under development and so only test data was stored, but re-authoring the tabes by hand will be tedious |
# |
Oct 11th 2019, 17:09 |
devito |
if i wanted to overload the protected fields in the schema class and add an additional one. What would be the best way to go about it? |
# |
Oct 11th 2019, 15:32 |
slackebot1 |
!tias |
# |
Oct 11th 2019, 15:32 |
slackebot1 |
Command sent from Slack by dereuromark: |
# |
Oct 11th 2019, 15:32 |
dereuromark |
Didnt you try it? ;) |
# |
Oct 11th 2019, 15:31 |
dereuromark |
Yes |
# |
Oct 11th 2019, 15:14 |
jeremy.halin |
I've a weird question. When cakephp session expires and you are logged out, is the feature `redirect to previous page` is implemented and default behavior ? |
# |
Oct 11th 2019, 13:17 |
jeremy.halin |
I hate cache in dev environment |
# |
Oct 11th 2019, 13:16 |
jeremy.halin |
:,) |
# |
Oct 11th 2019, 13:16 |
slackebot1 |
<josbeir> |
# |
Oct 11th 2019, 13:16 |
josbeir |
i guess the cache does not get cleared after running migrations :P |
# |
Oct 11th 2019, 13:16 |
jeremy.halin |
I use cakephp migrations |
# |
Oct 11th 2019, 13:16 |
josbeir |
it caches the table keys |
# |
Oct 11th 2019, 13:16 |
jeremy.halin |
thats weird |
# |
Oct 11th 2019, 13:15 |
jeremy.halin |
:( |
# |
Oct 11th 2019, 13:15 |
jeremy.halin |
@josbeir wow thanks... |
# |
Oct 11th 2019, 13:15 |
slackebot1 |
<jeremy.halin> |
# |
Oct 11th 2019, 13:15 |
josbeir |
bin/cake cache clear_all |
# |
Oct 11th 2019, 13:15 |
josbeir |
did you clear the cache |
# |
Oct 11th 2019, 13:14 |
jeremy.halin |
@ndm @aivaras.godliauskas `beforeSave` is working but when I assign a value to my column `start_at_utc`, it's not saved to DB (column is in `accessible` array) |
# |
Oct 11th 2019, 13:11 |
scuadra |
@ndm thank you very much. :slightly_smiling_face: |
# |
Oct 11th 2019, 13:05 |
ndm |
Also it should be `Countries.name` if association is named `Countries` |
# |
Oct 11th 2019, 13:04 |
ndm |
Fields of associated tables need to be whitelisted: https://book.cakephp.org/3.0/en/controllers/components/pagination.html#control-which-fields-used-for-ordering |