The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Add PostgreSQL provider icons to db form (#62057)
Jakub Chodorowiczd3add0b0653a
diff --git a/frontend/src/metabase/databases/components/DatabaseDetailField/DatabaseDetailField.tsx b/frontend/src/metabase/databases/components/DatabaseDetailField/DatabaseDetailField.tsxindex 6e69918f8af..dd50a14c983 100644--- a/frontend/src/metabase/databases/components/DatabaseDetailField/DatabaseDetailField.tsx+++ b/frontend/src/metabase/databases/components/DatabaseDetailField/DatabaseDetailField.tsx@@ -7,21 +7,28 @@ import {FormTextarea,} from "metabase/forms";import { Icon, type SwitchProps, Tooltip } from "metabase/ui";-import type { EngineField, EngineFieldOption } from "metabase-types/api";+import type {+ EngineField,+ EngineFieldOption,+ EngineKey,+} from "metabase-types/api";import { FIELD_OVERRIDES } from "../../constants";import type { EngineFieldOverride } from "../../types";+import { DatabaseHostnameWithProviderField } from "../DatabaseHostnameWithProviderField/DatabaseHostnameWithProviderField";import DatabaseInfoField from "../DatabaseInfoField";import DatabaseSectionField from "../DatabaseSectionField";export interface DatabaseDetailFieldProps {field: EngineField;autoFocus?: boolean;+ engineKey: EngineKey | undefined;}const DatabaseDetailField = ({field,autoFocus,+ engineKey,}: DatabaseDetailFieldProps): JSX.Element | null => {const override = FIELD_OVERRIDES[field.name];const type = getFieldType(field, override);@@ -30,6 +37,15 @@ const DatabaseDetailField = ({...getFieldProps(field, override),};+ if (field.name === "host" && engineKey === "postgres") {+ return (+ <DatabaseHostnameWithProviderField+ {...props}+ {...getInputProps(field)}+ nullable+ />+ );+ }if (typeof type === "function") {const Component = type;return <Component {...props} />;diff --git a/frontend/src/metabase/databases/components/DatabaseForm/DatabaseForm.tsx b/frontend/src/metabase/databases/components/DatabaseForm/DatabaseForm.tsxindex 115f3ce0d07..92da37edf3d 100644--- a/frontend/src/metabase/databases/components/DatabaseForm/DatabaseForm.tsx+++ b/frontend/src/metabase/databases/components/DatabaseForm/DatabaseForm.tsx@@ -10,7 +10,7 @@ import { FormErrorMessage } from "metabase/forms/components/FormErrorMessage";import { FormSubmitButton } from "metabase/forms/components/FormSubmitButton";import { useSelector } from "metabase/lib/redux";import { Button, Flex, Text } from "metabase/ui";-import type { DatabaseData, Engine } from "metabase-types/api";+import type { DatabaseData, Engine, EngineKey } from "metabase-types/api";import { getEngines } from "../../selectors";import { getDefaultEngineKey } from "../../utils/engine";@@ -116,7 +116,8 @@ export const DatabaseForm = ({><DatabaseFormBodyengine={engine}- engineKey={engineKey}+ // casting won't be needed after migrating all usages of engineKey+ engineKey={engineKey as EngineKey}engines={engines}engineFieldState={engineFieldState}autofocusFieldName={autofocusFieldName}@@ -135,7 +136,7 @@ export const DatabaseForm = ({interface DatabaseFormBodyProps {engine: Engine | undefined;- engineKey: string | undefined;+ engineKey: EngineKey | undefined;engines: Record<string, Engine>;engineFieldState?: "default" | "hidden" | "disabled";autofocusFieldName?: string;@@ -211,6 +212,7 @@ const DatabaseFormBody = ({field={field}autoFocus={autofocusFieldName === field.name}data-kek={field.name}+ engineKey={engineKey}/>))}<DatabaseFormFooterdiff --git a/frontend/src/metabase/databases/components/DatabaseForm/tests/common.unit.spec.tsx b/frontend/src/metabase/databases/components/DatabaseForm/tests/common.unit.spec.tsxindex 04f0fbfe6a4..e1a2c9d621b 100644--- a/frontend/src/metabase/databases/components/DatabaseForm/tests/common.unit.spec.tsx+++ b/frontend/src/metabase/databases/components/DatabaseForm/tests/common.unit.spec.tsx@@ -106,6 +106,34 @@ describe("DatabaseForm", () => {});});+describe("DatabaseForm with provider name", () => {+ it("submits provider name", async () => {+ const { onSubmit } = setup({+ initialValues: {+ engine: "postgres",+ },+ });++ const connectionString =+ "jdbc:postgresql://user:[email protected]:5432/mydb";+ await userEvent.type(+ screen.getByLabelText("Connection string (optional)"),+ connectionString,+ );++ const saveButton = screen.getByRole("button", { name: "Save" });+ await waitFor(() => expect(saveButton).toBeEnabled());+ await userEvent.click(saveButton);+ await waitFor(() => {+ expect(onSubmit).toHaveBeenCalledWith(+ expect.objectContaining({+ provider_name: "Neon",+ }),+ );+ });+ });+});+const EXPECTED_DEFAULT_SCHEMA = {schedules: {metadata_sync: undefined,@@ -117,4 +145,5 @@ const EXPECTED_DEFAULT_SCHEMA = {is_sample: false,is_full_sync: true,is_on_demand: false,+ provider_name: null,};diff --git a/frontend/src/metabase/databases/components/DatabaseForm/tests/postgres-form-config.mock.ts b/frontend/src/metabase/databases/components/DatabaseForm/tests/postgres-form-config.mock.tsnew file mode 100644index 00000000000..e7cf628acd8--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseForm/tests/postgres-form-config.mock.ts@@ -0,0 +1,44 @@+import type { Engine } from "metabase-types/api";++export const postgresFormConfig = {+ source: {+ type: "official",+ contact: null,+ },+ "details-fields": [+ {+ name: "host",+ "display-name": "Host",+ "helper-text":+ "Your database's IP address (e.g. 98.137.149.56) or its domain name (e.g. esc.mydatabase.com).",+ placeholder: "name.database.com",+ },+ {+ name: "port",+ "display-name": "Port",+ type: "integer",+ placeholder: 5432,+ },+ {+ name: "dbname",+ "display-name": "Database name",+ placeholder: "birds_of_the_world",+ required: true,+ },+ {+ name: "user",+ "display-name": "Username",+ placeholder: "username",+ required: true,+ },+ {+ name: "password",+ "display-name": "Password",+ type: "password",+ placeholder: "••••••••",+ },+ ],+ "driver-name": "PostgreSQL",+ "superseded-by": null,+ "extra-info": null,+} satisfies Engine;diff --git a/frontend/src/metabase/databases/components/DatabaseForm/tests/setup.tsx b/frontend/src/metabase/databases/components/DatabaseForm/tests/setup.tsxindex 862fc7a87ee..ff6bc37c817 100644--- a/frontend/src/metabase/databases/components/DatabaseForm/tests/setup.tsx+++ b/frontend/src/metabase/databases/components/DatabaseForm/tests/setup.tsx@@ -1,11 +1,13 @@import { setupEnterprisePlugins } from "__support__/enterprise";import { mockSettings } from "__support__/settings";import { renderWithProviders } from "__support__/ui";-import type { Engine, Settings } from "metabase-types/api";+import type { DatabaseData, Engine, Settings } from "metabase-types/api";import { createMockState } from "metabase-types/store/mocks";import { DatabaseForm } from "../DatabaseForm";+import { postgresFormConfig } from "./postgres-form-config.mock";+export const TEST_ENGINES: Record<string, Engine> = {h2: {source: {@@ -87,18 +89,21 @@ export const TEST_ENGINES: Record<string, Engine> = {"superseded-by": null,"extra-info": null,},+ postgres: postgresFormConfig,};export interface SetupOpts {settings?: Settings;hasEnterprisePlugins?: boolean;engines?: Record<string, Engine>;+ initialValues?: Partial<DatabaseData>;}export const setup = ({settings,hasEnterprisePlugins,engines = TEST_ENGINES,+ initialValues = {},}: SetupOpts = {}) => {const state = createMockState({settings: mockSettings({ ...settings, engines }),@@ -111,6 +116,10 @@ export const setup = ({const onSubmit = jest.fn();renderWithProviders(<DatabaseForm+ initialValues={{+ engine: "h2",+ ...initialValues,+ }}config={{ isAdvanced: true }}onSubmit={onSubmit}location="admin"diff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/DatabaseHostnameWithProviderField.tsx b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/DatabaseHostnameWithProviderField.tsxnew file mode 100644index 00000000000..452b510e2e4--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/DatabaseHostnameWithProviderField.tsx@@ -0,0 +1,26 @@+import { useField, useFormikContext } from "formik";+import { useEffect } from "react";++import { FormTextInput, type FormTextInputProps } from "metabase/forms";+import type { DatabaseData } from "metabase-types/api";++import { ProviderIcon } from "./ProviderIcon";+import { detectDBProvider } from "./database-providers";++export function DatabaseHostnameWithProviderField(props: FormTextInputProps) {+ const [{ value }] = useField(props.name);+ const { setFieldValue } = useFormikContext<DatabaseData>();++ const provider = detectDBProvider(value);++ useEffect(() => {+ setFieldValue("provider_name", provider);+ }, [provider, setFieldValue]);++ return (+ <FormTextInput+ {...props}+ leftSection={<ProviderIcon provider={provider} />}+ />+ );+}diff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/ProviderIcon.tsx b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/ProviderIcon.tsxnew file mode 100644index 00000000000..9222713c981--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/ProviderIcon.tsx@@ -0,0 +1,55 @@+import { match } from "ts-pattern";++import { Icon } from "metabase/ui";++import type { DatabaseProviderName } from "./database-providers";+import AivenIcon from "./providers/aiven.svg";+import AmazonRDSIcon from "./providers/amazon-rds.svg";+import AzureIcon from "./providers/azure.svg";+import CrunchyDataIcon from "./providers/crunchy-data.svg";+import DigitalOceanIcon from "./providers/digitalocean.svg";+import FlyIoIcon from "./providers/fly-io.svg";+import NeonIcon from "./providers/neon.svg";+import PlanetScaleIcon from "./providers/planetscale.svg";+import RailwayIcon from "./providers/railway.svg";+import RenderIcon from "./providers/render.svg";+import ScalewayIcon from "./providers/scaleway.svg";+import SupabaseIcon from "./providers/supabase.svg";+import TimescaleIcon from "./providers/timescale.svg";++const ICON_SIZE = 16;++export function ProviderIcon({+ provider,+}: {+ provider: DatabaseProviderName | null;+}) {+ if (!provider) {+ return (+ <Icon+ name="database"+ size={ICON_SIZE}+ color="icon-primary"+ opacity={0.25}+ />+ );+ }++ const image = match(provider)+ .with("Aiven", () => AivenIcon)+ .with("Amazon RDS", () => AmazonRDSIcon)+ .with("Azure", () => AzureIcon)+ .with("Crunchy Data", () => CrunchyDataIcon)+ .with("DigitalOcean", () => DigitalOceanIcon)+ .with("Fly.io", () => FlyIoIcon)+ .with("Neon", () => NeonIcon)+ .with("Render", () => RenderIcon)+ .with("Railway", () => RailwayIcon)+ .with("PlanetScale", () => PlanetScaleIcon)+ .with("Scaleway", () => ScalewayIcon)+ .with("Supabase", () => SupabaseIcon)+ .with("Timescale", () => TimescaleIcon)+ .exhaustive();++ return <img src={image} width={ICON_SIZE} height={ICON_SIZE} alt="" />;+}diff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/database-providers.ts b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/database-providers.tsnew file mode 100644index 00000000000..14dfddf863c--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/database-providers.ts@@ -0,0 +1,49 @@+const providerNames = [+ "Aiven",+ "Amazon RDS",+ "Supabase",+ "Azure",+ "Crunchy Data",+ "DigitalOcean",+ "Fly.io",+ "Neon",+ "PlanetScale",+ "Render",+ "Railway",+ "Scaleway",+ "Timescale",+] as const;++export type DatabaseProvider = {+ name: (typeof providerNames)[number];+ pattern: RegExp;+};++const PROVIDERS = [+ { name: "Aiven", pattern: /\.aivencloud\.com$/ },+ { name: "Amazon RDS", pattern: /\.rds\.amazonaws\.com$/ },+ { name: "Azure", pattern: /\.postgres\.database\.azure\.com$/ },+ {+ name: "Crunchy Data",+ pattern: /\.db\.postgresbridge\.com$/,+ },+ { name: "DigitalOcean", pattern: /db\.ondigitalocean\.com$/ },+ { name: "Fly.io", pattern: /\.fly\.dev$/ },+ { name: "Neon", pattern: /\.neon\.tech$/ },+ { name: "PlanetScale", pattern: /\.psdb\.cloud$/ },+ { name: "Railway", pattern: /\.railway\.app$/ },+ { name: "Render", pattern: /\.render\.com$/ },+ { name: "Scaleway", pattern: /\.scw\.cloud$/ },+ { name: "Supabase", pattern: /pooler\.supabase\.com|\.supabase\.co$/ },+ { name: "Timescale", pattern: /\.tsdb\.cloud|\.timescale\.com$/ },+] as const;++export type DatabaseProviderName = (typeof providerNames)[number];++export const detectDBProvider = (host: string): DatabaseProviderName | null => {+ if (!host) {+ return null;+ }+ const provider = PROVIDERS.find(({ pattern }) => pattern.test(host));+ return provider?.name || null;+};diff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/database-providers.unit.spec.ts b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/database-providers.unit.spec.tsnew file mode 100644index 00000000000..0e5cd385256--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/database-providers.unit.spec.ts@@ -0,0 +1,95 @@+import {+ type DatabaseProviderName,+ detectDBProvider,+} from "./database-providers";++const testCases: { host: string; provider: DatabaseProviderName }[] = [+ {+ host: "production-flexible-server.postgres.database.azure.com",+ provider: "Azure",+ },+ {+ host: "my-db.rds.amazonaws.com",+ provider: "Amazon RDS",+ },+ {+ host: "my-db.aivencloud.com",+ provider: "Aiven",+ },+ {+ host: "p.vbjrfujv5beutaoelw725gvi3i.db.postgresbridge.com",+ provider: "Crunchy Data",+ },+ {+ host: "cluster-do-user-1234567-0.db.ondigitalocean.com",+ provider: "DigitalOcean",+ },+ {+ host: "my-db.fly.dev",+ provider: "Fly.io",+ },+ {+ host: "ep-autumn-frost-alwlmval-pooler.ap-southeast-1 .aws.neon.tech",+ provider: "Neon",+ },+ {+ host: "my-db.horizon.psdb.cloud",+ provider: "PlanetScale",+ },+ {+ host: "nodejs-copy-production-7aa4.up.railway.app",+ provider: "Railway",+ },+ {+ host: "your_host_name.your_region-postgres.render.com",+ provider: "Render",+ },+ {+ host: "my-db.region-1.scw.cloud",+ provider: "Scaleway",+ },+ {+ host: "db.apbkobhfnmcqqzqeeqss.supabase.co",+ provider: "Supabase",+ },+ {+ host: "my-db.pooler.supabase.com",+ provider: "Supabase",+ },+ {+ host: "service.project.tsdb.cloud.timescale.com",+ provider: "Timescale",+ },+];++describe("detectDBProvider", () => {+ describe("should detect providers correctly", () => {+ testCases.forEach(({ host, provider }) => {+ it(`should detect ${provider} from host: ${host}`, () => {+ expect(detectDBProvider(host)).toBe(provider);+ });+ });+ });++ describe("edge cases", () => {+ it("should return null for empty host", () => {+ expect(detectDBProvider("")).toBeNull();+ });++ it("should return null for unknown host", () => {+ expect(detectDBProvider("unknown-host.com")).toBeNull();+ });++ it("should return null for localhost", () => {+ expect(detectDBProvider("localhost")).toBeNull();+ });++ it("should return null for IP address", () => {+ expect(detectDBProvider("192.168.1.1")).toBeNull();+ });++ it("should not detect Amazon RDS from non-rds host", () => {+ expect(detectDBProvider("ec2.amazonaws.com")).toBeNull();+ });+ });+});diff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/aiven.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/aiven.svgnew file mode 100644index 00000000000..18f70040716--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/aiven.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="url(#a)" d="M11.636 9.94c.224 0 .448.053.648.13.323-.388.498-.829.498-1.27 0-.725-.474-1.425-1.32-1.969-.922-.57-2.167-.907-3.462-.907-1.32 0-2.54.311-3.462.907-.871.544-1.32 1.244-1.32 1.97 0 .44.175.88.498 1.27a1.92 1.92 0 0 1 .648-.13c.523 0 .996.207 1.37.596.249.259.423.596.523.933a7.71 7.71 0 0 0 1.768.207c.622 0 1.195-.078 1.768-.207.075-.363.25-.674.523-.933a1.771 1.771 0 0 1 1.32-.596ZM8 8.283c-.598 0-1.071-.492-1.071-1.114h2.142c0 .596-.473 1.114-1.071 1.114Z"/><path fill="url(#b)" d="M4.265 6.287c.1-.078.224-.13.324-.181a1.508 1.508 0 0 0-.897-.311c-.473 0-.921.207-1.22.622l-.124.155.846.674c.25-.337.623-.674 1.071-.959Z"/><path fill="url(#c)" d="M3.193 10.355c-.273-.388-.473-.803-.522-1.243-.025-.104-.025-.208-.025-.311 0-.519.149-1.011.473-1.452h-.1c-.847 0-1.519.7-1.519 1.581v.233h1.12a1.59 1.59 0 0 0-.522 1.011c-.05.415.05.83.299 1.166l.1.104c.099-.337.248-.648.497-.907.05-.052.125-.13.2-.182Z"/><path fill="url(#d)" d="m12.807 7.272.846-.674-.124-.181a1.478 1.478 0 0 0-1.22-.622c-.324 0-.648.103-.897.31.1.053.224.13.324.182.448.285.797.622 1.07.985Z"/><path fill="url(#e)" d="M14.475 8.93c0-.88-.672-1.58-1.519-1.58h-.1c.3.44.474.932.474 1.45 0 .104 0 .208-.025.312-.05.44-.224.855-.523 1.243.075.052.15.13.224.182.249.259.423.57.498.907l.1-.13c.249-.337.348-.751.298-1.166a1.717 1.717 0 0 0-.523-1.01H14.5l-.025-.208Z"/><path fill="url(#f)" d="M6.158 5.561c.847 0 1.519-.7 1.519-1.58 0-.881-.672-1.581-1.52-1.581-.846 0-1.518.7-1.518 1.58 0 .882.697 1.581 1.519 1.581Zm0-2.435c.025 0 .025 0 0 0a.638.638 0 0 0-.174.44c0 .337.273.622.597.622.15 0 .3-.078.424-.181 0 .492-.374.88-.847.88s-.847-.388-.847-.88c.025-.519.399-.881.847-.881Z"/><path fill="url(#g)" d="M9.818 5.561c.847 0 1.52-.7 1.52-1.58 0-.881-.698-1.581-1.52-1.581-.847 0-1.52.7-1.52 1.58 0 .882.673 1.581 1.52 1.581Zm0-2.435a.638.638 0 0 0-.174.44c0 .337.274.622.597.622.15 0 .3-.078.424-.181 0 .492-.374.88-.847.88a.897.897 0 0 1-.847-.906c0-.493.374-.855.847-.855Z"/><path fill="url(#h)" d="M4.339 10.382c-.847 0-1.52.7-1.52 1.58 0 .881.673 1.58 1.52 1.58.174 0 .349-.025.498-.103l-.05-.052c-.448-.466-.597-1.036-.323-1.321.273-.285.821-.104 1.27.337l.05.052c.05-.156.1-.337.1-.519-.026-.829-.698-1.554-1.545-1.554Z"/><path fill="url(#i)" d="M11.636 10.382c-.846 0-1.519.7-1.519 1.58 0 .182.025.363.1.518l.05-.051c.448-.467.996-.622 1.27-.337s.1.855-.324 1.321l-.05.052c.15.052.324.104.498.104.847 0 1.52-.7 1.52-1.58-.025-.882-.723-1.607-1.545-1.607Z"/><defs><linearGradient id="a" x1="5.285" x2="11.462" y1="12.61" y2="4.585" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient><linearGradient id="b" x1="1.228" x2="7.405" y1="9.487" y2="1.461" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient><linearGradient id="c" x1="1.93" x2="8.107" y1="10.028" y2="2.003" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient><linearGradient id="d" x1="7.088" x2="13.265" y1="13.998" y2="5.972" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient><linearGradient id="e" x1="8.918" x2="15.096" y1="15.407" y2="7.382" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient><linearGradient id="f" x1="1.887" x2="8.064" y1="9.994" y2="1.969" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient><linearGradient id="g" x1="4.247" x2="10.424" y1="11.811" y2="3.786" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient><linearGradient id="h" x1="4.355" x2="10.533" y1="11.895" y2="3.87" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient><linearGradient id="i" x1="9.092" x2="15.269" y1="15.54" y2="7.515" gradientUnits="userSpaceOnUse"><stop stop-color="#F70"/><stop offset=".742" stop-color="#FF3554"/></linearGradient></defs></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/amazon-rds.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/amazon-rds.svgnew file mode 100644index 00000000000..e98105afc93--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/amazon-rds.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#1A476F" d="m2.43 11.627 1.304 1.583.118-.145V2.942l-.118-.153L2.43 4.37v7.256Z"/><path fill="#1F5B98" d="m3.734 13.21 2.492 1.29.104-.173.001-12.692-.103-.135-2.494 1.286V13.21Z"/><path fill="#2D72B8" d="M13.57 4.371 12.267 2.79l-.146.048.03 10.243.116.13 1.305-1.583V4.371Z"/><path fill="#5294CF" d="m9.773 14.5 2.492-1.29V2.786L9.771 1.5l-.118.165.002 12.647.118.188Z"/><path fill="#2D72B8" d="M6.228 1.5h3.543v13H6.228v-13Z"/></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/azure.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/azure.svgnew file mode 100644index 00000000000..ba1a9230caa--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/azure.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#0072C6" fill-rule="evenodd" d="M3.08 3.334v9.331c0 .97 2.156 1.755 4.815 1.755V3.334H3.08Z" clip-rule="evenodd"/><path fill="#0072C6" fill-rule="evenodd" d="M7.83 14.42h.065c2.66 0 4.815-.786 4.815-1.755v-9.33H7.83V14.42Z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M7.83 14.42h.065c2.66 0 4.815-.786 4.815-1.755v-9.33H7.83V14.42Z" clip-rule="evenodd" opacity=".15"/><path fill="#fff" fill-rule="evenodd" d="M12.71 3.334c0 .969-2.156 1.754-4.815 1.754-2.66 0-4.815-.785-4.815-1.754S5.236 1.58 7.895 1.58c2.659 0 4.815.785 4.815 1.754Z" clip-rule="evenodd"/><path fill="#7FBA00" fill-rule="evenodd" d="M11.726 3.233c0 .64-1.715 1.157-3.83 1.157-2.116 0-3.832-.517-3.832-1.157S5.78 2.076 7.895 2.076c2.116 0 3.83.518 3.83 1.157Z" clip-rule="evenodd"/><path fill="#B8D432" fill-rule="evenodd" d="M10.923 3.94c.501-.195.803-.44.803-.706 0-.64-1.715-1.158-3.831-1.158-2.116 0-3.83.518-3.83 1.158 0 .266.3.511.802.707.7-.274 1.795-.45 3.028-.45s2.327.176 3.028.45Z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="M6.366 9.811c0 .29-.105.515-.314.674-.21.16-.498.239-.866.239-.314 0-.576-.057-.787-.17V9.87c.243.207.51.311.803.311.142 0 .25-.028.328-.085a.267.267 0 0 0 .115-.226.317.317 0 0 0-.11-.24c-.075-.07-.226-.157-.453-.265-.464-.219-.695-.518-.695-.895 0-.274.1-.494.303-.66.202-.166.47-.248.805-.248.297 0 .542.04.738.117v.637a1.197 1.197 0 0 0-.7-.213.516.516 0 0 0-.311.084.265.265 0 0 0-.114.225c0 .097.03.176.092.238s.187.138.378.229c.284.135.486.272.607.411.121.14.18.313.18.52Zm3.269-.69c0 .36-.081.672-.244.936-.162.264-.391.45-.686.556l.881.82h-.89l-.629-.71a1.469 1.469 0 0 1-.73-.215 1.345 1.345 0 0 1-.502-.548 1.694 1.694 0 0 1-.177-.777c0-.317.064-.6.191-.848.128-.248.308-.438.54-.572.231-.133.497-.2.796-.2.28 0 .53.064.752.194.22.13.392.313.514.552.123.239.184.51.184.812Zm-.72.038c0-.31-.067-.554-.202-.734a.65.65 0 0 0-.55-.27.69.69 0 0 0-.57.27c-.144.18-.215.421-.215.721 0 .299.07.537.21.715.14.178.325.268.557.268a.682.682 0 0 0 .562-.26c.138-.172.208-.408.208-.71Zm3.032 1.511h-1.81V7.614h.685v2.498h1.125v.558Z" clip-rule="evenodd"/></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/crunchy-data.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/crunchy-data.svgnew file mode 100644index 00000000000..81ae8b1df35--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/crunchy-data.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#060606" d="M8.332 13.997c-2.826-.017-5.31-1.846-6.085-4.469-.95-3.236.92-6.507 4.215-7.312 2.483-.608 4.625.075 6.316 1.957 1.957 2.182 2.05 5.24.382 7.445-1.013 1.337-2.368 2.107-4.03 2.322-.202.029-.41.04-.613.057-.064.006-.122 0-.185 0ZM7.88 2.303c-.168 0-.342-.006-.51 0-.057 0-.162.017-.121.104.075.145.156.295.278.4.093.075.237 0 .353-.035l.834-.093h1.18c-.387-.203-.804-.272-1.22-.301-.267.017-.522-.116-.794-.075Zm-2.796.781c-.672.342-1.204.857-1.65 1.448-.753.995-1.112 2.148-1.089 3.398a5.492 5.492 0 0 0 1.13 3.283c.196.26.399.52.665.73.046-.07.029-.134.029-.186-.029-.336.087-.625.284-.886.075-.093.144-.185.225-.278.093-.11.105-.162-.063-.214-.672-.214-1.21-.614-1.552-1.25A.115.115 0 0 0 3 9.065c-.307-.133-.383-.388-.354-.695.058-.596.238-1.158.394-1.731a.543.543 0 0 1 .203-.29.949.949 0 0 0 .335-.48c.093-.266.278-.388.562-.388.139 0 .278-.006.417 0 .22.006.417-.035.573-.208.139-.018.197-.145.301-.209.295-.168.417-.422.423-.764.006-.318.133-.585.451-.735.174-.087.33-.197.475-.324.104-.093.168-.197.15-.348a.71.71 0 0 1 .099-.498c-.73.105-1.366.319-1.945.69Zm2.547 3.7c.33.006.573.15.793.341.406.348.51 1.309-.087 1.633-.532.29-1.082.469-1.696.417-.284-.023-.567-.052-.85-.081-.701-.07-1.396-.197-2.103-.093-.162.023-.208.064-.098.197.434.538.99.84 1.696.799.695-.035 1.39-.139 2.085-.012.787.145 1.395-.098 1.823-.781.052-.087.122-.174.238-.104.115.069.075.162.011.254-.365.573-.81 1.02-1.557 1.002-.116 0-.238.023-.36.035-.11.011-.208.046-.271.144-.14.209-.295.411-.388.649l-.73 1.876c-.052.133-.029.214.122.266a6.28 6.28 0 0 0 2.015.353 5.712 5.712 0 0 0 3.531-1.164c.064-.046.099-.092.07-.162-.174-.451-.052-.886.07-1.326.098-.358.167-.723.104-1.1-.064-.376-.058-.376-.365-.179-.26.174-.556.278-.845.388-.11.04-.267.058-.307-.04-.058-.14.121-.14.202-.18.238-.116.51-.174.718-.342.544-.44.805-1.042.898-1.72.046-.306.057-.619.086-.931.006-.058.012-.122.099-.122.087 0 .08.07.087.128.005.046-.006.092 0 .138.023.73-.133 1.442-.25 2.154-.115.747-.034 1.482.128 2.212.023.092.058.202.133.226.104.034.145-.093.197-.163a5.441 5.441 0 0 0 1.025-2.263c.133-.643.116-1.257-.22-1.853-.238-.423-.446-.857-.678-1.285-.474-.886-1.152-1.621-1.783-2.385-.19-.232-.405-.458-.683-.603-.04-.017-.081-.063-.127-.04-.064.035-.023.098-.018.145.087.347-.225.74-.561.862-.075.03-.168.064-.214-.023-.047-.087.057-.116.11-.162.225-.197.353-.521.295-.77-.168.081-.307.18-.388.347-.035.076-.087.215-.18.163-.11-.064-.052-.192.012-.284a.669.669 0 0 1 .208-.214c.087-.058.197-.064.284-.157a.578.578 0 0 0-.312-.07c-.626.007-1.251-.005-1.87.122-.197.035-.394.081-.55.22-.22.203-.47.377-.73.51-.11.058-.22.121-.18.272.035.139.151.208.29.226.058.006.133-.012.15.07.018.069-.057.098-.098.132-.41.301-.799.62-1.187.95-.249.214-.573.33-.897.318-.133-.005-.266 0-.4 0-.312 0-.382.093-.295.394.03.11.04.226-.058.313-.098.086-.202.08-.307-.006-.052-.04-.092-.023-.133.029-.092.11-.075.197.07.231.255.07.446-.063.625-.225.035-.035.081-.093.133-.053.058.041.023.099-.006.145-.11.214-.544.446-.787.417-.064-.006-.098 0-.116.07-.104.416-.237.827-.272 1.262-.035.44.07.526.504.428.718-.168 1.424-.214 2.142.012.388.121.799.133 1.21.086.475-.052.95-.133 1.343-.434a.633.633 0 0 0 .266-.469c.03-.283-.104-.486-.295-.665-.162-.163-.33-.307-.52-.475Zm-1.453 3.439v.005a2.24 2.24 0 0 0-.197-.011c-.307-.006-.62-.029-.857.226-.29.312-.515.66-.59 1.082-.128.666-.035.851.55 1.193l.185.11c.475.272.475.272.643-.237.08-.238.023-.406-.191-.545-.053-.034-.105-.052-.157-.08-.052-.03-.092-.064-.087-.122a.136.136 0 0 1 .105-.11c.185-.023.37-.087.55-.018.092.035.133.006.168-.07.19-.422.387-.839.584-1.261.04-.087.018-.116-.075-.122-.208-.011-.417-.029-.631-.04Zm5.014-6.896a14.465 14.465 0 0 1 2.5 3.463c.064-.927-1.586-3.214-2.5-3.463Z"/><path fill="#fff" d="M7.631 6.784c.191.168.359.312.527.469.19.18.318.382.295.665a.625.625 0 0 1-.266.47c-.4.3-.869.387-1.343.434-.406.04-.822.034-1.21-.087-.718-.226-1.43-.18-2.142-.012-.44.104-.539.018-.504-.428.035-.434.168-.845.272-1.262.017-.07.052-.076.116-.07.243.03.671-.197.787-.417.023-.046.058-.104.006-.144-.052-.04-.099.017-.133.052-.174.162-.365.295-.626.226-.144-.035-.162-.122-.069-.232.04-.052.081-.07.133-.029.104.081.209.093.307.006s.093-.203.058-.313c-.081-.3-.017-.393.295-.393.133 0 .266-.006.4 0 .33.011.654-.099.897-.319.382-.33.776-.648 1.17-.961.046-.035.115-.064.098-.133-.017-.075-.093-.058-.15-.07-.14-.017-.25-.086-.29-.225-.04-.15.07-.215.18-.272a3.58 3.58 0 0 0 .729-.51c.156-.139.353-.18.55-.22.614-.122 1.245-.11 1.87-.122a.59.59 0 0 1 .312.07c-.086.087-.196.098-.283.156a.816.816 0 0 0-.209.214c-.058.093-.121.22-.011.284.092.052.144-.087.18-.162.08-.174.225-.272.387-.347.058.249-.07.573-.295.77-.052.046-.156.075-.11.162.046.087.139.046.214.023.336-.116.649-.51.562-.863-.012-.046-.053-.11.017-.144.046-.024.087.023.127.04.278.145.487.37.684.602.63.77 1.308 1.505 1.783 2.385.231.429.44.863.677 1.286.336.596.353 1.21.22 1.852a5.441 5.441 0 0 1-1.025 2.264c-.052.07-.092.197-.197.162-.075-.023-.115-.133-.133-.226-.162-.73-.243-1.464-.127-2.211.11-.712.272-1.424.249-2.154 0-.046.006-.093 0-.139-.006-.058 0-.127-.087-.127s-.093.063-.098.121c-.03.313-.04.626-.087.932-.099.678-.353 1.28-.898 1.72-.208.168-.48.22-.717.341-.087.041-.261.041-.203.18.04.104.203.081.307.04.29-.11.585-.214.845-.387.307-.203.301-.203.365.18.063.381 0 .74-.105 1.1-.121.44-.243.873-.069 1.325.029.075-.006.116-.07.162a5.685 5.685 0 0 1-3.525 1.164 6.149 6.149 0 0 1-2.015-.354c-.15-.052-.174-.127-.121-.266.243-.625.48-1.25.729-1.876.093-.237.249-.44.388-.648.064-.093.162-.133.272-.145.122-.011.237-.034.359-.034.747.017 1.193-.429 1.557-1.002.058-.093.099-.185-.011-.255s-.186.018-.238.104c-.428.684-1.042.927-1.823.782-.695-.127-1.39-.023-2.085.012-.7.034-1.256-.267-1.696-.8-.11-.133-.064-.173.099-.196.706-.11 1.406.023 2.101.092.284.03.568.052.851.081.614.058 1.164-.127 1.697-.416.596-.325.492-1.286.086-1.633-.214-.174-.457-.324-.787-.324Zm.845-2.45c-.278-.005-.637.175-.805.389-.04.052-.057.11-.023.162.035.064.093.029.14 0 .069-.052.086.017.12.046.232.209.533.15.66-.121.047-.099.018-.232.175-.278.04-.012.023-.093-.035-.122a.52.52 0 0 0-.232-.075Zm-3.04 2.982c.174-.029.33-.08.43-.231.046-.07.046-.133-.007-.197-.057-.064-.104-.058-.173-.023a1.141 1.141 0 0 1-.296.11c-.254.029-.515.07-.706-.174-.04-.052-.075-.15-.162-.098-.081.052.006.133.017.197.006.04.053.075.081.11.209.26.539.231.817.306Zm-.312-1.14c-.127.017-.26.023-.278.19-.011.128.203.424.307.43.11.005.237-.151.232-.302-.006-.18-.116-.312-.26-.318Z"/><path fill="#fff" d="M6.178 10.217c.214.017.423.035.637.046.093.006.116.035.075.122-.197.422-.393.84-.584 1.262-.035.075-.076.104-.168.07-.18-.064-.365-.006-.55.017a.13.13 0 0 0-.105.11c-.011.058.035.098.087.121.047.03.11.047.157.081.214.14.272.307.19.545-.173.509-.173.509-.642.231l-.185-.11c-.585-.347-.678-.532-.55-1.192.08-.423.307-.776.59-1.083.232-.255.55-.232.857-.226.058 0 .127.006.191.006Z"/><path fill="#0F64F8" d="M7.017 2.39a.717.717 0 0 0-.098.497c.017.151-.04.255-.15.348a2.185 2.185 0 0 1-.47.324c-.318.15-.44.423-.451.735-.006.342-.128.597-.423.765-.11.057-.168.19-.3.208-.157.168-.354.214-.574.208-.139-.005-.278 0-.417 0-.284 0-.469.128-.561.388a1 1 0 0 1-.336.48.543.543 0 0 0-.203.29c-.15.573-.336 1.14-.394 1.731-.028.307.047.562.354.695a.115.115 0 0 1 .063.064c.336.637.875 1.036 1.552 1.25.168.052.156.104.064.215l-.226.277c-.203.26-.313.55-.284.886.006.058.017.116-.029.185-.266-.214-.469-.474-.666-.735A5.57 5.57 0 0 1 2.34 7.92c-.023-1.24.336-2.392 1.095-3.387.445-.59.978-1.106 1.65-1.448.579-.37 1.215-.584 1.933-.694Zm4.174.937a14.465 14.465 0 0 1 2.502 3.463c.063-.927-1.587-3.214-2.502-3.463ZM7.88 2.303c-.168 0-.342-.006-.51 0-.057 0-.162.017-.121.104.075.145.156.295.278.4.092.075.237 0 .353-.035l.834-.093h1.18c-.387-.203-.804-.272-1.22-.301-.267.017-.522-.116-.794-.075Z"/><path fill="#060606" d="M8.476 4.335a.515.515 0 0 1 .226.07c.064.034.075.11.035.12-.15.041-.128.18-.174.279-.127.272-.428.33-.66.121-.035-.029-.052-.098-.122-.046-.04.029-.098.07-.139 0-.034-.052-.017-.11.024-.162.173-.208.532-.382.81-.382Zm-3.04 2.981c-.277-.08-.607-.052-.821-.312-.03-.035-.076-.07-.081-.11-.012-.064-.099-.145-.018-.197.087-.052.122.052.162.098.191.244.452.203.707.174.104-.012.202-.064.295-.11.07-.035.121-.04.174.023a.15.15 0 0 1 .005.197c-.092.156-.249.208-.422.237Z"/><path fill="#060606" d="M5.124 6.176c.145 0 .255.139.26.318 0 .145-.121.307-.231.301-.104-.005-.318-.3-.307-.428.018-.168.15-.174.278-.191Z"/></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/digitalocean.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/digitalocean.svgnew file mode 100644index 00000000000..db4bada299b--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/digitalocean.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><g clip-path="url(#a)"><mask id="b" width="167" height="217" x="-31" y="-21" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M-30.771-20.602h166.764v215.82H-30.771v-215.82Z"/></mask><g fill="#0069FF" mask="url(#b)"><path d="M8 14v-2.323c2.466 0 4.373-2.441 3.431-5.034a3.48 3.48 0 0 0-2.075-2.075C6.764 3.628 4.324 5.534 4.324 8V8H2c0-3.929 3.796-6.988 7.912-5.702a5.8 5.8 0 0 1 3.79 3.79C14.988 10.205 11.928 14 8 14Z"/><path fill-rule="evenodd" d="M8.006 11.682H5.689V9.366h2.316v2.316ZM5.688 13.462h-1.78v-1.78h1.78v1.78ZM3.91 11.682H2.416v-1.493H3.91v1.493Z" clip-rule="evenodd"/></g></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/fly-io.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/fly-io.svgnew file mode 100644index 00000000000..f402c4c5e95--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/fly-io.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="url(#a)" fill-rule="evenodd" d="M10.391 4.081h1.382c1.23 0 2.227.998 2.227 2.227v4.859a2.228 2.228 0 0 1-2.227 2.226h-.109c-.632-.098-.907-.288-1.119-.448L8.79 11.5a.249.249 0 0 0-.311 0l-.571.47-1.608-1.322a.247.247 0 0 0-.31 0l-2.234 1.964c-.449.366-.746.298-.94.277A2.223 2.223 0 0 1 2 11.167V6.308c0-1.229.998-2.227 2.227-2.227h1.379l-.003.006-.046.135-.015.047-.062.277-.009.049-.027.278-.004.076v.027l.002.127.006.075.016.117.02.105.023.097.03.105.08.222.025.067.138.29.048.09.159.272.06.098.223.327.032.043.288.376.093.115.33.385.067.075.272.292.108.111.177.177-.035.03-.023.02a2.183 2.183 0 0 0-.244.272 1.233 1.233 0 0 0-.134.242.801.801 0 0 0-.051.235l-.001.07a.824.824 0 0 0 .217.534.809.809 0 0 0 .334.215c.127.043.26.058.394.045a.887.887 0 0 0 .449-.177.793.793 0 0 0 .25-.332.826.826 0 0 0 .059-.322l-.003-.057a.811.811 0 0 0-.096-.312 1.238 1.238 0 0 0-.15-.22 2.122 2.122 0 0 0-.19-.201l-.049-.041.082-.08.35-.366.12-.133.189-.211.122-.143.175-.213.118-.148.173-.232.088-.12.124-.186.103-.158.195-.34.112-.223.003-.006.085-.207a.078.078 0 0 0 .003-.008l.092-.287.01-.042.04-.228.008-.062.002-.038.003-.143-.001-.026-.007-.128-.01-.1-.045-.286a.11.11 0 0 0-.002-.012l-.058-.212-.02-.059-.027-.065Zm.657 6.06a.538.538 0 0 0-.527.527c.004.288.24.523.527.527a.538.538 0 0 0 .528-.527.538.538 0 0 0-.528-.528Z" clip-rule="evenodd"/><path fill="#24175B" fill-rule="evenodd" d="M6.81 13.393H4.228a2.217 2.217 0 0 1-1.411-.504c.193.021.49.089.94-.277l2.233-1.964a.247.247 0 0 1 .31 0l1.608 1.322.57-.47a.249.249 0 0 1 .312 0l1.756 1.445c.212.16.487.35 1.12.448h-1.17a.496.496 0 0 1-.286-.095l-.02-.016-1.547-1.284-1.526 1.284a.489.489 0 0 1-.305.111Zm4.238-3.253a.538.538 0 0 0-.527.528c.004.288.24.523.527.527a.538.538 0 0 0 .528-.527.538.538 0 0 0-.528-.528Zm-3.41-1.598-.178-.177-.108-.111-.272-.293-.067-.074-.33-.385-.093-.115-.288-.376-.032-.043-.222-.327-.06-.098-.16-.273-.048-.089-.138-.29-.026-.067-.079-.222-.03-.105-.023-.097-.02-.105-.016-.117-.006-.075-.003-.127.001-.027.004-.076.027-.278.009-.049.062-.277.015-.047.046-.135.015-.035.074-.163.051-.097.072-.118.071-.104.05-.067.06-.07.064-.071.055-.056.134-.118.098-.08.007-.006.116-.078.093-.059.175-.092.008-.004.248-.103.023-.009.221-.065.093-.02.126-.026.084-.012.128-.016.087-.008.174-.01h.068l.129.003.033.002.187.015.246.035.029.006.244.06.071.022.08.027.097.037.076.032.113.053.07.037.128.075.048.029.173.127.05.043.121.11.006.006.103.11.036.04.12.16.025.039.095.162.03.055.053.12.056.141.02.06.059.211a.074.074 0 0 1 .002.012l.046.286.009.1.007.128v.026l-.002.143-.002.038-.008.062-.04.228-.01.042-.092.287a.078.078 0 0 1-.003.008l-.085.207-.003.006-.112.223-.195.34-.103.158-.124.186-.088.12-.173.232-.118.148-.175.213-.122.143-.188.211-.121.133-.35.366-.082.08.048.041a2.138 2.138 0 0 1 .243.266 1.238 1.238 0 0 1 .14.246c.028.07.047.145.054.22l.003.058a.828.828 0 0 1-.06.322.793.793 0 0 1-.373.412.933.933 0 0 1-.719.052.85.85 0 0 1-.334-.215.795.795 0 0 1-.217-.534v-.07a.801.801 0 0 1 .09-.321 1.21 1.21 0 0 1 .17-.25c.053-.062.11-.122.17-.179l.023-.02.035-.03Z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="m8.642 11.998 1.546 1.284a.497.497 0 0 0 .313.111H6.806c.113 0 .223-.039.31-.11l1.526-1.285Zm-.634-3.03.014.004.012.009.012.01a1.687 1.687 0 0 1 .14.146.908.908 0 0 1 .086.126.363.363 0 0 1 .017.037.24.24 0 0 1 .017.069v.044a.252.252 0 0 1-.12.196.34.34 0 0 1-.145.048l-.054.002-.046-.005a.352.352 0 0 1-.124-.043l-.035-.026a.246.246 0 0 1-.087-.168v-.042c0-.012.001-.023.004-.034a.355.355 0 0 1 .027-.071.657.657 0 0 1 .05-.082 1.273 1.273 0 0 1 .173-.191l.018-.016c.012-.009.012-.009.026-.013h.015ZM7.918 3.1h.005v4.92l-.012-.022a13.8 13.8 0 0 1-.452-.916 9.83 9.83 0 0 1-.307-.768 6.055 6.055 0 0 1-.185-.633 3.374 3.374 0 0 1-.08-.517 4.168 4.168 0 0 1 .035-.722 3.082 3.082 0 0 1 .094-.42 2.183 2.183 0 0 1 .144-.347c.095-.176.224-.338.392-.447a.821.821 0 0 1 .365-.128Zm.638.012.33.095c.155.056.301.13.437.222a1.75 1.75 0 0 1 .651.819 2.051 2.051 0 0 1 .135.72 1.377 1.377 0 0 1-.063.455 2.45 2.45 0 0 1-.085.246c-.041.1-.087.199-.137.295-.11.213-.237.417-.373.614a9.585 9.585 0 0 1-.538.702c-.207.246-.422.485-.646.716.152-.285.294-.575.425-.87.073-.164.142-.33.207-.498a7.78 7.78 0 0 0 .192-.56c.043-.141.08-.284.111-.429a3.54 3.54 0 0 0 .06-.376c.01-.105.015-.21.012-.316a4.505 4.505 0 0 0-.007-.194 3.315 3.315 0 0 0-.13-.767 2.228 2.228 0 0 0-.105-.277 1.478 1.478 0 0 0-.415-.552l-.061-.045Z" clip-rule="evenodd"/><path fill="url(#b)" fill-rule="evenodd" d="M10.39 4.081h1.382c1.23 0 2.227.998 2.227 2.227v4.858a2.228 2.228 0 0 1-2.227 2.226h-.109c-.632-.098-.907-.288-1.119-.448l-1.756-1.445a.248.248 0 0 0-.311 0l-.57.47-1.608-1.322a.248.248 0 0 0-.31 0L3.754 12.61c-.45.366-.746.298-.94.277A2.223 2.223 0 0 1 2 11.166V6.308c0-1.23.998-2.227 2.227-2.227h1.378l-.002.006-.047.135-.014.047-.063.277-.008.049-.028.278-.003.076v.027l.002.127.006.075.015.117.02.105.024.097.03.105.079.222.026.067.137.29.049.089.159.273.06.098.222.326.032.044.289.375.093.116.33.385.067.074.271.292.108.111.178.177-.036.03-.022.02a2.163 2.163 0 0 0-.245.273 1.21 1.21 0 0 0-.133.242.798.798 0 0 0-.052.234v.07a.806.806 0 0 0 .552.75c.125.042.26.057.392.044a.888.888 0 0 0 .45-.177.796.796 0 0 0 .249-.332.83.83 0 0 0 .06-.321l-.004-.058a.809.809 0 0 0-.095-.311 1.238 1.238 0 0 0-.15-.221 2.14 2.14 0 0 0-.191-.2l-.048-.042.081-.08.35-.365.12-.133.189-.212.122-.143.175-.212.118-.149.173-.232.088-.12.124-.185.104-.159.195-.34.111-.222.003-.007.086-.206a.06.06 0 0 0 .002-.009l.093-.286.01-.042.039-.228.008-.062.002-.038.003-.143v-.027l-.008-.128-.01-.1-.044-.286-.003-.011-.058-.212-.02-.059-.027-.065Zm.657 6.058a.537.537 0 0 0-.527.528.538.538 0 0 0 .527.527.538.538 0 0 0 .528-.527.538.538 0 0 0-.528-.528Z" clip-rule="evenodd"/><path fill="#24175B" fill-rule="evenodd" d="m7.209 13.203-.093.078a.488.488 0 0 1-.306.111H4.226a2.219 2.219 0 0 1-1.41-.504c.192.021.49.089.939-.277l2.233-1.964a.248.248 0 0 1 .31 0l1.608 1.322.57-.47a.249.249 0 0 1 .312 0l1.756 1.445c.212.16.486.35 1.119.448h-1.169a.497.497 0 0 1-.287-.095l-.02-.016-.087-.072a.169.169 0 0 0-.023-.023l-1.342-1.114a.147.147 0 0 0-.188 0s.003.005-1.32 1.114a.166.166 0 0 0-.018.017Zm3.838-3.064a.537.537 0 0 0-.528.528.538.538 0 0 0 .528.527.538.538 0 0 0 .528-.527.538.538 0 0 0-.528-.528Zm-3.41-1.598-.178-.177-.108-.11-.271-.293-.068-.074-.33-.385-.093-.116-.288-.375-.032-.044-.222-.326-.06-.098-.16-.273-.048-.09-.137-.29-.026-.066-.08-.222-.03-.105-.023-.097-.02-.105-.015-.117-.007-.075-.002-.127v-.027l.004-.076.027-.278.009-.049.063-.278.014-.046.046-.135.015-.035.074-.163.052-.097.071-.118.071-.104.051-.067.059-.07.064-.071.055-.056.134-.118.098-.08a.101.101 0 0 1 .007-.006l.116-.078.093-.059.175-.092.008-.004.248-.103.023-.009.221-.065.093-.02.126-.026.084-.012.128-.016.087-.008.174-.01h.068l.129.003.033.002.187.015.246.035.029.006.244.06.071.022.08.027.097.037.076.032.113.053.07.037.128.075.048.029.173.127.05.043.121.11.006.006.103.11.035.04.12.16.025.039.096.162.029.055.054.12.056.141.02.059.059.212a.093.093 0 0 1 .002.011l.045.287.01.1.007.127v.027l-.002.143-.003.038-.007.062-.04.228-.01.042-.092.286a.077.077 0 0 1-.003.009l-.085.206-.003.007-.112.223-.195.34-.103.158-.124.185-.088.12-.173.232-.119.149-.174.212-.122.143-.188.212-.121.133-.35.365-.082.08.048.041a2.142 2.142 0 0 1 .243.267 1.237 1.237 0 0 1 .14.245c.028.07.047.146.054.221l.003.058a.829.829 0 0 1-.06.321.795.795 0 0 1-.373.412.935.935 0 0 1-.719.052.856.856 0 0 1-.334-.215.796.796 0 0 1-.217-.534v-.07a.798.798 0 0 1 .09-.32 1.225 1.225 0 0 1 .17-.25c.053-.063.11-.123.17-.18l.023-.02.035-.029Z" clip-rule="evenodd"/><path fill="#fff" fill-rule="evenodd" d="m7.116 13.281 1.432-1.208a.146.146 0 0 1 .187 0l1.453 1.208a.496.496 0 0 0 .312.111H6.805a.49.49 0 0 0 .311-.11Zm.891-4.313.014.004.013.008.011.01a1.632 1.632 0 0 1 .14.146.879.879 0 0 1 .086.127.362.362 0 0 1 .017.036.238.238 0 0 1 .018.069v.044a.252.252 0 0 1-.12.196.343.343 0 0 1-.145.048l-.055.002-.046-.004a.35.35 0 0 1-.123-.044l-.036-.026a.247.247 0 0 1-.086-.168l-.002-.042a.238.238 0 0 1 .032-.105.645.645 0 0 1 .05-.082c.052-.068.11-.133.173-.191l.018-.016c.012-.008.012-.008.026-.012h.015ZM7.917 3.1h.005v4.92l-.012-.023c-.162-.3-.313-.605-.452-.916a9.8 9.8 0 0 1-.307-.768 6.055 6.055 0 0 1-.184-.632 3.371 3.371 0 0 1-.081-.517 4.169 4.169 0 0 1 .035-.722 3.065 3.065 0 0 1 .094-.42 2.163 2.163 0 0 1 .144-.347c.095-.176.224-.338.393-.447a.82.82 0 0 1 .365-.128Zm.638.012.33.095c.155.056.301.13.437.222a1.749 1.749 0 0 1 .652.819 2.056 2.056 0 0 1 .134.72 1.323 1.323 0 0 1-.062.455 2.541 2.541 0 0 1-.086.246c-.041.1-.087.198-.136.294-.11.213-.238.417-.374.614a9.547 9.547 0 0 1-.538.703c-.206.246-.422.485-.646.715.152-.284.294-.574.425-.87.073-.163.142-.33.207-.497.071-.184.135-.371.193-.56.042-.141.08-.285.11-.43a3.53 3.53 0 0 0 .06-.375c.011-.105.015-.21.012-.316a4.516 4.516 0 0 0-.007-.194 3.315 3.315 0 0 0-.13-.767 2.255 2.255 0 0 0-.105-.277 1.48 1.48 0 0 0-.415-.552l-.061-.045Z" clip-rule="evenodd"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(8.69295 0 0 8.69294 8.372 8.697)" gradientUnits="userSpaceOnUse"><stop stop-color="#BA7BF0"/><stop offset=".45" stop-color="#996BEC"/><stop offset="1" stop-color="#5046E4"/></radialGradient><radialGradient id="b" cx="0" cy="0" r="1" gradientTransform="translate(8.37 8.696) scale(8.69206)" gradientUnits="userSpaceOnUse"><stop stop-color="#BA7BF0"/><stop offset=".45" stop-color="#996BEC"/><stop offset="1" stop-color="#5046E4"/></radialGradient></defs></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/neon.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/neon.svgnew file mode 100644index 00000000000..196ff889947--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/neon.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#32C0ED" fill-rule="evenodd" d="M1.92 4.069C1.92 2.926 2.858 2 4.016 2h7.966c1.158 0 2.097.926 2.097 2.069v6.687c0 1.182-1.516 1.695-2.251.761L9.53 8.6v3.538C9.53 13.166 8.685 14 7.643 14H4.016c-1.158 0-2.096-.926-2.096-2.069V4.069Zm2.096-.414a.417.417 0 0 0-.419.414v7.862c0 .229.188.414.42.414h3.689c.116 0 .146-.093.146-.207V7.393c0-1.182 1.516-1.695 2.251-.762l2.299 2.918V4.07c0-.229.021-.414-.21-.414H4.016Z" clip-rule="evenodd"/><path fill="url(#a)" fill-rule="evenodd" d="M1.92 4.069C1.92 2.926 2.858 2 4.016 2h7.966c1.158 0 2.097.926 2.097 2.069v6.687c0 1.182-1.516 1.695-2.251.761L9.53 8.6v3.538C9.53 13.166 8.685 14 7.643 14H4.016c-1.158 0-2.096-.926-2.096-2.069V4.069Zm2.096-.414a.417.417 0 0 0-.419.414v7.862c0 .229.188.414.42.414h3.689c.116 0 .146-.093.146-.207V7.393c0-1.182 1.516-1.695 2.251-.762l2.299 2.918V4.07c0-.229.021-.414-.21-.414H4.016Z" clip-rule="evenodd"/><path fill="url(#b)" fill-opacity=".35" fill-rule="evenodd" d="M1.92 4.069C1.92 2.926 2.858 2 4.016 2h7.966c1.158 0 2.097.926 2.097 2.069v6.687c0 1.182-1.516 1.695-2.251.761L9.53 8.6v3.538C9.53 13.166 8.685 14 7.643 14H4.016c-1.158 0-2.096-.926-2.096-2.069V4.069Zm2.096-.414a.417.417 0 0 0-.419.414v7.862c0 .229.188.414.42.414h3.689c.116 0 .146-.093.146-.207V7.393c0-1.182 1.516-1.695 2.251-.762l2.299 2.918V4.07c0-.229.021-.414-.21-.414H4.016Z" clip-rule="evenodd"/><path fill="#63F655" d="M11.982 2c1.158 0 2.097.926 2.097 2.069v6.687c0 1.182-1.516 1.695-2.251.761L9.53 8.6v3.538C9.53 13.166 8.685 14 7.643 14c.116 0 .21-.093.21-.207v-6.4c0-1.182 1.515-1.695 2.25-.762l2.299 2.918V2.414a.417.417 0 0 0-.42-.414Z"/><defs><linearGradient id="a" x1="14.079" x2="3.545" y1="14" y2="1.863" gradientUnits="userSpaceOnUse"><stop stop-color="#2EF51C"/><stop offset="1" stop-color="#2EF51C" stop-opacity="0"/></linearGradient><linearGradient id="b" x1="14.079" x2="6.882" y1="14" y2="11.164" gradientUnits="userSpaceOnUse"><stop stop-opacity=".9"/><stop offset="1" stop-color="#1A1A1A" stop-opacity="0"/></linearGradient></defs></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/planetscale.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/planetscale.svgnew file mode 100644index 00000000000..66b28c3fa5e--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/planetscale.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#000" d="M2 8c0-3.327 2.673-6 6-6a6.023 6.023 0 0 1 5.482 3.545l-7.937 7.937c-.327-.164-.654-.327-.954-.546L9.5 8H8l-4.255 4.255A6.09 6.09 0 0 1 2 8ZM14 8l-6 6c3.327 0 6-2.673 6-6Z"/></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/railway.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/railway.svgnew file mode 100644index 00000000000..400c8f9e474--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/railway.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#100F13" d="M2.056 7.135c-.029.2-.047.402-.056.604h9.115a1.088 1.088 0 0 0-.118-.173C9.44 5.553 8.601 5.727 7.402 5.676c-.4-.016-.671-.023-2.263-.023-.851 0-1.777.002-2.679.005-.117.315-.23.62-.284.869h4.67v.608h-4.79Zm9.13 1.213H2.006c.01.162.024.323.046.48h8.477c.378 0 .59-.214.659-.48Zm-8.658 2.14S3.933 13.938 7.994 14a6.002 6.002 0 0 0 5.46-3.512H2.527Z"/><path fill="#100F13" d="M7.994 2a6.002 6.002 0 0 0-5.228 3.054l2.375-.003c1.856 0 1.925.008 2.287.023l.224.008c.782.027 1.743.11 2.499.682.41.31 1.002.995 1.356 1.483.326.451.42.97.198 1.467-.204.456-.644.729-1.176.729H2.196s.05.21.124.442h11.374A5.982 5.982 0 0 0 14 8.003 6.005 6.005 0 0 0 7.994 2Z"/></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/render.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/render.svgnew file mode 100644index 00000000000..22a1ce494a4--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/render.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#0D0D0D" d="M11.145 2.003a2.998 2.998 0 0 0-3.11 2.542c-.008.069-.022.135-.033.202a4.002 4.002 0 0 1-5.85 2.764A.102.102 0 0 0 2 7.6V14h6V9.5A1.5 1.5 0 0 1 9.5 8H11a3 3 0 0 0 2.998-3.122 3.012 3.012 0 0 0-2.853-2.875Z"/></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/scaleway.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/scaleway.svgnew file mode 100644index 00000000000..ccf93005e13--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/scaleway.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#8D40EE" d="M7.572 11.303A.731.731 0 0 1 6.89 10.3a.73.73 0 0 1 .673-.453h.901a.473.473 0 0 0 .475-.472V7.563c0-.4.326-.724.728-.724.402 0 .727.324.727.724v2.851a.947.947 0 0 1-.83.886h-1.99v.003Z"/><path fill="#8D40EE" d="M7.572 11.264H9.56a.9.9 0 0 0 .79-.848V7.563a.687.687 0 0 0-.688-.685.687.687 0 0 0-.688.685v1.81a.516.516 0 0 1-.514.512h-.898a.69.69 0 0 0-.688.686v.01a.691.691 0 0 0 .698.683ZM6.38 9.171a.726.726 0 0 1-.728-.724V5.596a.946.946 0 0 1 .829-.888h1.992a.737.737 0 0 1 .738.722.725.725 0 0 1-.728.735H7.58a.473.473 0 0 0-.475.472v1.811c0 .4-.325.723-.726.724Z"/><path fill="#8D40EE" d="M8.474 4.749H6.486a.899.899 0 0 0-.791.848V8.45a.684.684 0 0 0 .687.717.684.684 0 0 0 .688-.717V6.637a.506.506 0 0 1 .317-.472.513.513 0 0 1 .197-.038h.9a.69.69 0 0 0 .688-.684v-.01a.7.7 0 0 0-.698-.684Z"/><path fill="#8D40EE" d="M8.787 3.462c.762-.001 1.493.3 2.033.837a2.841 2.841 0 0 1 .836 2.023v5.488a.895.895 0 0 1-.76.728H7.229c-.76.001-1.49-.299-2.03-.835a2.843 2.843 0 0 1-.839-2.018V4.35a.893.893 0 0 1 .883-.893l3.545.006ZM8.8 2H5.187A2.285 2.285 0 0 0 2.9 4.277v5.435a4.274 4.274 0 0 0 1.264 3.034A4.324 4.324 0 0 0 7.217 14h3.82a2.268 2.268 0 0 0 2.079-2.012V6.28a4.27 4.27 0 0 0-1.266-3.03A4.32 4.32 0 0 0 8.8 2Z"/></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/supabase.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/supabase.svgnew file mode 100644index 00000000000..44f8b7b5670--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/supabase.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="url(#a)" d="M8 9.713V2.687c0-.534-.682-.77-1.008-.356L2.16 8.498a.752.752 0 0 0 .593 1.215H8Z"/><path fill="url(#b)" d="M7.94 6.274v7.027c0 .533.712.77 1.039.355L13.84 7.52c.385-.504.03-1.216-.623-1.216H7.941v-.03Z"/><defs><linearGradient id="a" x1="4.998" x2="4.998" y1="3.33" y2="11.502" gradientUnits="userSpaceOnUse"><stop stop-color="#3ECE8B"/><stop offset="1" stop-color="#3CD08E"/></linearGradient><linearGradient id="b" x1="7.929" x2="10.894" y1="10.874" y2="10.874" gradientUnits="userSpaceOnUse"><stop stop-color="#21975F"/><stop offset="1" stop-color="#3FCF8C"/></linearGradient></defs></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/timescale.svg b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/timescale.svgnew file mode 100644index 00000000000..969b57a6e0b--- /dev/null+++ b/frontend/src/metabase/databases/components/DatabaseHostnameWithProviderField/providers/timescale.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><mask id="a" width="12" height="12" x="2" y="2" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M14 2H2v12h12V2Z"/></mask><g mask="url(#a)"><mask id="b" width="12" height="12" x="2" y="2" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M13.957 7.992C13.957 4.682 11.28 2 7.98 2 4.677 2 2 4.683 2 7.992v.015C2 11.317 4.677 14 7.979 14c3.301 0 5.978-2.683 5.978-5.993v-.015Z"/></mask><g mask="url(#b)"><path fill="url(#c)" d="M7.207 7.4v-.988a.222.222 0 0 0-.065-.157l-.853-.858-.595.659 1.39 1.395a.072.072 0 0 0 .123-.05Z"/><path fill="url(#d)" d="M5.323 9.785 3.647 8.106l-.6.653 2.218 2.223a.072.072 0 0 0 .123-.05v-.99a.223.223 0 0 0-.065-.157Z"/><path fill="#000" d="M7.556 2.036c-3.009.209-5.413 2.708-5.526 5.732a5.975 5.975 0 0 0 4.644 6.064l-3.642-3.655a.28.28 0 0 1-.081-.198l.003-1.18c0-.05.06-.075.094-.04l.599-.653a.097.097 0 0 1 0-.136l.576-.577a.096.096 0 0 1 .136 0l1.947 1.954c.083.083.13.195.13.313v2.038c0 .294.115.575.322.783l1.485 1.49a5.907 5.907 0 0 0 1.1-.152l-1.88-1.888a.499.499 0 0 1-.146-.352V9.61a1.22 1.22 0 0 0-.356-.86L4.986 6.764a.097.097 0 0 1 0-.136l.572-.573a.096.096 0 0 1 .136 0l.595-.659a.593.593 0 0 1-.032-.04c-.17-.23-.273-.61-.153-1.038.072-.274.222-.481.498-.732a.066.066 0 0 1 .087-.002l.716.622.14.123c.055.047.12.08.189.097l2.23.532c.026.006.05.02.069.038l2.29 2.293c.04.038.063.092.063.148v.487a.446.446 0 0 1-.055.215l-1.133 2.072a.199.199 0 0 1-.255.088l-.522-.229H8.51c-.123 0-.222.1-.222.223v.855c0 .117.046.23.129.314l1.978 2a5.98 5.98 0 0 0 3.535-5.464c0-3.442-2.897-6.204-6.376-5.963Z"/></g></g><defs><linearGradient id="c" x1="7.221" x2="6.257" y1="6.443" y2="6.428" gradientUnits="userSpaceOnUse"><stop stop-opacity="0"/><stop offset="1"/></linearGradient><linearGradient id="d" x1="5.368" x2="4.166" y1="9.555" y2="9.555" gradientUnits="userSpaceOnUse"><stop stop-opacity="0"/><stop offset=".96"/></linearGradient></defs></svg>\ No newline at end of filediff --git a/frontend/src/metabase/databases/utils/schema.ts b/frontend/src/metabase/databases/utils/schema.tsindex 6aaeb350b8f..aa196c2f91a 100644--- a/frontend/src/metabase/databases/utils/schema.ts+++ b/frontend/src/metabase/databases/utils/schema.ts@@ -38,6 +38,7 @@ export const getValidationSchema = (is_full_sync: Yup.boolean().default(true),is_on_demand: Yup.boolean().default(false),"connection-string": Yup.string().default(""),+ provider_name: Yup.string().nullable().default(null),});};diff --git a/resources/migrations/057_update_migrations.yaml b/resources/migrations/057_update_migrations.yamlindex a28be7b16c8..8bfa2bb49b3 100644--- a/resources/migrations/057_update_migrations.yaml+++ b/resources/migrations/057_update_migrations.yaml@@ -1043,6 +1043,22 @@ databaseChangeLog:job_id IN (SELECT id FROM transform_job WHERE built_in_type IS NOT NULL) ANDtag_id IN (SELECT id FROM transform_tag WHERE built_in_type IS NOT NULL);+ - changeSet:+ id: v57.2025-08-23T10:00:00+ author: chodorowicz+ comment: Add provider_name column to metabase_database table+ changes:+ - addColumn:+ tableName: metabase_database+ columns:+ - column:+ name: provider_name+ type: varchar(100)+ remarks: "The name of the hosting provider for the database (e.g., AWS RDS, Azure)."+ constraints:+ nullable: true+ defaultValue: null+# >>>>>>>>>> DO NOT ADD NEW MIGRATIONS BELOW THIS LINE! ADD THEM ABOVE <<<<<<<<<<########################################################################################################################diff --git a/src/metabase/warehouses/api.clj b/src/metabase/warehouses/api.cljindex e187e987103..a34c467c69f 100644--- a/src/metabase/warehouses/api.clj+++ b/src/metabase/warehouses/api.clj@@ -821,7 +821,7 @@"Add a new `Database`."[_route-params_query-params- {:keys [name engine details is_full_sync is_on_demand schedules auto_run_queries cache_ttl connection_source]}+ {:keys [name engine details is_full_sync is_on_demand schedules auto_run_queries cache_ttl connection_source provider_name]}:- [:map[:name ms/NonBlankString][:engine DBEngineString]@@ -831,7 +831,8 @@[:schedules {:optional true} [:maybe sync.schedules/ExpandedSchedulesMap]][:auto_run_queries {:optional true} [:maybe :boolean]][:cache_ttl {:optional true} [:maybe ms/PositiveInt]]- [:connection_source {:default :admin} [:maybe [:enum :admin :setup]]]]]+ [:connection_source {:default :admin} [:maybe [:enum :admin :setup]]]+ [:provider_name {:optional true} [:maybe :string]]]](api/check-superuser)(when cache_ttl(api/check (premium-features/enable-cache-granular-controls?)@@ -840,7 +841,7 @@(let [details-or-error (test-connection-details engine details)valid? (not= (:valid details-or-error) false)](if valid?- ;; no error, proceed with creation. If record is inserted successfuly, publish a `:database-create` event.+ ;; no error, proceed with creation. If record is inserted successfully, publish a `:database-create` event.;; Throw a 500 if nothing is inserted(u/prog1 (api/check-500 (first (t2/insert-returning-instances!:model/Database@@ -851,6 +852,7 @@:is_full_sync is_full_sync:is_on_demand is_on_demand:cache_ttl cache_ttl+ :provider_name provider_name:creator_id api/*current-user-id*}(when schedules(sync.schedules/schedule-map->cron-strings schedules))@@ -916,18 +918,19 @@[:id ms/PositiveInt]]_query-params{:keys [name engine details is_full_sync is_on_demand description caveats points_of_interest schedules- auto_run_queries refingerprint cache_ttl settings]} :- [:map- [:name {:optional true} [:maybe ms/NonBlankString]]- [:engine {:optional true} [:maybe DBEngineString]]- [:refingerprint {:optional true} [:maybe :boolean]]- [:details {:optional true} [:maybe ms/Map]]- [:schedules {:optional true} [:maybe sync.schedules/ExpandedSchedulesMap]]- [:description {:optional true} [:maybe :string]]- [:caveats {:optional true} [:maybe :string]]- [:points_of_interest {:optional true} [:maybe :string]]- [:auto_run_queries {:optional true} [:maybe :boolean]]- [:cache_ttl {:optional true} [:maybe ms/PositiveInt]]- [:settings {:optional true} [:maybe ms/Map]]]]+ auto_run_queries refingerprint cache_ttl settings provider_name]} :- [:map+ [:name {:optional true} [:maybe ms/NonBlankString]]+ [:engine {:optional true} [:maybe DBEngineString]]+ [:refingerprint {:optional true} [:maybe :boolean]]+ [:details {:optional true} [:maybe ms/Map]]+ [:schedules {:optional true} [:maybe sync.schedules/ExpandedSchedulesMap]]+ [:description {:optional true} [:maybe :string]]+ [:caveats {:optional true} [:maybe :string]]+ [:points_of_interest {:optional true} [:maybe :string]]+ [:auto_run_queries {:optional true} [:maybe :boolean]]+ [:cache_ttl {:optional true} [:maybe ms/PositiveInt]]+ [:provider_name {:optional true} [:maybe :string]]+ [:settings {:optional true} [:maybe ms/Map]]]];; TODO - ensure that custom schedules and let-user-control-scheduling go in lockstep(let [existing-database (api/write-check (t2/select-one :model/Database :id id))incoming-details details@@ -954,21 +957,22 @@;; TODO - is there really a reason to let someone change the engine on an existing database?;; that seems like the kind of thing that will almost never work in any practical way;; TODO - this means one cannot unset the description. Does that matter?- (m/remove-vals- nil?- (merge- {:name name- :engine engine- :details details- :refingerprint refingerprint- :is_full_sync full-sync?- :is_on_demand on-demand?- :description description- :caveats caveats- :points_of_interest points_of_interest- :auto_run_queries auto_run_queries}- (when (seq settings)- {:settings pending-settings})))+ (u/select-keys-when+ {:name name+ :engine engine+ :details details+ :refingerprint refingerprint+ :is_full_sync full-sync?+ :is_on_demand on-demand?+ :description description+ :caveats caveats+ :points_of_interest points_of_interest+ :auto_run_queries auto_run_queries+ :settings (when (seq settings) pending-settings)+ :provider_name provider_name}+ :non-nil #{:name :engine :details :refingerprint :is_full_sync :is_on_demand+ :description :caveats :points_of_interest :auto_run_queries :settings}+ :present #{:provider_name});; cache_field_values_schedule can be nil(when schedules(sync.schedules/schedule-map->cron-strings schedules)))diff --git a/src/metabase/warehouses/models/database.clj b/src/metabase/warehouses/models/database.cljindex 6fb06d0364e..56a410058ad 100644--- a/src/metabase/warehouses/models/database.clj+++ b/src/metabase/warehouses/models/database.clj@@ -506,7 +506,7 @@[_model-name {:keys [include-database-secrets]}]{:copy [:auto_run_queries :cache_field_values_schedule :caveats :dbms_version:description :engine :is_audit :is_attached_dwh :is_full_sync :is_on_demand :is_sample- :metadata_sync_schedule :name :points_of_interest :refingerprint :settings :timezone :uploads_enabled+ :metadata_sync_schedule :name :points_of_interest :provider_name :refingerprint :settings :timezone :uploads_enabled:uploads_schema_name :uploads_table_prefix]:skip [;; deprecated field:cache_ttl]diff --git a/test/metabase/warehouse_schema/api/table_test.clj b/test/metabase/warehouse_schema/api/table_test.cljindex d01c7e1f101..bcdf0561f34 100644--- a/test/metabase/warehouse_schema/api/table_test.clj+++ b/test/metabase/warehouse_schema/api/table_test.clj@@ -54,6 +54,7 @@:auto_run_queries true:settings {}:cache_ttl nil+ :provider_name nil:is_audit false}))(defn- table-defaults []diff --git a/test/metabase/warehouses/api_test.clj b/test/metabase/warehouses/api_test.cljindex d24c3c3455e..ac3de0fef51 100644--- a/test/metabase/warehouses/api_test.clj+++ b/test/metabase/warehouses/api_test.clj@@ -353,6 +353,18 @@(is (= {:is_full_sync false}(select-keys (create-db-via-api! {:is_full_sync false}) [:is_full_sync]))))))+(deftest create-db-provider-name-test+ (testing "POST /api/database"+ (testing "can we set `provider_name` when creating a Database?"+ (is (= {:provider_name "AWS RDS"}+ (select-keys (create-db-via-api! {:provider_name "AWS RDS"}) [:provider_name]))))+ (testing "provider_name is optional and can be nil"+ (is (= {:provider_name nil}+ (select-keys (create-db-via-api! {}) [:provider_name]))))+ (testing "can explicitly set provider_name to nil"+ (is (= {:provider_name nil}+ (select-keys (create-db-via-api! {:provider_name nil}) [:provider_name]))))))+(deftest create-db-ignore-schedules-if-no-manual-sync-test(testing "POST /api/database"(testing "if `:let-user-control-scheduling` is false it will ignore any schedules provided"@@ -544,6 +556,21 @@(let [curr-db (t2/select-one [:model/Database :cache_ttl], :id db-id)](is (= nil (:cache_ttl curr-db))))))))))+(deftest update-database-provider-name-test+ (testing "PUT /api/database/:id"+ (testing "should be able to set and unset `provider_name`"+ (mt/with-temp [:model/Database {db-id :id} {:engine ::test-driver}]+ (let [updates1 {:provider_name "AWS RDS"}+ updates2 {:provider_name nil}+ updates1! (fn [] (mt/user-http-request :crowberto :put 200 (format "database/%d" db-id) updates1))+ updates2! (fn [] (mt/user-http-request :crowberto :put 200 (format "database/%d" db-id) updates2))]+ (updates1!)+ (let [curr-db (t2/select-one [:model/Database :provider_name], :id db-id)]+ (is (= "AWS RDS" (:provider_name curr-db))))+ (updates2!)+ (let [curr-db (t2/select-one [:model/Database :provider_name], :id db-id)]+ (is (= nil (:provider_name curr-db)))))))))+(deftest update-database-audit-log-test(testing "Check that we get audit log entries that match the db when updating a Database"(mt/with-premium-features #{:audit-app}diff --git a/test_resources/serialization_baseline/databases/My Database/My Database.yaml b/test_resources/serialization_baseline/databases/My Database/My Database.yamlindex 33483320bfe..fb39094af5e 100644--- a/test_resources/serialization_baseline/databases/My Database/My Database.yaml+++ b/test_resources/serialization_baseline/databases/My Database/My Database.yaml@@ -26,3 +26,4 @@ router_database_id: nulluploads_enabled: falseuploads_schema_name: nulluploads_table_prefix: null+provider_name: nulldiff --git a/test_resources/serialization_baseline/databases/test-data (h2)/test-data (h2).yaml b/test_resources/serialization_baseline/databases/test-data (h2)/test-data (h2).yamlindex bfca5ca7a4b..c1c269ba26d 100644--- a/test_resources/serialization_baseline/databases/test-data (h2)/test-data (h2).yaml+++ b/test_resources/serialization_baseline/databases/test-data (h2)/test-data (h2).yaml@@ -31,3 +31,4 @@ router_database_id: nulluploads_enabled: falseuploads_schema_name: nulluploads_table_prefix: null+provider_name: null