Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This only applies to Framework 13.0.121 or higher

Creating/Altering/Updating a Database

		$table = $this->FreePBX->Database->migrate("meetme");
		$cols = array(
			"exten" => array(
				"type" => "string",
				"length" => 50,
				"primaryKey" => true
			),
			"options" => array(
				"type" => "string",
				"length" => 15,
				"notnull" => false,
			),
			"userpin" => array(
				"type" => "string",
				"length" => 50,
				"notnull" => false,
			),
			"adminpin" => array(
				"type" => "string",
				"length" => 50,
				"notnull" => false,
			),
			"description" => array(
				"type" => "string",
				"length" => 50,
				"notnull" => false,
			),
			"joinmsg_id" => array(
				"type" => "integer",
				"notnull" => false,
			),
			"music" => array(
				"type" => "string",
				"length" => 80,
				"notnull" => false,
			),
			"users" => array(
				"type" => "smallint",
				"unsigned" => false,
				"default" => 0,
				"notnull" => false
			),
			"language" => array(
				"type" => "string",
				"length" => 10,
				"default" => "",
			),
		);
		$indexes = array(
			"index1" => array(
				"type" => "unique",
				"cols" => array(
					"music",
					"users",
					"language"
				)
			)
		);
		$table->modify($cols,$indexes);
  • No labels