|
| 1 | +{ |
| 2 | + "version": "5", |
| 3 | + "dialect": "pg", |
| 4 | + "id": "dd8363c1-1ee4-472f-93b3-cfe9bf6a5348", |
| 5 | + "prevId": "c1865683-64e6-4a69-b1ec-686bd07fc724", |
| 6 | + "tables": { |
| 7 | + "business_details": { |
| 8 | + "name": "business_details", |
| 9 | + "schema": "", |
| 10 | + "columns": { |
| 11 | + "id": { |
| 12 | + "name": "id", |
| 13 | + "type": "serial", |
| 14 | + "primaryKey": true, |
| 15 | + "notNull": true |
| 16 | + }, |
| 17 | + "company_name": { |
| 18 | + "name": "company_name", |
| 19 | + "type": "varchar", |
| 20 | + "primaryKey": false, |
| 21 | + "notNull": true |
| 22 | + }, |
| 23 | + "tax_number": { |
| 24 | + "name": "tax_number", |
| 25 | + "type": "varchar", |
| 26 | + "primaryKey": false, |
| 27 | + "notNull": true |
| 28 | + }, |
| 29 | + "owner_id": { |
| 30 | + "name": "owner_id", |
| 31 | + "type": "integer", |
| 32 | + "primaryKey": false, |
| 33 | + "notNull": true |
| 34 | + }, |
| 35 | + "created_at": { |
| 36 | + "name": "created_at", |
| 37 | + "type": "timestamp", |
| 38 | + "primaryKey": false, |
| 39 | + "notNull": true, |
| 40 | + "default": "now()" |
| 41 | + }, |
| 42 | + "updated_at": { |
| 43 | + "name": "updated_at", |
| 44 | + "type": "timestamp", |
| 45 | + "primaryKey": false, |
| 46 | + "notNull": true, |
| 47 | + "default": "now()" |
| 48 | + } |
| 49 | + }, |
| 50 | + "indexes": {}, |
| 51 | + "foreignKeys": { |
| 52 | + "business_details_owner_id_users_id_fk": { |
| 53 | + "name": "business_details_owner_id_users_id_fk", |
| 54 | + "tableFrom": "business_details", |
| 55 | + "tableTo": "users", |
| 56 | + "columnsFrom": ["owner_id"], |
| 57 | + "columnsTo": ["id"], |
| 58 | + "onDelete": "no action", |
| 59 | + "onUpdate": "no action" |
| 60 | + } |
| 61 | + }, |
| 62 | + "compositePrimaryKeys": {}, |
| 63 | + "uniqueConstraints": { |
| 64 | + "business_details_company_name_unique": { |
| 65 | + "name": "business_details_company_name_unique", |
| 66 | + "nullsNotDistinct": false, |
| 67 | + "columns": ["company_name"] |
| 68 | + }, |
| 69 | + "business_details_tax_number_unique": { |
| 70 | + "name": "business_details_tax_number_unique", |
| 71 | + "nullsNotDistinct": false, |
| 72 | + "columns": ["tax_number"] |
| 73 | + } |
| 74 | + } |
| 75 | + }, |
| 76 | + "groups": { |
| 77 | + "name": "groups", |
| 78 | + "schema": "", |
| 79 | + "columns": { |
| 80 | + "id": { |
| 81 | + "name": "id", |
| 82 | + "type": "serial", |
| 83 | + "primaryKey": true, |
| 84 | + "notNull": true |
| 85 | + }, |
| 86 | + "name": { |
| 87 | + "name": "name", |
| 88 | + "type": "varchar", |
| 89 | + "primaryKey": false, |
| 90 | + "notNull": true |
| 91 | + }, |
| 92 | + "key": { |
| 93 | + "name": "key", |
| 94 | + "type": "varchar", |
| 95 | + "primaryKey": false, |
| 96 | + "notNull": true |
| 97 | + }, |
| 98 | + "created_at": { |
| 99 | + "name": "created_at", |
| 100 | + "type": "timestamp", |
| 101 | + "primaryKey": false, |
| 102 | + "notNull": true, |
| 103 | + "default": "now()" |
| 104 | + }, |
| 105 | + "updated_at": { |
| 106 | + "name": "updated_at", |
| 107 | + "type": "timestamp", |
| 108 | + "primaryKey": false, |
| 109 | + "notNull": true, |
| 110 | + "default": "now()" |
| 111 | + } |
| 112 | + }, |
| 113 | + "indexes": {}, |
| 114 | + "foreignKeys": {}, |
| 115 | + "compositePrimaryKeys": {}, |
| 116 | + "uniqueConstraints": {} |
| 117 | + }, |
| 118 | + "users": { |
| 119 | + "name": "users", |
| 120 | + "schema": "", |
| 121 | + "columns": { |
| 122 | + "id": { |
| 123 | + "name": "id", |
| 124 | + "type": "serial", |
| 125 | + "primaryKey": true, |
| 126 | + "notNull": true |
| 127 | + }, |
| 128 | + "phone": { |
| 129 | + "name": "phone", |
| 130 | + "type": "varchar", |
| 131 | + "primaryKey": false, |
| 132 | + "notNull": true |
| 133 | + }, |
| 134 | + "email": { |
| 135 | + "name": "email", |
| 136 | + "type": "varchar", |
| 137 | + "primaryKey": false, |
| 138 | + "notNull": true |
| 139 | + }, |
| 140 | + "first_name": { |
| 141 | + "name": "first_name", |
| 142 | + "type": "varchar", |
| 143 | + "primaryKey": false, |
| 144 | + "notNull": true |
| 145 | + }, |
| 146 | + "last_name": { |
| 147 | + "name": "last_name", |
| 148 | + "type": "varchar", |
| 149 | + "primaryKey": false, |
| 150 | + "notNull": true |
| 151 | + }, |
| 152 | + "password_hash": { |
| 153 | + "name": "password_hash", |
| 154 | + "type": "varchar", |
| 155 | + "primaryKey": false, |
| 156 | + "notNull": true |
| 157 | + }, |
| 158 | + "password_salt": { |
| 159 | + "name": "password_salt", |
| 160 | + "type": "varchar", |
| 161 | + "primaryKey": false, |
| 162 | + "notNull": true |
| 163 | + }, |
| 164 | + "group_id": { |
| 165 | + "name": "group_id", |
| 166 | + "type": "integer", |
| 167 | + "primaryKey": false, |
| 168 | + "notNull": true |
| 169 | + }, |
| 170 | + "access_token": { |
| 171 | + "name": "access_token", |
| 172 | + "type": "varchar", |
| 173 | + "primaryKey": false, |
| 174 | + "notNull": false |
| 175 | + }, |
| 176 | + "created_at": { |
| 177 | + "name": "created_at", |
| 178 | + "type": "timestamp", |
| 179 | + "primaryKey": false, |
| 180 | + "notNull": true, |
| 181 | + "default": "now()" |
| 182 | + }, |
| 183 | + "updated_at": { |
| 184 | + "name": "updated_at", |
| 185 | + "type": "timestamp", |
| 186 | + "primaryKey": false, |
| 187 | + "notNull": true, |
| 188 | + "default": "now()" |
| 189 | + } |
| 190 | + }, |
| 191 | + "indexes": { |
| 192 | + "users_phone_unique_idx": { |
| 193 | + "name": "users_phone_unique_idx", |
| 194 | + "columns": ["phone"], |
| 195 | + "isUnique": true |
| 196 | + }, |
| 197 | + "users_email_unique_idx": { |
| 198 | + "name": "users_email_unique_idx", |
| 199 | + "columns": ["email"], |
| 200 | + "isUnique": true |
| 201 | + } |
| 202 | + }, |
| 203 | + "foreignKeys": { |
| 204 | + "users_group_id_groups_id_fk": { |
| 205 | + "name": "users_group_id_groups_id_fk", |
| 206 | + "tableFrom": "users", |
| 207 | + "tableTo": "groups", |
| 208 | + "columnsFrom": ["group_id"], |
| 209 | + "columnsTo": ["id"], |
| 210 | + "onDelete": "no action", |
| 211 | + "onUpdate": "no action" |
| 212 | + } |
| 213 | + }, |
| 214 | + "compositePrimaryKeys": {}, |
| 215 | + "uniqueConstraints": {} |
| 216 | + } |
| 217 | + }, |
| 218 | + "enums": {}, |
| 219 | + "schemas": {}, |
| 220 | + "_meta": { |
| 221 | + "schemas": {}, |
| 222 | + "tables": {}, |
| 223 | + "columns": {} |
| 224 | + } |
| 225 | +} |
0 commit comments