I have to create a reminder, so I think I have to extend the database (create a new table with reminder dates and intervals). I would like to save the data in a new table and create a job to read the data on a interval.
Could you give me an example how can I save the data in the database or is there a better approach as the create a new table?
This blog post (although slightly out of date) is a great example on how to extend the Umbraco database using Migrations and PetaPoco. PetaPoco is included in Umbraco and Migrations are the technology that Umbraco uses to help deploy changes to it's database. We can utilise the same approach with your query.
You might also have a look to the Fluidity package, which (in short) allows creating extra data and also generates automatically all you need to manage it from the back-office.
Upgrade to the current version seems not
not to work. I have to upgrade all minor Releases... this is a lot of work for the real Time I have.
Are there any other suggestions? Please keep in mind, that I am not able to rebuild the solution, because of not having a local environment and Umbraco Version 7.3.0:(
i would at least create the tables on the db server on my own and create methods for crud-actions, if
this is allowed in Umbraco and if there are methods to do this ?? :) do I Need to recompile the Source Code with petaPoco?
Ok, I am using PetaPoco now and I've managed to compile my code with just restarting the IIS Server ;) My controller and view files are in the App_Code -Folder now. I created a startup class that create the table if it doesnt exist.
But there is still a problem. I don't see the table in my database, altough I see this message in the log, so I am really confused. I thought maybe there could be a permission problem?
Umbraco.Core.Persistence.Database - New table 'tablename' was created
Could you maybe post the part of the code where you create the table? It might help understand what is going wrong.
I find it strange that the name of the table mentioned in the log is "tablename", if everything went well, I guess it should normally be the actual name of the table you created.
Yeah :D The table is created correctly in the database...I see it. Maybe I overlooked it - I don't know !! I am really,really sorry for wasting your time Michael ! :-)
extend Database and save data in a new table
Hi,
I have to create a reminder, so I think I have to extend the database (create a new table with reminder dates and intervals). I would like to save the data in a new table and create a job to read the data on a interval.
Could you give me an example how can I save the data in the database or is there a better approach as the create a new table?
Thank you in advance, Nadine
Hi Nadine,
This blog post (although slightly out of date) is a great example on how to extend the Umbraco database using Migrations and PetaPoco. PetaPoco is included in Umbraco and Migrations are the technology that Umbraco uses to help deploy changes to it's database. We can utilise the same approach with your query.
https://cultiv.nl/blog/using-umbraco-migrations-to-deploy-changes/
I say it is slightly out of date as some of the commands have changed slightly but the basic principles are correct.
Hope it helps :-)
Nik
Hi Nadine,
You might also have a look to the Fluidity package, which (in short) allows creating extra data and also generates automatically all you need to manage it from the back-office.
The package is available there: https://our.umbraco.org/projects/backoffice-extensions/fluidity/
Hope it helps!
With kind regards,
Michaël.
Hi,
thank you for your advice, I am using Umbraco version 7.3.0, I am not able to use this plugin, because of an installation error.
Hi Nadine,
Too bad, from the package page it seems indeed that it is available from version7.6...
An opportunity to upgrade maybe ;-) ;-) ?
Cheers,
Michael.
:D yes.. I'll give it a try...cross your fingers :D
Will do! Good luck :-)!
Upgrade to the current version seems not not to work. I have to upgrade all minor Releases... this is a lot of work for the real Time I have.
Are there any other suggestions? Please keep in mind, that I am not able to rebuild the solution, because of not having a local environment and Umbraco Version 7.3.0:(
i would at least create the tables on the db server on my own and create methods for crud-actions, if this is allowed in Umbraco and if there are methods to do this ?? :) do I Need to recompile the Source Code with petaPoco?
Sorry for my noobish questions:)
Comment author was deleted
Hey Nadine, if you are on that version of Umbraco try https://github.com/TimGeyssens/UIOMatic
If combined with https://github.com/TimGeyssens/MCFly you won't even need to code to be able to CRUD a custom db table
Hi Nadine,
Sorry to hear it did not work with the upgrade...
I am afraid I cannot help you much more on this topic, as I have never done something similar myself :-S I hope someone else can pick up the thread...
Cheers,
Michaël.
Ok, I am using PetaPoco now and I've managed to compile my code with just restarting the IIS Server ;) My controller and view files are in the App_Code -Folder now. I created a startup class that create the table if it doesnt exist.
But there is still a problem. I don't see the table in my database, altough I see this message in the log, so I am really confused. I thought maybe there could be a permission problem?
Hi Nadine,
Could you maybe post the part of the code where you create the table? It might help understand what is going wrong. I find it strange that the name of the table mentioned in the log is "tablename", if everything went well, I guess it should normally be the actual name of the table you created.
Cheers,
Michaël.
Oh, I just make my tablename anonymous :)
In my poco-model-class the tablename is declared like this
Yeah :D The table is created correctly in the database...I see it. Maybe I overlooked it - I don't know !! I am really,really sorry for wasting your time Michael ! :-)
Hihi, good news, I'm glad it's working :-) !
No problem, it did not take me too long to write the last post ;-)
Have a nice week-end!
Cheers,
Michaël.
is working on a reply...