[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[patch] schema fixes



Attached

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
From c7192547b5bc2c045e297454524ab1354b138375 Mon Sep 17 00:00:00 2001
From: wbadm <wbadm@hufflepuff.(none)>
Date: Fri, 3 Dec 2010 09:55:44 +0000
Subject: [PATCH] schema: Fix missing brace and broken script

The script would fail if arches-tables.sql didn't already exist.
The generated SQL was broken due to missing brace in CREATE TABLE.
---
 schema/arches-tables.in |    1 +
 schema/arches-tables.sh |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/schema/arches-tables.in b/schema/arches-tables.in
index 8a327e1..a7b649b 100644
--- a/schema/arches-tables.in
+++ b/schema/arches-tables.in
@@ -8,6 +8,7 @@ grant usage on schema "ARCH_public" to "ARCH", public;
 grant usage on schema "ARCH" to wb_security;
 
 create table "ARCH".packages
+(
     package character varying NOT NULL,
     distribution character varying NOT NULL,
     version character varying,
diff --git a/schema/arches-tables.sh b/schema/arches-tables.sh
index 846ce65..0118c35 100755
--- a/schema/arches-tables.sh
+++ b/schema/arches-tables.sh
@@ -2,5 +2,5 @@
 
 ARCHES="alpha amd64 arm armel hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 sparc"
 
-rm arches-tables.sql
+rm -f arches-tables.sql
 for arch in $ARCHES; do sed -e "s/ARCH/$arch/g" < arches-tables.in >> arches-tables.sql ; done
-- 
1.5.6.5

Attachment: signature.asc
Description: Digital signature


Reply to: