Skip to contents

Create a new record in the database for a facility, which could be either an asset, a space, or an entity.

Usage

insert_facility(
  facility_type,
  name,
  local_board,
  postal_address,
  designation = c("Venue for Hire", "Community Centre", "Rural Hall", "Arts & Culture",
    "Community Library", "Rural Library", "Multipurpose facility", "Research Centre",
    "Community Hub", "Special Collections"),
  delivery_model = c("Community-led facility", "Council-led facility"),
  facility_ownership = c("Council-owned", "Privately-owned"),
  staffed = FALSE,
  leased = FALSE,
  test_db = TRUE
)

Arguments

facility_type

Is the facility you're adding an asset, a space, or an entity?

name

What is the name of the facility you're adding to the database?

local_board

If the facility is an asset, in which Local Board is it located?

postal_address

If the facility is an asset, what is its full postal address?

designation

What is the purpose of this facility? How do we classify it?

delivery_model

s this a Council-led facility or a community-led facility?

facility_ownership

Is this facility owned by Council or is it privately owned?

staffed

Is this facility staffed during opening hours? Defaults to FALSE.

leased

Is this a community lease facility? Defaults to FALSE.

test_db

Is this facility being added to the test database (TRUE) or not (FALSE)? Defaults to FALSE.

Value

A tibble with 1 row containing the newly-added facility. Column numbers vary depending on whether you've added an asset, a space, or an entity.