Learn R Programming

taskqueue (version 0.2.0)

db_init: Initialize PostgreSQL Database for taskqueue

Description

Creates the necessary database schema for taskqueue, including all required tables, types, and constraints. This function must be run once before using taskqueue for the first time.

Usage

db_init()

Arguments

Value

Invisibly returns NULL. Called for side effects (creating database schema).

Details

This function creates:

  • Custom PostgreSQL types (e.g., task_status enum)

  • project table for managing projects

  • resource table for computing resources

  • project_resource table for project-resource associations

It is safe to call this function multiple times; existing tables and types will not be modified or deleted.

See Also

db_clean, db_connect

Examples

Run this code
if (FALSE) {
# Not run:
# Initialize database (run once)
db_init()

# Verify initialization
con <- db_connect()
DBI::dbListTables(con)
db_disconnect(con)
}

Run the code above in your browser using DataLab