Postgres Integrity constraints

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/6/2007 11:36:11 AM
Gravatar
Total Posts 20

Postgres Integrity constraints

Hi all,

I'm using mojoportal as a base to a site.

I'm very impressed with all the structure and even features like blog and forum are interesting, my first goal is to use the user authentication structure.

 

So I checked the database structure to see what columns of what tables I need to connect my site to Mojoportal. And I noticed that there is just a few integrity constraints in postgres schema.

Is it proposital? The other database schemas are like that?

 

9/6/2007 12:00:13 PM
Gravatar
Total Posts 18439

Re: Postgres Integrity constraints

Hi,

I'm in the process of transitioning from the use of integer ids to guids but I still have a ways to go to finish that plan. After that I plan to examine setting up appropriate constraints. The MS SQL version does currently have more contstraints but it is inconsistent at the moment accross the different data layers. I would welcome your help in defining them for postgresql but I think it will take me a few more releases to get all the guid columns in place and the code changed to use them.

The benefit of switching to guids will be that it will make it easier to implement a feature to import data from one db to another like moving pages and users from one site to another without id conflicts.

Joe

9/6/2007 12:11:29 PM
Gravatar
Total Posts 20

Re: Postgres Integrity constraints

Thanks, Joe.

What do you think? If I create some (maybe all...) constraints using current integer ids and send then to you. Will this be a help or a problem?

9/6/2007 12:40:42 PM
Gravatar
Total Posts 18439

Re: Postgres Integrity constraints

Hi,

If you want to send me script(s) to alter tables and add contstraints as appropriate I will add them in as an upgrade script. Please test after making the changes on your system and let me know if adding these constraints cause any errors like if you try to delete a page and it has child objects like content on it. It should not cause errors but please test some to make sure so that if it does I can fix them.

Over time as a continue making the changes to guids I may have to drop some of these contraints and add different ones.

Thanks,

Joe

joe dot audette at gmail dot com

9/6/2007 2:08:08 PM
Gravatar
Total Posts 20

Re: Postgres Integrity constraints

Ok.

I'll do it.

Just will not be so quickly cause I'm doing this in my free(??) time.

Just one last question: you said "It should not cause errors" when sugesting to test some delete situations. But:

- Because application already deletes child data;

or

- Because constraint definition must to be "cascade"?

Usually I use to define constraints as "restrict" to prevent undesired deletes, but I don't have any personal restriction with "cascade".

 

9/6/2007 2:34:37 PM
Gravatar
Total Posts 18439

Re: Postgres Integrity constraints

I think it already deletes child files.

Joe

9/12/2007 8:36:25 AM
Gravatar
Total Posts 20

Re: Postgres Integrity constraints

I sent to your gmail. Did you receive?

9/12/2007 8:39:52 AM
Gravatar
Total Posts 18439

Re: Postgres Integrity constraints

No I haven't received it, can you send it again?

joe.audette [at] gmail .com

Thanks,

Joe

9/12/2007 11:20:19 AM
Gravatar
Total Posts 20

Re: Postgres Integrity constraints

Sent again.

Probably was blocked by email control systems here.

Vinicius

9/12/2007 11:25:25 AM
Gravatar
Total Posts 18439

Re: Postgres Integrity constraints

Hi Vinicius,

Got it this time. I'll review and try to get this into svn in the next few days.

Thanks a lot!

Joe

You must sign in to post in the forums. This thread is closed to new posts.