Changeset 16244 for trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
- Timestamp:
- Jan 25, 2008, 4:04:46 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
r16181 r16244 1 1 # Copyright (c) 2004 Joshua Hoblitt 2 2 # 3 # $Id: SQL.pm,v 1.4 3 2008-01-22 21:27:46 jhoblitt Exp $3 # $Id: SQL.pm,v 1.44 2008-01-26 02:04:46 jhoblitt Exp $ 4 4 5 5 package Nebulous::Server::SQL; … … 35 35 }, 36 36 delete_object => qq{ 37 DELETE 38 storage_object, 39 storage_object_attr 40 FROM storage_object 41 JOIN storage_object_attr 42 USING (so_id) 37 DELETE FROM storage_object 43 38 WHERE storage_object.so_id = ? 44 39 }, … … 310 305 CREATE TABLE storage_object_attr ( 311 306 so_id BIGINT NOT NULL AUTO_INCREMENT, 307 FOREIGN KEY(so_id) REFERENCES storage_object(so_id) ON DELETE CASCADE, 312 308 read_lock TINYINT DEFAULT 0 NOT NULL, 313 309 write_lock ENUM( 'write' ), … … 321 317 CREATE TABLE storage_object_xattr ( 322 318 so_id BIGINT NOT NULL AUTO_INCREMENT, 319 FOREIGN KEY(so_id) REFERENCES storage_object(so_id) ON DELETE CASCADE, 323 320 name VARCHAR(255), 324 321 value BLOB, … … 331 328 ins_id BIGINT NOT NULL AUTO_INCREMENT, 332 329 so_id BIGINT NOT NULL, 330 FOREIGN KEY(so_id) REFERENCES storage_object(so_id), 333 331 vol_id INT NOT NULL, 334 332 uri VARCHAR(255) NOT NULL UNIQUE, … … 347 345 CREATE TABLE lock_record ( 348 346 so_id BIGINT NOT NULL, 347 FOREIGN KEY(so_id) REFERENCES storage_object(so_id), 349 348 type ENUM( 'read', 'write' ) NOT NULL, 350 349 epoch TIMESTAMP, … … 363 362 PRIMARY KEY(vol_id), 364 363 KEY(name(16)), 364 KEY(path(255)), 365 365 KEY(allocate), 366 366 KEY(available) … … 391 391 CREATE TABLE mountedvol( 392 392 mountpoint VARCHAR(255) NOT NULL, 393 FOREIGN KEY(mountpoint) REFERENCES mount(mountpoint), 393 394 total BIGINT NOT NULL, 394 395 used BIGINT NOT NULL, 395 396 vol_id INT NOT NULL, 397 FOREIGN KEY(vol_id) REFERENCES volume(vol_id), 396 398 name VARCHAR(255) NOT NULL, 397 399 path VARCHAR(255) NOT NULL, 400 FOREIGN KEY(path) REFERENCES volume(path), 398 401 allocate BOOLEAN DEFAULT FALSE, 399 402 available BOOLEAN DEFAULT FALSE,
Note:
See TracChangeset
for help on using the changeset viewer.
