Commit 28a6917c authored by fv3rdugo's avatar fv3rdugo
Browse files

Rename lx_templates table to lxc_templates for compatibility with sqlite....

Rename lx_templates table to lxc_templates for compatibility with sqlite. Maybe was an error lx_templates instead lxc_templates.
parent 7353cb94
...@@ -368,7 +368,7 @@ sub list_images_lxc { ...@@ -368,7 +368,7 @@ sub list_images_lxc {
my $self = shift; my $self = shift;
my @domains; my @domains;
my $sth = $CONNECTOR->dbh->prepare( my $sth = $CONNECTOR->dbh->prepare(
"SELECT * FROM lx_templates ORDER BY name" "SELECT * FROM lxc_templates ORDER BY name"
); );
$sth->execute; $sth->execute;
while (my $row = $sth->fetchrow_hashref) { while (my $row = $sth->fetchrow_hashref) {
......
...@@ -96,7 +96,7 @@ sub _search_template { ...@@ -96,7 +96,7 @@ sub _search_template {
my $self = shift; my $self = shift;
my $id_template = shift or confess "Missing id_template"; my $id_template = shift or confess "Missing id_template";
my $sth = $$CONNECTOR->dbh->prepare("SELECT * FROM lx_templates WHERE id = ?"); my $sth = $$CONNECTOR->dbh->prepare("SELECT * FROM lxc_templates WHERE id = ?");
$sth->execute($id_template); $sth->execute($id_template);
my $row = $sth->fetchrow_hashref; my $row = $sth->fetchrow_hashref;
die "Missing lx_template id=$id_template" if !keys %$row; die "Missing lx_template id=$id_template" if !keys %$row;
......
CREATE TABLE `lx_templates` ( CREATE TABLE `lxc_templates` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`name` char(64) NOT NULL, `name` char(64) NOT NULL,
`description` varchar(355), `description` varchar(355),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment