248 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			248 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
{
 | 
						|
  "id": "1b2a9dc5-79f6-4172-ba68-f1b9c0e67708",
 | 
						|
  "prevId": "00000000-0000-0000-0000-000000000000",
 | 
						|
  "version": "7",
 | 
						|
  "dialect": "postgresql",
 | 
						|
  "tables": {
 | 
						|
    "public.habit_logs": {
 | 
						|
      "name": "habit_logs",
 | 
						|
      "schema": "",
 | 
						|
      "columns": {
 | 
						|
        "id": {
 | 
						|
          "name": "id",
 | 
						|
          "type": "serial",
 | 
						|
          "primaryKey": true,
 | 
						|
          "notNull": true
 | 
						|
        },
 | 
						|
        "habit_id": {
 | 
						|
          "name": "habit_id",
 | 
						|
          "type": "integer",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true
 | 
						|
        },
 | 
						|
        "logged_at": {
 | 
						|
          "name": "logged_at",
 | 
						|
          "type": "timestamp",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true,
 | 
						|
          "default": "now()"
 | 
						|
        },
 | 
						|
        "note": {
 | 
						|
          "name": "note",
 | 
						|
          "type": "text",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": false
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "indexes": {
 | 
						|
        "habit_logs_habit_id_idx": {
 | 
						|
          "name": "habit_logs_habit_id_idx",
 | 
						|
          "columns": [
 | 
						|
            {
 | 
						|
              "expression": "habit_id",
 | 
						|
              "isExpression": false,
 | 
						|
              "asc": true,
 | 
						|
              "nulls": "last"
 | 
						|
            }
 | 
						|
          ],
 | 
						|
          "isUnique": false,
 | 
						|
          "concurrently": false,
 | 
						|
          "method": "btree",
 | 
						|
          "with": {}
 | 
						|
        },
 | 
						|
        "habit_logs_logged_at_idx": {
 | 
						|
          "name": "habit_logs_logged_at_idx",
 | 
						|
          "columns": [
 | 
						|
            {
 | 
						|
              "expression": "logged_at",
 | 
						|
              "isExpression": false,
 | 
						|
              "asc": true,
 | 
						|
              "nulls": "last"
 | 
						|
            }
 | 
						|
          ],
 | 
						|
          "isUnique": false,
 | 
						|
          "concurrently": false,
 | 
						|
          "method": "btree",
 | 
						|
          "with": {}
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "foreignKeys": {
 | 
						|
        "habit_logs_habit_id_habits_id_fk": {
 | 
						|
          "name": "habit_logs_habit_id_habits_id_fk",
 | 
						|
          "tableFrom": "habit_logs",
 | 
						|
          "tableTo": "habits",
 | 
						|
          "columnsFrom": [
 | 
						|
            "habit_id"
 | 
						|
          ],
 | 
						|
          "columnsTo": [
 | 
						|
            "id"
 | 
						|
          ],
 | 
						|
          "onDelete": "no action",
 | 
						|
          "onUpdate": "no action"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "compositePrimaryKeys": {},
 | 
						|
      "uniqueConstraints": {},
 | 
						|
      "policies": {},
 | 
						|
      "checkConstraints": {},
 | 
						|
      "isRLSEnabled": false
 | 
						|
    },
 | 
						|
    "public.habits": {
 | 
						|
      "name": "habits",
 | 
						|
      "schema": "",
 | 
						|
      "columns": {
 | 
						|
        "id": {
 | 
						|
          "name": "id",
 | 
						|
          "type": "serial",
 | 
						|
          "primaryKey": true,
 | 
						|
          "notNull": true
 | 
						|
        },
 | 
						|
        "user_id": {
 | 
						|
          "name": "user_id",
 | 
						|
          "type": "integer",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true
 | 
						|
        },
 | 
						|
        "name": {
 | 
						|
          "name": "name",
 | 
						|
          "type": "text",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true
 | 
						|
        },
 | 
						|
        "type": {
 | 
						|
          "name": "type",
 | 
						|
          "type": "text",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true,
 | 
						|
          "default": "'neutral'"
 | 
						|
        },
 | 
						|
        "target_frequency": {
 | 
						|
          "name": "target_frequency",
 | 
						|
          "type": "jsonb",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": false
 | 
						|
        },
 | 
						|
        "color": {
 | 
						|
          "name": "color",
 | 
						|
          "type": "text",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": false
 | 
						|
        },
 | 
						|
        "icon": {
 | 
						|
          "name": "icon",
 | 
						|
          "type": "text",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": false
 | 
						|
        },
 | 
						|
        "is_archived": {
 | 
						|
          "name": "is_archived",
 | 
						|
          "type": "boolean",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true,
 | 
						|
          "default": false
 | 
						|
        },
 | 
						|
        "created_at": {
 | 
						|
          "name": "created_at",
 | 
						|
          "type": "timestamp",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true,
 | 
						|
          "default": "now()"
 | 
						|
        },
 | 
						|
        "archived_at": {
 | 
						|
          "name": "archived_at",
 | 
						|
          "type": "timestamp",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": false
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "indexes": {
 | 
						|
        "habits_user_id_idx": {
 | 
						|
          "name": "habits_user_id_idx",
 | 
						|
          "columns": [
 | 
						|
            {
 | 
						|
              "expression": "user_id",
 | 
						|
              "isExpression": false,
 | 
						|
              "asc": true,
 | 
						|
              "nulls": "last"
 | 
						|
            }
 | 
						|
          ],
 | 
						|
          "isUnique": false,
 | 
						|
          "concurrently": false,
 | 
						|
          "method": "btree",
 | 
						|
          "with": {}
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "foreignKeys": {
 | 
						|
        "habits_user_id_users_id_fk": {
 | 
						|
          "name": "habits_user_id_users_id_fk",
 | 
						|
          "tableFrom": "habits",
 | 
						|
          "tableTo": "users",
 | 
						|
          "columnsFrom": [
 | 
						|
            "user_id"
 | 
						|
          ],
 | 
						|
          "columnsTo": [
 | 
						|
            "id"
 | 
						|
          ],
 | 
						|
          "onDelete": "no action",
 | 
						|
          "onUpdate": "no action"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "compositePrimaryKeys": {},
 | 
						|
      "uniqueConstraints": {},
 | 
						|
      "policies": {},
 | 
						|
      "checkConstraints": {},
 | 
						|
      "isRLSEnabled": false
 | 
						|
    },
 | 
						|
    "public.users": {
 | 
						|
      "name": "users",
 | 
						|
      "schema": "",
 | 
						|
      "columns": {
 | 
						|
        "id": {
 | 
						|
          "name": "id",
 | 
						|
          "type": "serial",
 | 
						|
          "primaryKey": true,
 | 
						|
          "notNull": true
 | 
						|
        },
 | 
						|
        "token": {
 | 
						|
          "name": "token",
 | 
						|
          "type": "text",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true
 | 
						|
        },
 | 
						|
        "created_at": {
 | 
						|
          "name": "created_at",
 | 
						|
          "type": "timestamp",
 | 
						|
          "primaryKey": false,
 | 
						|
          "notNull": true,
 | 
						|
          "default": "now()"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "indexes": {},
 | 
						|
      "foreignKeys": {},
 | 
						|
      "compositePrimaryKeys": {},
 | 
						|
      "uniqueConstraints": {
 | 
						|
        "users_token_unique": {
 | 
						|
          "name": "users_token_unique",
 | 
						|
          "nullsNotDistinct": false,
 | 
						|
          "columns": [
 | 
						|
            "token"
 | 
						|
          ]
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "policies": {},
 | 
						|
      "checkConstraints": {},
 | 
						|
      "isRLSEnabled": false
 | 
						|
    }
 | 
						|
  },
 | 
						|
  "enums": {},
 | 
						|
  "schemas": {},
 | 
						|
  "sequences": {},
 | 
						|
  "roles": {},
 | 
						|
  "policies": {},
 | 
						|
  "views": {},
 | 
						|
  "_meta": {
 | 
						|
    "columns": {},
 | 
						|
    "schemas": {},
 | 
						|
    "tables": {}
 | 
						|
  }
 | 
						|
} |