Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added FK functions in DBUtil #158

Closed
wants to merge 2 commits into from
Closed

Added FK functions in DBUtil #158

wants to merge 2 commits into from

Conversation

axelitus
Copy link
Contributor

Usage:

ADD FKs CONSTRAINTS

\DBUtil::add_fk('my_table', array(
    'fk_1' => array(
        'field' => 'my_field',
        'references' => array(
            'table' => 'referenced_table',
            'field' => 'referenced_field'
        ),
        'on_delete' => 'cascade',
        'on_update' => 'cascade'
    ),
    'fk_2' => array(
        'field' => 'my_field',
        'references' => array(
            'table' => 'referenced_table',
            'field' => 'referenced_field'
        ),
        'on_delete' => 'cascade',
        'on_update' => 'cascade'
    ),
));

DROP FKs CONSTRAINTS

\DBUtil::drop_fk('my_table', array('fk_1', 'fk_2'));

@dhrrgn
Copy link
Contributor

dhrrgn commented Jun 5, 2011

This will not be merged until doc blocks are added. Also, please document the functions and submit a pull request on github.com/fuel/docs

@axelitus
Copy link
Contributor Author

Doc blocks were added and a pull request in fuel/docs has been requested (fuel/docs#106)

@calvinfroedge
Copy link

I did not look at pull requests before I wrote functionality for this also. I guess I should have = (

Maybe we discuss which approach to take? Here is my pull request:

#245

I can close mine if needed.

@axelitus
Copy link
Contributor Author

I will be removing this repo (messed things up, still learning git...) but I'm guessing this functionality will be present in the new DBUtil drivers that are planned for release 1.1

I have made a backup of this code though if needed...

@axelitus axelitus closed this Sep 20, 2011
andrewwheal pushed a commit to propcom/core that referenced this pull request Jan 23, 2014
Query : no interest in using call_user_func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants