SHARE
TWEET

Untitled

a guest May 24th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE 'door_devices'
  2. (
  3.   'id' int PRIMARY KEY,
  4.   'hex_id' varchar(255),
  5.   'symm_key' varchar(255),
  6.   'name' varchar(255),
  7.   'active' tinyint
  8. );
  9.  
  10. CREATE TABLE 'door_events'
  11. (
  12.   'id' int PRIMARY KEY,
  13.   'device_id' int,
  14.   'counter' int,
  15.   'percentage' int,
  16.   'degrees' int,
  17.   'open' tinyint,
  18.   'battery' int,
  19.   'created_at' varchar(255)
  20. );
  21.  
  22. ALTER TABLE 'door_events' ADD FOREIGN KEY ('device_id') REFERENCES 'door_devices' ('id');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top