NAME
Bif::SQLite::func_new_project - add a new project to an update
VERSION
0.1.0 (yyyy-mm-dd)
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::SQLite::table::updates, Bif::SQLite::table::topics, Bif::SQLite::table::projects, Bif::SQLite::func_new_project_status, Bif::SQLite::table::project_updates, Bif::SQLite::func_merge_updates
AUTHOR
Mark Lawrence <nomad@null.net>
COPYRIGHT AND LICENSE
Copyright 2013 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.