Database model & ok to extend existing tables?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Database model & ok to extend existing tables?

Lars_H
Hi all!

Some questions I hope someone can answer:

1. Does anyone know if there is a database model of oC v9 available somewhere?

2. I've started to create an "App" that adds an expiration date on shared and re-shared items much like the public links. What's the policy regarding adding columns to existing tables in this case "oc_share"? Or am I suppose to create my own mapping table for example "oc_share_ex" and add my columns there?

3. Where do you find documentation on the internal frame-work and the object relation mappings?

Any kind of information or pointer is much appreciated
--


Many thanks in advance!
Regard, Lars.

_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Database model & ok to extend existing tables?

Vincent Petry
Hello,

You can find the database model defined as XML here: https://github.com/owncloud/core/blob/v9.0.2/db_structure.xml

Adding a column in the core database only for an app to use it doesn't make much sense. So it would be better if you made a mapping table in your own app and map by share id.

On another note, this is also a feature request in core https://github.com/owncloud/core/issues/11642
So depending on how much your app is providing besides expiration, you could also choose to contribute the feature to core.
From what I remember there is already an expiration column in the database that can be reused for regular shares.

Cheers,

Vincent

On 24.05.2016 20:09, Lars Hammarstrand wrote:
Hi all!

Some questions I hope someone can answer:

1. Does anyone know if there is a database model of oC v9 available
somewhere?

2. I've started to create an "App" that adds an expiration date on shared
and re-shared items much like the public links. What's the policy regarding
adding columns to existing tables in this case "oc_share"? Or am I suppose
to create my own mapping table for example "oc_share_ex" and add my columns
there?

3. Where do you find documentation on the internal frame-work and the
object relation mappings?

Any kind of information or pointer is much appreciated
--


Many thanks in advance!
Regard, Lars.



_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/devel