mirror of
https://github.com/containers/podman.git
synced 2025-07-02 08:47:43 +08:00
Fix lingering SQL error
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
@ -104,10 +104,10 @@ func (s *SQLState) Container(id string) (*Container, error) {
|
||||
containerState.StartedTime,
|
||||
containerState.FinishedTime,
|
||||
containerState.ExitCode
|
||||
FROM containers
|
||||
INNER JOIN
|
||||
containerState ON containers.Id = containerState.Id
|
||||
WHERE containers.Id=?;`
|
||||
FROM containers
|
||||
INNER JOIN
|
||||
containerState ON containers.Id = containerState.Id
|
||||
WHERE containers.Id=?;`
|
||||
|
||||
if !s.valid {
|
||||
return nil, ErrDBClosed
|
||||
@ -133,10 +133,10 @@ func (s *SQLState) LookupContainer(idOrName string) (*Container, error) {
|
||||
containerState.StartedTime,
|
||||
containerState.FinishedTime,
|
||||
containerState.ExitCode
|
||||
FROM containers
|
||||
INNER JOIN
|
||||
containerState ON containers.Id = containerState.Id
|
||||
WHERE (containers.Id LIKE ?) OR containers.Name=?;`
|
||||
FROM containers
|
||||
INNER JOIN
|
||||
containerState ON containers.Id = containerState.Id
|
||||
WHERE (containers.Id LIKE ?) OR containers.Name=?;`
|
||||
|
||||
if !s.valid {
|
||||
return nil, ErrDBClosed
|
||||
|
@ -32,7 +32,7 @@ func prepareDB(db *sql.DB) (err error) {
|
||||
|
||||
// Create a table for unchanging container data
|
||||
const createCtr = `
|
||||
CREATE TABLE IF NOT EXIST containers(
|
||||
CREATE TABLE IF NOT EXISTS containers(
|
||||
Id TEXT NOT NULL PRIMARY KEY,
|
||||
Name TEXT NOT NULL UNIQUE,
|
||||
MountLabel TEXT NOT NULL,
|
||||
@ -40,7 +40,7 @@ func prepareDB(db *sql.DB) (err error) {
|
||||
Stdin INTEGER NOT NULL,
|
||||
LabelsJSON TEXT NOT NULL,
|
||||
StopSignal INTEGER NOT NULL,
|
||||
CreatedTime TEXT NOT NULL
|
||||
CreatedTime TEXT NOT NULL,
|
||||
RootfsImageID TEXT NOT NULL,
|
||||
RootfsImageName TEXT NOT NULL,
|
||||
UseImageConfig INTEGER NOT NULL,
|
||||
@ -52,7 +52,7 @@ func prepareDB(db *sql.DB) (err error) {
|
||||
|
||||
// Create a table for changing container state
|
||||
const createCtrState = `
|
||||
CREATE TABLE IF NOT EXIST containerState(
|
||||
CREATE TABLE IF NOT EXISTS containerState(
|
||||
Id TEXT NOT NULL PRIMARY KEY,
|
||||
State INTEGER NOT NULL,
|
||||
ConfigPath TEXT NOT NULL,
|
||||
|
Reference in New Issue
Block a user