The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

bif-doc-func-new-project - add a new project to an update

VERSION

0.1.0_7 (2014-04-15)

SYNOPSIS

    #!sqlite
    BEGIN;

    INSERT INTO updates(...);

    INSERT INTO func_new_project(
        update_id,  -- integer NOT NULL DEFAULT (currval('updates')),
        id,         -- integer NOT NULL DEFAULT (nextval('topics')),
        parent_id,  -- integer,
        name,       -- varchar(40),
        title       -- varchar(1024) NOT NULL DEFAULT ''
    ) VALUES (...);

    INSERT INTO func_new_project_status(...);

    INSERT INTO func_update_project(...);

    INSERT INTO func_merge_updates(...);

    COMMIT;

DESCRIPTION

func_new_project() adds a new project to an in-progress update by inserting a row into each of the topics and projects tables.

The transaction will fail with a foreign key violation unless at least one call to func_new_project_status() is also made and a row is inserted into project_updates resulting in projects.status_id having a valid value.

AFFECTED TABLES

A successful call to func_new_project directly affects the following tables:

SEE ALSO

bif-doc-table-updates, bif-doc-table-topics, bif-doc-table-projects, bif-doc-func-new-project-status, bif-doc-table-project-updates, bif-doc-func-merge-updates

AUTHOR

Mark Lawrence <nomad@null.net>

COPYRIGHT AND LICENSE

Copyright 2013-2014 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.