]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - sql/create-sf1_blocks-table.sql
Renamed the "tiger" table to "tiger_blocks" in preparation for the addition of the...
[dead/census-tools.git] / sql / create-sf1_blocks-table.sql
index 71d87b5c433b8599d9b786b109f1a3c47c7ce937..80f3c799a169c1b202fd465d65d451ce94c56a58 100644 (file)
@@ -3,8 +3,8 @@
   foreign key column before we can create the foreign key
   constraint.
 */
-CREATE UNIQUE INDEX idx_tiger_blkidfp00_unique
-       ON tiger (blkidfp00);
+CREATE UNIQUE INDEX idx_tiger_blocks_blkidfp00_unique
+       ON tiger_blocks (blkidfp00);
 
 CREATE TABLE sf1_blocks (
        id                 SERIAL           PRIMARY KEY,
@@ -14,11 +14,11 @@ CREATE TABLE sf1_blocks (
        block             varchar(4)       NOT NULL,
        arealand           double precision NOT NULL,
        areawatr           double precision NOT NULL,
-       tiger_blkidfp00    varchar(15)      NOT NULL REFERENCES tiger (blkidfp00),
+       blkidfp00         varchar(15)      NOT NULL REFERENCES tiger_blocks (blkidfp00),
        pop100            integer          NOT NULL,
        total_area        double precision NOT NULL,
        population_density double precision NOT NULL
 );
 
-CREATE UNIQUE INDEX idx_sf1_blocks_tiger_blkidfp00_unique
-       ON sf1_blocks (tiger_blkidfp00);
+CREATE UNIQUE INDEX idx_sf1_blocks_blkidfp00_unique
+       ON sf1_blocks (blkidfp00);